diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9263.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9263.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 182d112dc59d..79e3669b1117 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/pm.h> | ||
15 | 14 | ||
16 | #include <asm/irq.h> | 15 | #include <asm/irq.h> |
17 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
@@ -19,11 +18,11 @@ | |||
19 | #include <mach/at91sam9263.h> | 18 | #include <mach/at91sam9263.h> |
20 | #include <mach/at91_pmc.h> | 19 | #include <mach/at91_pmc.h> |
21 | #include <mach/at91_rstc.h> | 20 | #include <mach/at91_rstc.h> |
22 | #include <mach/at91_shdwc.h> | ||
23 | 21 | ||
24 | #include "soc.h" | 22 | #include "soc.h" |
25 | #include "generic.h" | 23 | #include "generic.h" |
26 | #include "clock.h" | 24 | #include "clock.h" |
25 | #include "sam9_smc.h" | ||
27 | 26 | ||
28 | /* -------------------------------------------------------------------- | 27 | /* -------------------------------------------------------------------- |
29 | * Clocks | 28 | * Clocks |
@@ -193,6 +192,11 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
193 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk), | 192 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk), |
194 | /* fake hclk clock */ | 193 | /* fake hclk clock */ |
195 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), | 194 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), |
195 | CLKDEV_CON_ID("pioA", &pioA_clk), | ||
196 | CLKDEV_CON_ID("pioB", &pioB_clk), | ||
197 | CLKDEV_CON_ID("pioC", &pioCDE_clk), | ||
198 | CLKDEV_CON_ID("pioD", &pioCDE_clk), | ||
199 | CLKDEV_CON_ID("pioE", &pioCDE_clk), | ||
196 | }; | 200 | }; |
197 | 201 | ||
198 | static struct clk_lookup usart_clocks_lookups[] = { | 202 | static struct clk_lookup usart_clocks_lookups[] = { |
@@ -265,36 +269,25 @@ void __init at91sam9263_set_console_clock(int id) | |||
265 | * GPIO | 269 | * GPIO |
266 | * -------------------------------------------------------------------- */ | 270 | * -------------------------------------------------------------------- */ |
267 | 271 | ||
268 | static struct at91_gpio_bank at91sam9263_gpio[] = { | 272 | static struct at91_gpio_bank at91sam9263_gpio[] __initdata = { |
269 | { | 273 | { |
270 | .id = AT91SAM9263_ID_PIOA, | 274 | .id = AT91SAM9263_ID_PIOA, |
271 | .offset = AT91_PIOA, | 275 | .regbase = AT91SAM9263_BASE_PIOA, |
272 | .clock = &pioA_clk, | ||
273 | }, { | 276 | }, { |
274 | .id = AT91SAM9263_ID_PIOB, | 277 | .id = AT91SAM9263_ID_PIOB, |
275 | .offset = AT91_PIOB, | 278 | .regbase = AT91SAM9263_BASE_PIOB, |
276 | .clock = &pioB_clk, | ||
277 | }, { | 279 | }, { |
278 | .id = AT91SAM9263_ID_PIOCDE, | 280 | .id = AT91SAM9263_ID_PIOCDE, |
279 | .offset = AT91_PIOC, | 281 | .regbase = AT91SAM9263_BASE_PIOC, |
280 | .clock = &pioCDE_clk, | ||
281 | }, { | 282 | }, { |
282 | .id = AT91SAM9263_ID_PIOCDE, | 283 | .id = AT91SAM9263_ID_PIOCDE, |
283 | .offset = AT91_PIOD, | 284 | .regbase = AT91SAM9263_BASE_PIOD, |
284 | .clock = &pioCDE_clk, | ||
285 | }, { | 285 | }, { |
286 | .id = AT91SAM9263_ID_PIOCDE, | 286 | .id = AT91SAM9263_ID_PIOCDE, |
287 | .offset = AT91_PIOE, | 287 | .regbase = AT91SAM9263_BASE_PIOE, |
288 | .clock = &pioCDE_clk, | ||
289 | } | 288 | } |
290 | }; | 289 | }; |
291 | 290 | ||
292 | static void at91sam9263_poweroff(void) | ||
293 | { | ||
294 | at91_sys_write(AT91_SHDW_CR, AT91_SHDW_KEY | AT91_SHDW_SHDW); | ||
295 | } | ||
296 | |||
297 | |||
298 | /* -------------------------------------------------------------------- | 291 | /* -------------------------------------------------------------------- |
299 | * AT91SAM9263 processor initialization | 292 | * AT91SAM9263 processor initialization |
300 | * -------------------------------------------------------------------- */ | 293 | * -------------------------------------------------------------------- */ |
@@ -305,10 +298,17 @@ static void __init at91sam9263_map_io(void) | |||
305 | at91_init_sram(1, AT91SAM9263_SRAM1_BASE, AT91SAM9263_SRAM1_SIZE); | 298 | at91_init_sram(1, AT91SAM9263_SRAM1_BASE, AT91SAM9263_SRAM1_SIZE); |
306 | } | 299 | } |
307 | 300 | ||
301 | static void __init at91sam9263_ioremap_registers(void) | ||
302 | { | ||
303 | at91_ioremap_shdwc(AT91SAM9263_BASE_SHDWC); | ||
304 | at91sam926x_ioremap_pit(AT91SAM9263_BASE_PIT); | ||
305 | at91sam9_ioremap_smc(0, AT91SAM9263_BASE_SMC0); | ||
306 | at91sam9_ioremap_smc(1, AT91SAM9263_BASE_SMC1); | ||
307 | } | ||
308 | |||
308 | static void __init at91sam9263_initialize(void) | 309 | static void __init at91sam9263_initialize(void) |
309 | { | 310 | { |
310 | at91_arch_reset = at91sam9_alt_reset; | 311 | arm_pm_restart = at91sam9_alt_restart; |
311 | pm_power_off = at91sam9263_poweroff; | ||
312 | at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); | 312 | at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); |
313 | 313 | ||
314 | /* Register GPIO subsystem */ | 314 | /* Register GPIO subsystem */ |
@@ -360,6 +360,7 @@ static unsigned int at91sam9263_default_irq_priority[NR_AIC_IRQS] __initdata = { | |||
360 | struct at91_init_soc __initdata at91sam9263_soc = { | 360 | struct at91_init_soc __initdata at91sam9263_soc = { |
361 | .map_io = at91sam9263_map_io, | 361 | .map_io = at91sam9263_map_io, |
362 | .default_irq_priority = at91sam9263_default_irq_priority, | 362 | .default_irq_priority = at91sam9263_default_irq_priority, |
363 | .ioremap_registers = at91sam9263_ioremap_registers, | ||
363 | .register_clocks = at91sam9263_register_clocks, | 364 | .register_clocks = at91sam9263_register_clocks, |
364 | .init = at91sam9263_initialize, | 365 | .init = at91sam9263_initialize, |
365 | }; | 366 | }; |