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>
This commit is contained in:
@@ -614,8 +614,12 @@ void __init at91_gpio_init(struct at91_gpio_bank *data, int nr_banks)
|
||||
|
||||
at91_gpio->bank = &data[i];
|
||||
at91_gpio->chip.base = PIN_BASE + i * 32;
|
||||
at91_gpio->regbase = at91_gpio->bank->offset +
|
||||
(void __iomem *)AT91_VA_BASE_SYS;
|
||||
|
||||
at91_gpio->regbase = ioremap(at91_gpio->bank->regbase, 512);
|
||||
if (!at91_gpio->regbase) {
|
||||
pr_err("at91_gpio.%d, failed to map registers, ignoring.\n", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* enable PIO controller's clock */
|
||||
clk_enable(at91_gpio->bank->clock);
|
||||
|
Reference in New Issue
Block a user