From 80e91cb8023fbc07b2410c4ce5a2da12fbcebca4 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 16 Sep 2011 23:37:50 +0800 Subject: ARM: at91: make gpio register base soc independant Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Acked-by: Nicolas Ferre Reviewed-by: Ryan Mallon --- arch/arm/mach-at91/at91rm9200.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-at91/at91rm9200.c') diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 713d3bdbd284..8ce86751c2e2 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -271,19 +271,19 @@ void __init at91rm9200_set_console_clock(int id) static struct at91_gpio_bank at91rm9200_gpio[] = { { .id = AT91RM9200_ID_PIOA, - .offset = AT91_PIOA, + .regbase = AT91RM9200_BASE_PIOA, .clock = &pioA_clk, }, { .id = AT91RM9200_ID_PIOB, - .offset = AT91_PIOB, + .regbase = AT91RM9200_BASE_PIOB, .clock = &pioB_clk, }, { .id = AT91RM9200_ID_PIOC, - .offset = AT91_PIOC, + .regbase = AT91RM9200_BASE_PIOC, .clock = &pioC_clk, }, { .id = AT91RM9200_ID_PIOD, - .offset = AT91_PIOD, + .regbase = AT91RM9200_BASE_PIOD, .clock = &pioD_clk, } }; -- cgit v1.2.3 From cfa5a1fe7e65bacdee59d5df60a9f44b0c030532 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 14 Oct 2011 01:17:18 +0800 Subject: ARM: at91: add ioremap_registers entry point to soc setup this will allow to ioremap the register of the PIT, PMC and others and make the code soc independent Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Acked-by: Nicolas Ferre --- arch/arm/mach-at91/at91rm9200.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/mach-at91/at91rm9200.c') diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 8ce86751c2e2..c67d50c9ea20 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -307,6 +307,10 @@ static void __init at91rm9200_map_io(void) iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); } +static void __init at91rm9200_ioremap_registers(void) +{ +} + static void __init at91rm9200_initialize(void) { at91_arch_reset = at91rm9200_reset; @@ -366,6 +370,7 @@ static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = { struct at91_init_soc __initdata at91rm9200_soc = { .map_io = at91rm9200_map_io, .default_irq_priority = at91rm9200_default_irq_priority, + .ioremap_registers = at91rm9200_ioremap_registers, .register_clocks = at91rm9200_register_clocks, .init = at91rm9200_initialize, }; -- cgit v1.2.3 From faee0cc33c3df3b63314926eecef77d384ae9cd4 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 14 Oct 2011 01:37:09 +0800 Subject: ARM: at91: make smc register base soc independent now sam9_smc_configure will take as first parameter is the SMC id Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Acked-by: Nicolas Ferre --- arch/arm/mach-at91/at91rm9200.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-at91/at91rm9200.c') diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index c67d50c9ea20..c06c14fecba4 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -23,6 +23,7 @@ #include "soc.h" #include "generic.h" #include "clock.h" +#include "sam9_smc.h" static struct map_desc at91rm9200_io_desc[] __initdata = { { -- cgit v1.2.3 From 619d4a4b40f44c1b45263a0e0c9598e3139a1fec Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 13 Nov 2011 13:00:58 +0800 Subject: ARM: at91: switch gpio clock to clkdev Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Cc: Nicolas Ferre --- arch/arm/mach-at91/at91rm9200.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-at91/at91rm9200.c') diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index c06c14fecba4..7470f6381752 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -196,6 +196,10 @@ static struct clk_lookup periph_clocks_lookups[] = { CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), /* fake hclk clock */ CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), + CLKDEV_CON_ID("pioA", &pioA_clk), + CLKDEV_CON_ID("pioB", &pioB_clk), + CLKDEV_CON_ID("pioC", &pioC_clk), + CLKDEV_CON_ID("pioD", &pioD_clk), }; static struct clk_lookup usart_clocks_lookups[] = { @@ -273,19 +277,15 @@ static struct at91_gpio_bank at91rm9200_gpio[] = { { .id = AT91RM9200_ID_PIOA, .regbase = AT91RM9200_BASE_PIOA, - .clock = &pioA_clk, }, { .id = AT91RM9200_ID_PIOB, .regbase = AT91RM9200_BASE_PIOB, - .clock = &pioB_clk, }, { .id = AT91RM9200_ID_PIOC, .regbase = AT91RM9200_BASE_PIOC, - .clock = &pioC_clk, }, { .id = AT91RM9200_ID_PIOD, .regbase = AT91RM9200_BASE_PIOD, - .clock = &pioD_clk, } }; -- cgit v1.2.3 From 1a2d9156b5fc92b40aa2ffbc2fdf6d88bbf74f3a Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Mon, 17 Oct 2011 14:28:38 +0800 Subject: ARM: at91: gpio make struct at91_gpio_bank an initdata this will simplify the switch to the DT and later to the platform_device Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- arch/arm/mach-at91/at91rm9200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-at91/at91rm9200.c') diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 7470f6381752..9163d7d5f76e 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -273,7 +273,7 @@ void __init at91rm9200_set_console_clock(int id) * GPIO * -------------------------------------------------------------------- */ -static struct at91_gpio_bank at91rm9200_gpio[] = { +static struct at91_gpio_bank at91rm9200_gpio[] __initdata = { { .id = AT91RM9200_ID_PIOA, .regbase = AT91RM9200_BASE_PIOA, -- cgit v1.2.3 From 1b2073e7789429e6554e69b307d857d8f46a2e22 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 3 Nov 2011 09:53:29 +0000 Subject: ARM: restart: at91: use new restart hook Rather than using a private function pointer, use the existing arm_pm_restart function pointer instead. We no longer need to enable the I-cache in at91sam9_alt_reset() as the caches will now be on when this function is called. Update the function names to use the 'restart' terminology rather than the 'reboot' terminology. Signed-off-by: Russell King --- arch/arm/mach-at91/at91rm9200.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-at91/at91rm9200.c') diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 713d3bdbd284..430a9fdc3dbf 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -288,7 +288,7 @@ static struct at91_gpio_bank at91rm9200_gpio[] = { } }; -static void at91rm9200_reset(void) +static void at91rm9200_restart(char mode, const char *cmd) { /* * Perform a hardware reset with the use of the Watchdog timer. @@ -309,7 +309,7 @@ static void __init at91rm9200_map_io(void) static void __init at91rm9200_initialize(void) { - at91_arch_reset = at91rm9200_reset; + arm_pm_restart = at91rm9200_restart; at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3) | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5) -- cgit v1.2.3