bcmring: add reg32_clear_bits and reg32_set_bits functions
Subsystems (2)
PATCH 1/1 bcmring: add reg32_clear_bits and reg32_set_bits functions
fix checkpatch errors in reg.h for reg32 accessors
Signed-off-by Leo Hao Chen <[email protected]>
--- arch/arm/mach-bcmring/include/csp/reg.h | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
arch/arm/mach-bcmring/include/csp/reg.h +14 -0
@@ -84,6 +84,20 @@#endif +static inline void reg32_clear_bits (volatile uint32_t *reg,uint32_t value) +{ +REG_LOCAL_IRQ_SAVE ; + *reg &= ~(value); +REG_LOCAL_IRQ_RESTORE ; +} + +static inline void reg32_set_bits (volatile uint32_t *reg,uint32_t value) +{ +REG_LOCAL_IRQ_SAVE ; + *reg |= value; +REG_LOCAL_IRQ_RESTORE ; +} +static inline void reg32_modify_and (volatile uint32_t *reg,uint32_t value) {REG_LOCAL_IRQ_SAVE ;
Signature · 3 lines
1.6.0.6 Leo Chen