]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: at91: gpio make struct at91_gpio_bank an initdata
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Mon, 17 Oct 2011 06:28:38 +0000 (14:28 +0800)
committerArnd Bergmann <arnd@arndb.de>
Tue, 29 Nov 2011 15:46:13 +0000 (15:46 +0000)
this will simplify the switch to the DT and later to the platform_device

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
arch/arm/mach-at91/at91cap9.c
arch/arm/mach-at91/at91rm9200.c
arch/arm/mach-at91/at91sam9260.c
arch/arm/mach-at91/at91sam9261.c
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-at91/at91sam9rl.c
arch/arm/mach-at91/gpio.c

index f7f7e1ea2d1f907f3764bf6b03982e7518926c94..506a26c3fff63eeae2673226133489642f64ede9 100644 (file)
@@ -298,7 +298,7 @@ void __init at91cap9_set_console_clock(int id)
  *  GPIO
  * -------------------------------------------------------------------- */
 
-static struct at91_gpio_bank at91cap9_gpio[] = {
+static struct at91_gpio_bank at91cap9_gpio[] __initdata = {
        {
                .id             = AT91CAP9_ID_PIOABCD,
                .regbase        = AT91CAP9_BASE_PIOA,
index 7470f6381752fe1055052bde4c337fdb57103def..9163d7d5f76e5ff2e7a311994b9da52254ce7961 100644 (file)
@@ -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,
index 943da2100cdc08ed8f91ae78d2cc12374100dc05..3f6c6a12480d910446acb3129f5bc521f9fba207 100644 (file)
@@ -274,7 +274,7 @@ void __init at91sam9260_set_console_clock(int id)
  *  GPIO
  * -------------------------------------------------------------------- */
 
-static struct at91_gpio_bank at91sam9260_gpio[] = {
+static struct at91_gpio_bank at91sam9260_gpio[] __initdata = {
        {
                .id             = AT91SAM9260_ID_PIOA,
                .regbase        = AT91SAM9260_BASE_PIOA,
index dd7924c996fcc5e4863d09f8a2688788f758efac..a0538c5c252029f3c30392eeab9e9608740f767b 100644 (file)
@@ -253,7 +253,7 @@ void __init at91sam9261_set_console_clock(int id)
  *  GPIO
  * -------------------------------------------------------------------- */
 
-static struct at91_gpio_bank at91sam9261_gpio[] = {
+static struct at91_gpio_bank at91sam9261_gpio[] __initdata = {
        {
                .id             = AT91SAM9261_ID_PIOA,
                .regbase        = AT91SAM9261_BASE_PIOA,
index 5a74741745930c68ab51ccb15e6685ee50c9f6ec..5ffbbb024c1e385d2ed966abbb3fc4700d2aeb22 100644 (file)
@@ -269,7 +269,7 @@ void __init at91sam9263_set_console_clock(int id)
  *  GPIO
  * -------------------------------------------------------------------- */
 
-static struct at91_gpio_bank at91sam9263_gpio[] = {
+static struct at91_gpio_bank at91sam9263_gpio[] __initdata = {
        {
                .id             = AT91SAM9263_ID_PIOA,
                .regbase        = AT91SAM9263_BASE_PIOA,
index 4bb0bf00b3a41a9e8e54f219669d65b9e3b6cb8c..f61eb64e6b3992d1dac8204873374858c0fcba7c 100644 (file)
@@ -299,7 +299,7 @@ void __init at91sam9g45_set_console_clock(int id)
  *  GPIO
  * -------------------------------------------------------------------- */
 
-static struct at91_gpio_bank at91sam9g45_gpio[] = {
+static struct at91_gpio_bank at91sam9g45_gpio[] __initdata = {
        {
                .id             = AT91SAM9G45_ID_PIOA,
                .regbase        = AT91SAM9G45_BASE_PIOA,
index 60555d4738f8b7996ce6d6882513bfa58eeddfc9..96247f68b9d242745645c8a6b1acde694f1078b5 100644 (file)
@@ -246,7 +246,7 @@ void __init at91sam9rl_set_console_clock(int id)
  *  GPIO
  * -------------------------------------------------------------------- */
 
-static struct at91_gpio_bank at91sam9rl_gpio[] = {
+static struct at91_gpio_bank at91sam9rl_gpio[] __initdata = {
        {
                .id             = AT91SAM9RL_ID_PIOA,
                .regbase        = AT91SAM9RL_BASE_PIOA,
index 4059f07eb95549ce911ba9c11967534cd9175362..163c724882c2b1e1f73f94a5908ce670ca4e2d9f 100644 (file)
@@ -29,7 +29,7 @@
 struct at91_gpio_chip {
        struct gpio_chip        chip;
        struct at91_gpio_chip   *next;          /* Bank sharing same clock */
-       struct at91_gpio_bank   *bank;          /* Bank definition */
+       int                     id;             /* ID of register bank */
        void __iomem            *regbase;       /* Base of register bank */
        struct clk              *clock;         /* associated clock */
 };
@@ -286,7 +286,7 @@ static int gpio_irq_set_wake(struct irq_data *d, unsigned state)
        else
                wakeups[bank] &= ~mask;
 
-       irq_set_irq_wake(gpio_chip[bank].bank->id, state);
+       irq_set_irq_wake(gpio_chip[bank].id, state);
 
        return 0;
 }
@@ -498,7 +498,7 @@ void __init at91_gpio_irq_setup(void)
        for (pioc = 0, pin = PIN_BASE, this = gpio_chip, prev = NULL;
                        pioc++ < gpio_banks;
                        prev = this, this++) {
-               unsigned        id = this->bank->id;
+               unsigned        id = this->id;
                unsigned        i;
 
                __raw_writel(~0, this->regbase + PIO_IDR);
@@ -613,10 +613,10 @@ void __init at91_gpio_init(struct at91_gpio_bank *data, int nr_banks)
        for (i = 0; i < nr_banks; i++) {
                at91_gpio = &gpio_chip[i];
 
-               at91_gpio->bank = &data[i];
+               at91_gpio->id = data[i].id;
                at91_gpio->chip.base = PIN_BASE + i * 32;
 
-               at91_gpio->regbase = ioremap(at91_gpio->bank->regbase, 512);
+               at91_gpio->regbase = ioremap(data[i].regbase, 512);
                if (!at91_gpio->regbase) {
                        pr_err("at91_gpio.%d, failed to map registers, ignoring.\n", i);
                        continue;
@@ -632,7 +632,7 @@ void __init at91_gpio_init(struct at91_gpio_bank *data, int nr_banks)
                clk_enable(at91_gpio->clock);
 
                /* AT91SAM9263_ID_PIOCDE groups PIOC, PIOD, PIOE */
-               if (last && last->bank->id == at91_gpio->bank->id)
+               if (last && last->id == at91_gpio->id)
                        last->next = at91_gpio;
                last = at91_gpio;