Lines Matching full:unit
16 #define CPS_ACCESSOR_A(unit, off, name) \ argument
17 static inline void *addr_##unit##_##name(void) \
19 return mips_##unit##_base + (off); \
22 #define CPS_ACCESSOR_R(unit, sz, name) \ argument
23 static inline uint##sz##_t read_##unit##_##name(void) \
29 return __raw_readl(addr_##unit##_##name()); \
33 return __raw_readq(addr_##unit##_##name()); \
35 val64 = __raw_readl(addr_##unit##_##name() + 4); \
37 val64 |= __raw_readl(addr_##unit##_##name()); \
45 #define CPS_ACCESSOR_W(unit, sz, name) \ argument
46 static inline void write_##unit##_##name(uint##sz##_t val) \
50 __raw_writel(val, addr_##unit##_##name()); \
55 __raw_writeq(val, addr_##unit##_##name()); \
60 addr_##unit##_##name() + 4); \
61 __raw_writel(val, addr_##unit##_##name()); \
70 #define CPS_ACCESSOR_M(unit, sz, name) \ argument
71 static inline void change_##unit##_##name(uint##sz##_t mask, \
74 uint##sz##_t reg_val = read_##unit##_##name(); \
77 write_##unit##_##name(reg_val); \
80 static inline void set_##unit##_##name(uint##sz##_t val) \
82 change_##unit##_##name(val, val); \
85 static inline void clear_##unit##_##name(uint##sz##_t val) \
87 change_##unit##_##name(val, 0); \
90 #define CPS_ACCESSOR_RO(unit, sz, off, name) \ argument
91 CPS_ACCESSOR_A(unit, off, name) \
92 CPS_ACCESSOR_R(unit, sz, name)
94 #define CPS_ACCESSOR_WO(unit, sz, off, name) \ argument
95 CPS_ACCESSOR_A(unit, off, name) \
96 CPS_ACCESSOR_W(unit, sz, name)
98 #define CPS_ACCESSOR_RW(unit, sz, off, name) \ argument
99 CPS_ACCESSOR_A(unit, off, name) \
100 CPS_ACCESSOR_R(unit, sz, name) \
101 CPS_ACCESSOR_W(unit, sz, name) \
102 CPS_ACCESSOR_M(unit, sz, name)