diff options
Diffstat (limited to 'include/asm-arm/arch-ixp2000/platform.h')
-rw-r--r-- | include/asm-arm/arch-ixp2000/platform.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h index c0caf3e3e6fd..abdcf51bd283 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 | ||
34 | static inline void ixp2000_reg_write(volatile unsigned long *reg, unsigned long val) | 34 | static 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) | 46 | static 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 |
@@ -84,7 +88,7 @@ void ixp2000_release_slowport(struct slowport_cfg *); | |||
84 | */ | 88 | */ |
85 | static inline unsigned ixp2000_has_broken_slowport(void) | 89 | static inline unsigned ixp2000_has_broken_slowport(void) |
86 | { | 90 | { |
87 | unsigned long id = *IXP2000_PROD_ID; | 91 | unsigned long id = *IXP2000_PRODUCT_ID; |
88 | unsigned long id_prod = id & (IXP2000_MAJ_PROD_TYPE_MASK | | 92 | unsigned long id_prod = id & (IXP2000_MAJ_PROD_TYPE_MASK | |
89 | IXP2000_MIN_PROD_TYPE_MASK); | 93 | IXP2000_MIN_PROD_TYPE_MASK); |
90 | return (((id_prod == | 94 | return (((id_prod == |