Skip to contentSkip to conversation

bcmring: add reg32_clear_bits and reg32_set_bits functions

PATCH New Leo Chen 1 participant 1 message Oct 7, 2009

Subsystems (2)
lore
Share & tools
lore

Leo Chen

author
#0 lore raw

PATCH 1/1 bcmring: add reg32_clear_bits and reg32_set_bits functions

fix checkpatch errors in reg.h for reg32 accessors

---
 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
index e5f60bf..945dde2 100644
@@ -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