diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-09-16 11:37:50 -0400 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-11-28 09:50:37 -0500 |
commit | 80e91cb8023fbc07b2410c4ce5a2da12fbcebca4 (patch) | |
tree | c83ecd72567662ee3e59e35751c52b0f2293aa47 /arch/arm/mach-at91/gpio.c | |
parent | 2f5893cf42ca10a1eb73bc527e2198847f4d0a79 (diff) |
ARM: at91: make gpio register base soc independant
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Diffstat (limited to 'arch/arm/mach-at91/gpio.c')
-rw-r--r-- | arch/arm/mach-at91/gpio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c index 224e9e2f8674..cedb753f4cad 100644 --- a/arch/arm/mach-at91/gpio.c +++ b/arch/arm/mach-at91/gpio.c | |||
@@ -614,8 +614,12 @@ void __init at91_gpio_init(struct at91_gpio_bank *data, int nr_banks) | |||
614 | 614 | ||
615 | at91_gpio->bank = &data[i]; | 615 | at91_gpio->bank = &data[i]; |
616 | at91_gpio->chip.base = PIN_BASE + i * 32; | 616 | at91_gpio->chip.base = PIN_BASE + i * 32; |
617 | at91_gpio->regbase = at91_gpio->bank->offset + | 617 | |
618 | (void __iomem *)AT91_VA_BASE_SYS; | 618 | at91_gpio->regbase = ioremap(at91_gpio->bank->regbase, 512); |
619 | if (!at91_gpio->regbase) { | ||
620 | pr_err("at91_gpio.%d, failed to map registers, ignoring.\n", i); | ||
621 | continue; | ||
622 | } | ||
619 | 623 | ||
620 | /* enable PIO controller's clock */ | 624 | /* enable PIO controller's clock */ |
621 | clk_enable(at91_gpio->bank->clock); | 625 | clk_enable(at91_gpio->bank->clock); |