aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9260.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/at91sam9260.c')
-rw-r--r--arch/arm/mach-at91/at91sam9260.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index 1c945e3ba57c..5e46e4a96430 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.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>
@@ -21,11 +20,11 @@
21#include <mach/at91sam9260.h> 20#include <mach/at91sam9260.h>
22#include <mach/at91_pmc.h> 21#include <mach/at91_pmc.h>
23#include <mach/at91_rstc.h> 22#include <mach/at91_rstc.h>
24#include <mach/at91_shdwc.h>
25 23
26#include "soc.h" 24#include "soc.h"
27#include "generic.h" 25#include "generic.h"
28#include "clock.h" 26#include "clock.h"
27#include "sam9_smc.h"
29 28
30/* -------------------------------------------------------------------- 29/* --------------------------------------------------------------------
31 * Clocks 30 * Clocks
@@ -211,6 +210,9 @@ static struct clk_lookup periph_clocks_lookups[] = {
211 CLKDEV_CON_DEV_ID("usart", "fffd8000.serial", &usart5_clk), 210 CLKDEV_CON_DEV_ID("usart", "fffd8000.serial", &usart5_clk),
212 /* fake hclk clock */ 211 /* fake hclk clock */
213 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), 212 CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
213 CLKDEV_CON_ID("pioA", &pioA_clk),
214 CLKDEV_CON_ID("pioB", &pioB_clk),
215 CLKDEV_CON_ID("pioC", &pioC_clk),
214}; 216};
215 217
216static struct clk_lookup usart_clocks_lookups[] = { 218static struct clk_lookup usart_clocks_lookups[] = {
@@ -272,28 +274,19 @@ void __init at91sam9260_set_console_clock(int id)
272 * GPIO 274 * GPIO
273 * -------------------------------------------------------------------- */ 275 * -------------------------------------------------------------------- */
274 276
275static struct at91_gpio_bank at91sam9260_gpio[] = { 277static struct at91_gpio_bank at91sam9260_gpio[] __initdata = {
276 { 278 {
277 .id = AT91SAM9260_ID_PIOA, 279 .id = AT91SAM9260_ID_PIOA,
278 .offset = AT91_PIOA, 280 .regbase = AT91SAM9260_BASE_PIOA,
279 .clock = &pioA_clk,
280 }, { 281 }, {
281 .id = AT91SAM9260_ID_PIOB, 282 .id = AT91SAM9260_ID_PIOB,
282 .offset = AT91_PIOB, 283 .regbase = AT91SAM9260_BASE_PIOB,
283 .clock = &pioB_clk,
284 }, { 284 }, {
285 .id = AT91SAM9260_ID_PIOC, 285 .id = AT91SAM9260_ID_PIOC,
286 .offset = AT91_PIOC, 286 .regbase = AT91SAM9260_BASE_PIOC,
287 .clock = &pioC_clk,
288 } 287 }
289}; 288};
290 289
291static void at91sam9260_poweroff(void)
292{
293 at91_sys_write(AT91_SHDW_CR, AT91_SHDW_KEY | AT91_SHDW_SHDW);
294}
295
296
297/* -------------------------------------------------------------------- 290/* --------------------------------------------------------------------
298 * AT91SAM9260 processor initialization 291 * AT91SAM9260 processor initialization
299 * -------------------------------------------------------------------- */ 292 * -------------------------------------------------------------------- */
@@ -327,10 +320,16 @@ static void __init at91sam9260_map_io(void)
327 } 320 }
328} 321}
329 322
323static void __init at91sam9260_ioremap_registers(void)
324{
325 at91_ioremap_shdwc(AT91SAM9260_BASE_SHDWC);
326 at91sam926x_ioremap_pit(AT91SAM9260_BASE_PIT);
327 at91sam9_ioremap_smc(0, AT91SAM9260_BASE_SMC);
328}
329
330static void __init at91sam9260_initialize(void) 330static void __init at91sam9260_initialize(void)
331{ 331{
332 at91_arch_reset = at91sam9_alt_reset; 332 arm_pm_restart = at91sam9_alt_restart;
333 pm_power_off = at91sam9260_poweroff;
334 at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) 333 at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
335 | (1 << AT91SAM9260_ID_IRQ2); 334 | (1 << AT91SAM9260_ID_IRQ2);
336 335
@@ -383,6 +382,7 @@ static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = {
383struct at91_init_soc __initdata at91sam9260_soc = { 382struct at91_init_soc __initdata at91sam9260_soc = {
384 .map_io = at91sam9260_map_io, 383 .map_io = at91sam9260_map_io,
385 .default_irq_priority = at91sam9260_default_irq_priority, 384 .default_irq_priority = at91sam9260_default_irq_priority,
385 .ioremap_registers = at91sam9260_ioremap_registers,
386 .register_clocks = at91sam9260_register_clocks, 386 .register_clocks = at91sam9260_register_clocks,
387 .init = at91sam9260_initialize, 387 .init = at91sam9260_initialize,
388}; 388};