Home
last modified time | relevance | path

Searched refs:ale_entry (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/drivers/net/ethernet/ti/
H A Dcpsw_ale.c107 static inline int cpsw_ale_get_field(u32 *ale_entry, u32 start, u32 bits) in cpsw_ale_get_field() argument
117 hi_val = ale_entry[index] << ((idx2 * 32) - start); in cpsw_ale_get_field()
121 return (hi_val + (ale_entry[idx] >> start)) & BITMASK(bits); in cpsw_ale_get_field()
124 static inline void cpsw_ale_set_field(u32 *ale_entry, u32 start, u32 bits, in cpsw_ale_set_field() argument
135 ale_entry[index] &= ~(BITMASK(bits + start - (idx2 * 32))); in cpsw_ale_set_field()
136 ale_entry[index] |= (value >> ((idx2 * 32) - start)); in cpsw_ale_set_field()
140 ale_entry[idx] &= ~(BITMASK(bits) << start); in cpsw_ale_set_field()
141 ale_entry[idx] |= (value << start); in cpsw_ale_set_field()
145 static inline int cpsw_ale_get_##name(u32 *ale_entry) \
147 return cpsw_ale_get_field(ale_entry, start, bits); \
[all …]
/openbmc/u-boot/drivers/net/ti/
H A Dcpsw.c242 static inline int cpsw_ale_get_field(u32 *ale_entry, u32 start, u32 bits) in cpsw_ale_get_field() argument
249 return (ale_entry[idx] >> start) & BITMASK(bits); in cpsw_ale_get_field()
252 static inline void cpsw_ale_set_field(u32 *ale_entry, u32 start, u32 bits, in cpsw_ale_set_field() argument
261 ale_entry[idx] &= ~(BITMASK(bits) << start); in cpsw_ale_set_field()
262 ale_entry[idx] |= (value << start); in cpsw_ale_set_field()
266 static inline int cpsw_ale_get_##name(u32 *ale_entry) \
268 return cpsw_ale_get_field(ale_entry, start, bits); \
270 static inline void cpsw_ale_set_##name(u32 *ale_entry, u32 value) \
272 cpsw_ale_set_field(ale_entry, start, bits, value); \
285 static inline void cpsw_ale_get_addr(u32 *ale_entry, u8 *addr) in cpsw_ale_get_addr() argument
[all …]