extern void clear_bit(int nr, volatile void * addr);

-extern void change_bit(int nr, volatile void * addr);
-
  static inline void __change_bit(int nr, volatile void *addr)
  {
        unsigned long mask = BIT_MASK(nr);
@@ -39,6 +37,11 @@ static inline void __change_bit(int nr, volatile void *addr)
        *p ^= mask;
  }

+static inline void change_bit(int nr, volatile void *addr)
+{
+       __change_bit(nr, addr);
+}
+
  static inline int __test_and_set_bit(int nr, volatile void *addr)
  {
        unsigned long mask = BIT_MASK(nr);

While they're not used much, U-Boot does have interrupt support (at
least on powerpc -- not sure about ARM), so this should be atomic
against interrupts.

The NAND driver should be using __change_bit() instead.


Alright, I shall be soon sending V5 that drops this patch and uses __change_bit directly.

Thanks
Amit Virdi
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to