aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2011-12-08 09:35:22 -0500
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-03-01 07:29:02 -0500
commit7530cd9246f1ff5c8ced20aaee3cb55eacb7d33c (patch)
treedb3400ec2c5167cebc03d2517928074acd9ca74d /arch/arm/mach-at91
parentb134ce854ad63421bd5c7d34623a1337d525a435 (diff)
ARM: at91/gpio: remove the static specification of gpio_chip.base
This value is determined at runtime using device tree or platform data information. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/gpio.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
index e8f5831e573d..ecf6bbb9103a 100644
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -51,7 +51,7 @@ static int at91_gpiolib_direction_input(struct gpio_chip *chip,
51 unsigned offset); 51 unsigned offset);
52static int at91_gpiolib_to_irq(struct gpio_chip *chip, unsigned offset); 52static int at91_gpiolib_to_irq(struct gpio_chip *chip, unsigned offset);
53 53
54#define AT91_GPIO_CHIP(name, base_gpio, nr_gpio) \ 54#define AT91_GPIO_CHIP(name, nr_gpio) \
55 { \ 55 { \
56 .chip = { \ 56 .chip = { \
57 .label = name, \ 57 .label = name, \
@@ -60,18 +60,17 @@ static int at91_gpiolib_to_irq(struct gpio_chip *chip, unsigned offset);
60 .get = at91_gpiolib_get, \ 60 .get = at91_gpiolib_get, \
61 .set = at91_gpiolib_set, \ 61 .set = at91_gpiolib_set, \
62 .dbg_show = at91_gpiolib_dbg_show, \ 62 .dbg_show = at91_gpiolib_dbg_show, \
63 .base = base_gpio, \
64 .to_irq = at91_gpiolib_to_irq, \ 63 .to_irq = at91_gpiolib_to_irq, \
65 .ngpio = nr_gpio, \ 64 .ngpio = nr_gpio, \
66 }, \ 65 }, \
67 } 66 }
68 67
69static struct at91_gpio_chip gpio_chip[] = { 68static struct at91_gpio_chip gpio_chip[] = {
70 AT91_GPIO_CHIP("pioA", 0x00, 32), 69 AT91_GPIO_CHIP("pioA", 32),
71 AT91_GPIO_CHIP("pioB", 0x20, 32), 70 AT91_GPIO_CHIP("pioB", 32),
72 AT91_GPIO_CHIP("pioC", 0x40, 32), 71 AT91_GPIO_CHIP("pioC", 32),
73 AT91_GPIO_CHIP("pioD", 0x60, 32), 72 AT91_GPIO_CHIP("pioD", 32),
74 AT91_GPIO_CHIP("pioE", 0x80, 32), 73 AT91_GPIO_CHIP("pioE", 32),
75}; 74};
76 75
77static int gpio_banks; 76static int gpio_banks;