diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-arm/arch-ns9xxx/clock.h | 2 | ||||
| -rw-r--r-- | include/asm-arm/arch-ns9xxx/hardware.h | 10 | ||||
| -rw-r--r-- | include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h | 4 | ||||
| -rw-r--r-- | include/asm-arm/arch-ns9xxx/system.h | 4 |
4 files changed, 7 insertions, 13 deletions
diff --git a/include/asm-arm/arch-ns9xxx/clock.h b/include/asm-arm/arch-ns9xxx/clock.h index 90604d48d561..b943d3a92a1d 100644 --- a/include/asm-arm/arch-ns9xxx/clock.h +++ b/include/asm-arm/arch-ns9xxx/clock.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | static inline u32 ns9xxx_systemclock(void) __attribute__((const)); | 19 | static inline u32 ns9xxx_systemclock(void) __attribute__((const)); |
| 20 | static inline u32 ns9xxx_systemclock(void) | 20 | static inline u32 ns9xxx_systemclock(void) |
| 21 | { | 21 | { |
| 22 | u32 pll = SYS_PLL; | 22 | u32 pll = __raw_readl(SYS_PLL); |
| 23 | 23 | ||
| 24 | /* | 24 | /* |
| 25 | * The system clock should be a multiple of HZ * TIMERCLOCKSELECT (in | 25 | * The system clock should be a multiple of HZ * TIMERCLOCKSELECT (in |
diff --git a/include/asm-arm/arch-ns9xxx/hardware.h b/include/asm-arm/arch-ns9xxx/hardware.h index b5d66f963981..0b7b34603f1c 100644 --- a/include/asm-arm/arch-ns9xxx/hardware.h +++ b/include/asm-arm/arch-ns9xxx/hardware.h | |||
| @@ -35,11 +35,8 @@ | |||
| 35 | 35 | ||
| 36 | #ifndef __ASSEMBLY__ | 36 | #ifndef __ASSEMBLY__ |
| 37 | 37 | ||
| 38 | # define __REG(x) (*((volatile u32 *)io_p2v((x)))) | 38 | # define __REG(x) ((void __iomem __force *)io_p2v((x))) |
| 39 | # define __REG2(x, y) (*((volatile u32 *)io_p2v((x)) + (y))) | 39 | # define __REG2(x, y) ((void __iomem __force *)(io_p2v((x)) + 4 * (y))) |
| 40 | |||
| 41 | # define __REGB(x) (*((volatile u8 *)io_p2v((x)))) | ||
| 42 | # define __REGB2(x) (*((volatile u8 *)io_p2v((x)) + (y))) | ||
| 43 | 40 | ||
| 44 | # define __REGSET(var, field, value) \ | 41 | # define __REGSET(var, field, value) \ |
| 45 | ((var) = (((var) & ~((field) & ~(value))) | (value))) | 42 | ((var) = (((var) & ~((field) & ~(value))) | (value))) |
| @@ -77,9 +74,6 @@ | |||
| 77 | # define __REG(x) io_p2v(x) | 74 | # define __REG(x) io_p2v(x) |
| 78 | # define __REG2(x, y) io_p2v((x) + (y)) | 75 | # define __REG2(x, y) io_p2v((x) + (y)) |
| 79 | 76 | ||
| 80 | # define __REGB(x) __REG((x)) | ||
| 81 | # define __REGB2(x, y) __REG2((x), (y)) | ||
| 82 | |||
| 83 | #endif | 77 | #endif |
| 84 | 78 | ||
| 85 | #endif /* ifndef __ASM_ARCH_HARDWARE_H */ | 79 | #endif /* ifndef __ASM_ARCH_HARDWARE_H */ |
diff --git a/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h b/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h index c3dc532dd20c..afa3a9db3e1d 100644 --- a/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h +++ b/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #define FPGA_UARTC_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x10) | 18 | #define FPGA_UARTC_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x10) |
| 19 | #define FPGA_UARTD_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x18) | 19 | #define FPGA_UARTD_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x18) |
| 20 | 20 | ||
| 21 | #define FPGA_IER __REGB(NS9XXX_CSxSTAT_PHYS(0) + 0x50) | 21 | #define FPGA_IER __REG(NS9XXX_CSxSTAT_PHYS(0) + 0x50) |
| 22 | #define FPGA_ISR __REGB(NS9XXX_CSxSTAT_PHYS(0) + 0x60) | 22 | #define FPGA_ISR __REG(NS9XXX_CSxSTAT_PHYS(0) + 0x60) |
| 23 | 23 | ||
| 24 | #endif /* ifndef __ASM_ARCH_REGSBOARDA9M9750_H */ | 24 | #endif /* ifndef __ASM_ARCH_REGSBOARDA9M9750_H */ |
diff --git a/include/asm-arm/arch-ns9xxx/system.h b/include/asm-arm/arch-ns9xxx/system.h index e3cd4d31b3f3..c1082bd8977c 100644 --- a/include/asm-arm/arch-ns9xxx/system.h +++ b/include/asm-arm/arch-ns9xxx/system.h | |||
| @@ -24,9 +24,9 @@ static inline void arch_reset(char mode) | |||
| 24 | { | 24 | { |
| 25 | u32 reg; | 25 | u32 reg; |
| 26 | 26 | ||
| 27 | reg = SYS_PLL >> 16; | 27 | reg = __raw_readl(SYS_PLL) >> 16; |
| 28 | REGSET(reg, SYS_PLL, SWC, YES); | 28 | REGSET(reg, SYS_PLL, SWC, YES); |
| 29 | SYS_PLL = reg; | 29 | __raw_writel(reg, SYS_PLL); |
| 30 | 30 | ||
| 31 | BUG(); | 31 | BUG(); |
| 32 | } | 32 | } |
