diff options
Diffstat (limited to 'arch/arm/mach-ep93xx/include')
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | 36 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/platform.h | 16 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/system.h | 12 |
3 files changed, 52 insertions, 12 deletions
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h index 49b256b3ddfc..087d22b8f351 100644 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | |||
@@ -175,11 +175,37 @@ | |||
175 | #define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c) | 175 | #define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c) |
176 | #define EP93XX_SYSCON_CLOCK_SET1 EP93XX_SYSCON_REG(0x20) | 176 | #define EP93XX_SYSCON_CLOCK_SET1 EP93XX_SYSCON_REG(0x20) |
177 | #define EP93XX_SYSCON_CLOCK_SET2 EP93XX_SYSCON_REG(0x24) | 177 | #define EP93XX_SYSCON_CLOCK_SET2 EP93XX_SYSCON_REG(0x24) |
178 | #define EP93XX_SYSCON_DEVICE_CONFIG EP93XX_SYSCON_REG(0x80) | 178 | #define EP93XX_SYSCON_DEVCFG EP93XX_SYSCON_REG(0x80) |
179 | #define EP93XX_SYSCON_DEVICE_CONFIG_U3EN (1<<24) | 179 | #define EP93XX_SYSCON_DEVCFG_SWRST (1<<31) |
180 | #define EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE (1<<23) | 180 | #define EP93XX_SYSCON_DEVCFG_D1ONG (1<<30) |
181 | #define EP93XX_SYSCON_DEVICE_CONFIG_U2EN (1<<20) | 181 | #define EP93XX_SYSCON_DEVCFG_D0ONG (1<<29) |
182 | #define EP93XX_SYSCON_DEVICE_CONFIG_U1EN (1<<18) | 182 | #define EP93XX_SYSCON_DEVCFG_IONU2 (1<<28) |
183 | #define EP93XX_SYSCON_DEVCFG_GONK (1<<27) | ||
184 | #define EP93XX_SYSCON_DEVCFG_TONG (1<<26) | ||
185 | #define EP93XX_SYSCON_DEVCFG_MONG (1<<25) | ||
186 | #define EP93XX_SYSCON_DEVCFG_U3EN (1<<24) | ||
187 | #define EP93XX_SYSCON_DEVCFG_CPENA (1<<23) | ||
188 | #define EP93XX_SYSCON_DEVCFG_A2ONG (1<<22) | ||
189 | #define EP93XX_SYSCON_DEVCFG_A1ONG (1<<21) | ||
190 | #define EP93XX_SYSCON_DEVCFG_U2EN (1<<20) | ||
191 | #define EP93XX_SYSCON_DEVCFG_EXVC (1<<19) | ||
192 | #define EP93XX_SYSCON_DEVCFG_U1EN (1<<18) | ||
193 | #define EP93XX_SYSCON_DEVCFG_TIN (1<<17) | ||
194 | #define EP93XX_SYSCON_DEVCFG_HC3IN (1<<15) | ||
195 | #define EP93XX_SYSCON_DEVCFG_HC3EN (1<<14) | ||
196 | #define EP93XX_SYSCON_DEVCFG_HC1IN (1<<13) | ||
197 | #define EP93XX_SYSCON_DEVCFG_HC1EN (1<<12) | ||
198 | #define EP93XX_SYSCON_DEVCFG_HONIDE (1<<11) | ||
199 | #define EP93XX_SYSCON_DEVCFG_GONIDE (1<<10) | ||
200 | #define EP93XX_SYSCON_DEVCFG_PONG (1<<9) | ||
201 | #define EP93XX_SYSCON_DEVCFG_EONIDE (1<<8) | ||
202 | #define EP93XX_SYSCON_DEVCFG_I2SONSSP (1<<7) | ||
203 | #define EP93XX_SYSCON_DEVCFG_I2SONAC97 (1<<6) | ||
204 | #define EP93XX_SYSCON_DEVCFG_RASONP3 (1<<4) | ||
205 | #define EP93XX_SYSCON_DEVCFG_RAS (1<<3) | ||
206 | #define EP93XX_SYSCON_DEVCFG_ADCPD (1<<2) | ||
207 | #define EP93XX_SYSCON_DEVCFG_KEYS (1<<1) | ||
208 | #define EP93XX_SYSCON_DEVCFG_SHENA (1<<0) | ||
183 | #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) | 209 | #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) |
184 | 210 | ||
185 | #define EP93XX_WATCHDOG_BASE EP93XX_APB_IOMEM(0x00140000) | 211 | #define EP93XX_WATCHDOG_BASE EP93XX_APB_IOMEM(0x00140000) |
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h index 05f0f4f2f3ce..fb5e59a3ea04 100644 --- a/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/arch/arm/mach-ep93xx/include/mach/platform.h | |||
@@ -15,8 +15,24 @@ struct ep93xx_eth_data | |||
15 | void ep93xx_map_io(void); | 15 | void ep93xx_map_io(void); |
16 | void ep93xx_init_irq(void); | 16 | void ep93xx_init_irq(void); |
17 | void ep93xx_init_time(unsigned long); | 17 | void ep93xx_init_time(unsigned long); |
18 | |||
19 | /* EP93xx System Controller software locked register write */ | ||
20 | void ep93xx_syscon_swlocked_write(unsigned int val, unsigned int reg); | ||
21 | void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits); | ||
22 | |||
23 | static inline void ep93xx_devcfg_set_bits(unsigned int bits) | ||
24 | { | ||
25 | ep93xx_devcfg_set_clear(bits, 0x00); | ||
26 | } | ||
27 | |||
28 | static inline void ep93xx_devcfg_clear_bits(unsigned int bits) | ||
29 | { | ||
30 | ep93xx_devcfg_set_clear(0x00, bits); | ||
31 | } | ||
32 | |||
18 | void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr); | 33 | void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr); |
19 | void ep93xx_register_i2c(struct i2c_board_info *devices, int num); | 34 | void ep93xx_register_i2c(struct i2c_board_info *devices, int num); |
35 | |||
20 | void ep93xx_init_devices(void); | 36 | void ep93xx_init_devices(void); |
21 | extern struct sys_timer ep93xx_timer; | 37 | extern struct sys_timer ep93xx_timer; |
22 | 38 | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h index ed8f35e4f068..6d661fe9d66c 100644 --- a/arch/arm/mach-ep93xx/include/mach/system.h +++ b/arch/arm/mach-ep93xx/include/mach/system.h | |||
@@ -11,15 +11,13 @@ static inline void arch_idle(void) | |||
11 | 11 | ||
12 | static inline void arch_reset(char mode, const char *cmd) | 12 | static inline void arch_reset(char mode, const char *cmd) |
13 | { | 13 | { |
14 | u32 devicecfg; | ||
15 | |||
16 | local_irq_disable(); | 14 | local_irq_disable(); |
17 | 15 | ||
18 | devicecfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG); | 16 | /* |
19 | __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); | 17 | * Set then clear the SWRST bit to initiate a software reset |
20 | __raw_writel(devicecfg | 0x80000000, EP93XX_SYSCON_DEVICE_CONFIG); | 18 | */ |
21 | __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); | 19 | ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_SWRST); |
22 | __raw_writel(devicecfg & ~0x80000000, EP93XX_SYSCON_DEVICE_CONFIG); | 20 | ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_SWRST); |
23 | 21 | ||
24 | while (1) | 22 | while (1) |
25 | ; | 23 | ; |