aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-10-17 02:28:38 -0400
committerArnd Bergmann <arnd@arndb.de>2011-11-29 10:46:13 -0500
commit1a2d9156b5fc92b40aa2ffbc2fdf6d88bbf74f3a (patch)
tree3765189b74f999ca980279dc797412193d6b50ec /arch
parent619d4a4b40f44c1b45263a0e0c9598e3139a1fec (diff)
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 <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-at91/at91cap9.c2
-rw-r--r--arch/arm/mach-at91/at91rm9200.c2
-rw-r--r--arch/arm/mach-at91/at91sam9260.c2
-rw-r--r--arch/arm/mach-at91/at91sam9261.c2
-rw-r--r--arch/arm/mach-at91/at91sam9263.c2
-rw-r--r--arch/arm/mach-at91/at91sam9g45.c2
-rw-r--r--arch/arm/mach-at91/at91sam9rl.c2
-rw-r--r--arch/arm/mach-at91/gpio.c12
8 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm/mach-at91/at91cap9.c b/arch/arm/mach-at91/at91cap9.c
index f7f7e1ea2d1f..506a26c3fff6 100644
--- a/arch/arm/mach-at91/at91cap9.c
+++ b/arch/arm/mach-at91/at91cap9.c
@@ -298,7 +298,7 @@ void __init at91cap9_set_console_clock(int id)
298 * GPIO 298 * GPIO
299 * -------------------------------------------------------------------- */ 299 * -------------------------------------------------------------------- */
300 300
301static struct at91_gpio_bank at91cap9_gpio[] = { 301static struct at91_gpio_bank at91cap9_gpio[] __initdata = {
302 { 302 {
303 .id = AT91CAP9_ID_PIOABCD, 303 .id = AT91CAP9_ID_PIOABCD,
304 .regbase = AT91CAP9_BASE_PIOA, 304 .regbase = AT91CAP9_BASE_PIOA,
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)
273 * GPIO 273 * GPIO
274 * -------------------------------------------------------------------- */ 274 * -------------------------------------------------------------------- */
275 275
276static struct at91_gpio_bank at91rm9200_gpio[] = { 276static struct at91_gpio_bank at91rm9200_gpio[] __initdata = {
277 { 277 {
278 .id = AT91RM9200_ID_PIOA, 278 .id = AT91RM9200_ID_PIOA,
279 .regbase = AT91RM9200_BASE_PIOA, 279 .regbase = AT91RM9200_BASE_PIOA,
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index 943da2100cdc..3f6c6a12480d 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -274,7 +274,7 @@ void __init at91sam9260_set_console_clock(int id)
274 * GPIO 274 * GPIO
275 * -------------------------------------------------------------------- */ 275 * -------------------------------------------------------------------- */
276 276
277static struct at91_gpio_bank at91sam9260_gpio[] = { 277static struct at91_gpio_bank at91sam9260_gpio[] __initdata = {
278 { 278 {
279 .id = AT91SAM9260_ID_PIOA, 279 .id = AT91SAM9260_ID_PIOA,
280 .regbase = AT91SAM9260_BASE_PIOA, 280 .regbase = AT91SAM9260_BASE_PIOA,
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index dd7924c996fc..a0538c5c2520 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -253,7 +253,7 @@ void __init at91sam9261_set_console_clock(int id)
253 * GPIO 253 * GPIO
254 * -------------------------------------------------------------------- */ 254 * -------------------------------------------------------------------- */
255 255
256static struct at91_gpio_bank at91sam9261_gpio[] = { 256static struct at91_gpio_bank at91sam9261_gpio[] __initdata = {
257 { 257 {
258 .id = AT91SAM9261_ID_PIOA, 258 .id = AT91SAM9261_ID_PIOA,
259 .regbase = AT91SAM9261_BASE_PIOA, 259 .regbase = AT91SAM9261_BASE_PIOA,
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index 5a7474174593..5ffbbb024c1e 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -269,7 +269,7 @@ void __init at91sam9263_set_console_clock(int id)
269 * GPIO 269 * GPIO
270 * -------------------------------------------------------------------- */ 270 * -------------------------------------------------------------------- */
271 271
272static struct at91_gpio_bank at91sam9263_gpio[] = { 272static struct at91_gpio_bank at91sam9263_gpio[] __initdata = {
273 { 273 {
274 .id = AT91SAM9263_ID_PIOA, 274 .id = AT91SAM9263_ID_PIOA,
275 .regbase = AT91SAM9263_BASE_PIOA, 275 .regbase = AT91SAM9263_BASE_PIOA,
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 4bb0bf00b3a4..f61eb64e6b39 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -299,7 +299,7 @@ void __init at91sam9g45_set_console_clock(int id)
299 * GPIO 299 * GPIO
300 * -------------------------------------------------------------------- */ 300 * -------------------------------------------------------------------- */
301 301
302static struct at91_gpio_bank at91sam9g45_gpio[] = { 302static struct at91_gpio_bank at91sam9g45_gpio[] __initdata = {
303 { 303 {
304 .id = AT91SAM9G45_ID_PIOA, 304 .id = AT91SAM9G45_ID_PIOA,
305 .regbase = AT91SAM9G45_BASE_PIOA, 305 .regbase = AT91SAM9G45_BASE_PIOA,
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index 60555d4738f8..96247f68b9d2 100644
--- a/arch/arm/mach-at91/at91sam9rl.c
+++ b/arch/arm/mach-at91/at91sam9rl.c
@@ -246,7 +246,7 @@ void __init at91sam9rl_set_console_clock(int id)
246 * GPIO 246 * GPIO
247 * -------------------------------------------------------------------- */ 247 * -------------------------------------------------------------------- */
248 248
249static struct at91_gpio_bank at91sam9rl_gpio[] = { 249static struct at91_gpio_bank at91sam9rl_gpio[] __initdata = {
250 { 250 {
251 .id = AT91SAM9RL_ID_PIOA, 251 .id = AT91SAM9RL_ID_PIOA,
252 .regbase = AT91SAM9RL_BASE_PIOA, 252 .regbase = AT91SAM9RL_BASE_PIOA,
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
index 4059f07eb955..163c724882c2 100644
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -29,7 +29,7 @@
29struct at91_gpio_chip { 29struct at91_gpio_chip {
30 struct gpio_chip chip; 30 struct gpio_chip chip;
31 struct at91_gpio_chip *next; /* Bank sharing same clock */ 31 struct at91_gpio_chip *next; /* Bank sharing same clock */
32 struct at91_gpio_bank *bank; /* Bank definition */ 32 int id; /* ID of register bank */
33 void __iomem *regbase; /* Base of register bank */ 33 void __iomem *regbase; /* Base of register bank */
34 struct clk *clock; /* associated clock */ 34 struct clk *clock; /* associated clock */
35}; 35};
@@ -286,7 +286,7 @@ static int gpio_irq_set_wake(struct irq_data *d, unsigned state)
286 else 286 else
287 wakeups[bank] &= ~mask; 287 wakeups[bank] &= ~mask;
288 288
289 irq_set_irq_wake(gpio_chip[bank].bank->id, state); 289 irq_set_irq_wake(gpio_chip[bank].id, state);
290 290
291 return 0; 291 return 0;
292} 292}
@@ -498,7 +498,7 @@ void __init at91_gpio_irq_setup(void)
498 for (pioc = 0, pin = PIN_BASE, this = gpio_chip, prev = NULL; 498 for (pioc = 0, pin = PIN_BASE, this = gpio_chip, prev = NULL;
499 pioc++ < gpio_banks; 499 pioc++ < gpio_banks;
500 prev = this, this++) { 500 prev = this, this++) {
501 unsigned id = this->bank->id; 501 unsigned id = this->id;
502 unsigned i; 502 unsigned i;
503 503
504 __raw_writel(~0, this->regbase + PIO_IDR); 504 __raw_writel(~0, this->regbase + PIO_IDR);
@@ -613,10 +613,10 @@ void __init at91_gpio_init(struct at91_gpio_bank *data, int nr_banks)
613 for (i = 0; i < nr_banks; i++) { 613 for (i = 0; i < nr_banks; i++) {
614 at91_gpio = &gpio_chip[i]; 614 at91_gpio = &gpio_chip[i];
615 615
616 at91_gpio->bank = &data[i]; 616 at91_gpio->id = data[i].id;
617 at91_gpio->chip.base = PIN_BASE + i * 32; 617 at91_gpio->chip.base = PIN_BASE + i * 32;
618 618
619 at91_gpio->regbase = ioremap(at91_gpio->bank->regbase, 512); 619 at91_gpio->regbase = ioremap(data[i].regbase, 512);
620 if (!at91_gpio->regbase) { 620 if (!at91_gpio->regbase) {
621 pr_err("at91_gpio.%d, failed to map registers, ignoring.\n", i); 621 pr_err("at91_gpio.%d, failed to map registers, ignoring.\n", i);
622 continue; 622 continue;
@@ -632,7 +632,7 @@ void __init at91_gpio_init(struct at91_gpio_bank *data, int nr_banks)
632 clk_enable(at91_gpio->clock); 632 clk_enable(at91_gpio->clock);
633 633
634 /* AT91SAM9263_ID_PIOCDE groups PIOC, PIOD, PIOE */ 634 /* AT91SAM9263_ID_PIOCDE groups PIOC, PIOD, PIOE */
635 if (last && last->bank->id == at91_gpio->bank->id) 635 if (last && last->id == at91_gpio->id)
636 last->next = at91_gpio; 636 last->next = at91_gpio;
637 last = at91_gpio; 637 last = at91_gpio;
638 638