diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9rl.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index 61cbb46f5b0e..d6bcb1da11df 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/pm.h> | ||
14 | 13 | ||
15 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
16 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
@@ -20,11 +19,11 @@ | |||
20 | #include <mach/at91sam9rl.h> | 19 | #include <mach/at91sam9rl.h> |
21 | #include <mach/at91_pmc.h> | 20 | #include <mach/at91_pmc.h> |
22 | #include <mach/at91_rstc.h> | 21 | #include <mach/at91_rstc.h> |
23 | #include <mach/at91_shdwc.h> | ||
24 | 22 | ||
25 | #include "soc.h" | 23 | #include "soc.h" |
26 | #include "generic.h" | 24 | #include "generic.h" |
27 | #include "clock.h" | 25 | #include "clock.h" |
26 | #include "sam9_smc.h" | ||
28 | 27 | ||
29 | /* -------------------------------------------------------------------- | 28 | /* -------------------------------------------------------------------- |
30 | * Clocks | 29 | * Clocks |
@@ -184,6 +183,10 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
184 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), | 183 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), |
185 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), | 184 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), |
186 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), | 185 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), |
186 | CLKDEV_CON_ID("pioA", &pioA_clk), | ||
187 | CLKDEV_CON_ID("pioB", &pioB_clk), | ||
188 | CLKDEV_CON_ID("pioC", &pioC_clk), | ||
189 | CLKDEV_CON_ID("pioD", &pioD_clk), | ||
187 | }; | 190 | }; |
188 | 191 | ||
189 | static struct clk_lookup usart_clocks_lookups[] = { | 192 | static struct clk_lookup usart_clocks_lookups[] = { |
@@ -243,32 +246,22 @@ void __init at91sam9rl_set_console_clock(int id) | |||
243 | * GPIO | 246 | * GPIO |
244 | * -------------------------------------------------------------------- */ | 247 | * -------------------------------------------------------------------- */ |
245 | 248 | ||
246 | static struct at91_gpio_bank at91sam9rl_gpio[] = { | 249 | static struct at91_gpio_bank at91sam9rl_gpio[] __initdata = { |
247 | { | 250 | { |
248 | .id = AT91SAM9RL_ID_PIOA, | 251 | .id = AT91SAM9RL_ID_PIOA, |
249 | .offset = AT91_PIOA, | 252 | .regbase = AT91SAM9RL_BASE_PIOA, |
250 | .clock = &pioA_clk, | ||
251 | }, { | 253 | }, { |
252 | .id = AT91SAM9RL_ID_PIOB, | 254 | .id = AT91SAM9RL_ID_PIOB, |
253 | .offset = AT91_PIOB, | 255 | .regbase = AT91SAM9RL_BASE_PIOB, |
254 | .clock = &pioB_clk, | ||
255 | }, { | 256 | }, { |
256 | .id = AT91SAM9RL_ID_PIOC, | 257 | .id = AT91SAM9RL_ID_PIOC, |
257 | .offset = AT91_PIOC, | 258 | .regbase = AT91SAM9RL_BASE_PIOC, |
258 | .clock = &pioC_clk, | ||
259 | }, { | 259 | }, { |
260 | .id = AT91SAM9RL_ID_PIOD, | 260 | .id = AT91SAM9RL_ID_PIOD, |
261 | .offset = AT91_PIOD, | 261 | .regbase = AT91SAM9RL_BASE_PIOD, |
262 | .clock = &pioD_clk, | ||
263 | } | 262 | } |
264 | }; | 263 | }; |
265 | 264 | ||
266 | static void at91sam9rl_poweroff(void) | ||
267 | { | ||
268 | at91_sys_write(AT91_SHDW_CR, AT91_SHDW_KEY | AT91_SHDW_SHDW); | ||
269 | } | ||
270 | |||
271 | |||
272 | /* -------------------------------------------------------------------- | 265 | /* -------------------------------------------------------------------- |
273 | * AT91SAM9RL processor initialization | 266 | * AT91SAM9RL processor initialization |
274 | * -------------------------------------------------------------------- */ | 267 | * -------------------------------------------------------------------- */ |
@@ -290,10 +283,16 @@ static void __init at91sam9rl_map_io(void) | |||
290 | at91_init_sram(0, AT91SAM9RL_SRAM_BASE, sram_size); | 283 | at91_init_sram(0, AT91SAM9RL_SRAM_BASE, sram_size); |
291 | } | 284 | } |
292 | 285 | ||
286 | static void __init at91sam9rl_ioremap_registers(void) | ||
287 | { | ||
288 | at91_ioremap_shdwc(AT91SAM9RL_BASE_SHDWC); | ||
289 | at91sam926x_ioremap_pit(AT91SAM9RL_BASE_PIT); | ||
290 | at91sam9_ioremap_smc(0, AT91SAM9RL_BASE_SMC); | ||
291 | } | ||
292 | |||
293 | static void __init at91sam9rl_initialize(void) | 293 | static void __init at91sam9rl_initialize(void) |
294 | { | 294 | { |
295 | arm_pm_restart = at91sam9_alt_restart; | 295 | arm_pm_restart = at91sam9_alt_restart; |
296 | pm_power_off = at91sam9rl_poweroff; | ||
297 | at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0); | 296 | at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0); |
298 | 297 | ||
299 | /* Register GPIO subsystem */ | 298 | /* Register GPIO subsystem */ |
@@ -345,6 +344,7 @@ static unsigned int at91sam9rl_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
345 | struct at91_init_soc __initdata at91sam9rl_soc = { | 344 | struct at91_init_soc __initdata at91sam9rl_soc = { |
346 | .map_io = at91sam9rl_map_io, | 345 | .map_io = at91sam9rl_map_io, |
347 | .default_irq_priority = at91sam9rl_default_irq_priority, | 346 | .default_irq_priority = at91sam9rl_default_irq_priority, |
347 | .ioremap_registers = at91sam9rl_ioremap_registers, | ||
348 | .register_clocks = at91sam9rl_register_clocks, | 348 | .register_clocks = at91sam9rl_register_clocks, |
349 | .init = at91sam9rl_initialize, | 349 | .init = at91sam9rl_initialize, |
350 | }; | 350 | }; |