aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/arch-ixp2000/platform.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h
index c0caf3e3e6fd..6519498dbe25 100644
--- a/include/asm-arm/arch-ixp2000/platform.h
+++ b/include/asm-arm/arch-ixp2000/platform.h
@@ -31,20 +31,24 @@
31 31
32#include <asm/system.h> /* Pickup local_irq_ functions */ 32#include <asm/system.h> /* Pickup local_irq_ functions */
33 33
34static inline void ixp2000_reg_write(volatile unsigned long *reg, unsigned long val) 34static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
35{ 35{
36 volatile unsigned long dummy; 36 unsigned long dummy;
37 unsigned long flags; 37 unsigned long flags;
38 38
39 local_irq_save(flags); 39 local_irq_save(flags);
40 *reg = val; 40 *((volatile unsigned long *)reg) = val;
41 barrier(); 41 barrier();
42 dummy = *reg; 42 dummy = *((volatile unsigned long *)reg);
43 local_irq_restore(flags); 43 local_irq_restore(flags);
44} 44}
45#else 45#else
46#define ixp2000_reg_write(reg, val) (*reg = val) 46static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
47{
48 *((volatile unsigned long *)reg) = val;
49}
47#endif /* IXDP2400 || IXDP2401 */ 50#endif /* IXDP2400 || IXDP2401 */
51#define ixp2000_reg_read(reg) (*((volatile unsigned long *)reg))
48 52
49/* 53/*
50 * Boards may multiplex different devices on the 2nd channel of 54 * Boards may multiplex different devices on the 2nd channel of