[MIPS] Au1xxx: board specific irq code cleanup

Convert sizeof/sizeof use to use of ARRAY_SIZE macro, and annotate
irqmap structures as __initdata.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
Herbert Valerio Riedel 2006-05-07 15:48:25 +02:00 коммит произвёл Ralf Baechle
Родитель 3c0094426f
Коммит a643d2b574
11 изменённых файлов: 22 добавлений и 22 удалений

Просмотреть файл

@ -55,7 +55,7 @@
* Careful if you change match 2 request! * Careful if you change match 2 request!
* The interrupt handler is called directly from the low level dispatch code. * The interrupt handler is called directly from the low level dispatch code.
*/ */
au1xxx_irq_map_t au1xxx_ic0_map[] = { au1xxx_irq_map_t __initdata au1xxx_ic0_map[] = {
#if defined(CONFIG_SOC_AU1000) #if defined(CONFIG_SOC_AU1000)
{ AU1000_UART0_INT, INTC_INT_HIGH_LEVEL, 0}, { AU1000_UART0_INT, INTC_INT_HIGH_LEVEL, 0},
@ -220,5 +220,5 @@ au1xxx_irq_map_t au1xxx_ic0_map[] = {
}; };
int au1xxx_ic0_nr_irqs = sizeof(au1xxx_ic0_map)/sizeof(au1xxx_irq_map_t); int __initdata au1xxx_ic0_nr_irqs = ARRAY_SIZE(au1xxx_ic0_map);

Просмотреть файл

@ -47,7 +47,7 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/au1000.h> #include <asm/au1000.h>
au1xxx_irq_map_t au1xxx_irq_map[] = { au1xxx_irq_map_t __initdata au1xxx_irq_map[] = {
{ AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0}, { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0},
{ AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 },
@ -57,4 +57,4 @@ au1xxx_irq_map_t au1xxx_irq_map[] = {
{ AU1500_GPIO_207, INTC_INT_LOW_LEVEL, 0 }, { AU1500_GPIO_207, INTC_INT_LOW_LEVEL, 0 },
}; };
int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);

Просмотреть файл

@ -80,7 +80,7 @@ char irq_tab_alchemy[][5] __initdata = {
#endif #endif
au1xxx_irq_map_t au1xxx_irq_map[] = { au1xxx_irq_map_t __initdata au1xxx_irq_map[] = {
#ifndef CONFIG_MIPS_MIRAGE #ifndef CONFIG_MIPS_MIRAGE
#ifdef CONFIG_MIPS_DB1550 #ifdef CONFIG_MIPS_DB1550
@ -101,4 +101,4 @@ au1xxx_irq_map_t au1xxx_irq_map[] = {
}; };
int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);

Просмотреть файл

@ -47,10 +47,10 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/au1000.h> #include <asm/au1000.h>
au1xxx_irq_map_t au1xxx_irq_map[] = { au1xxx_irq_map_t __initdata au1xxx_irq_map[] = {
/* { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, */ /* { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, */
{ AU1000_GPIO_21, INTC_INT_LOW_LEVEL, 0 }, { AU1000_GPIO_21, INTC_INT_LOW_LEVEL, 0 },
}; };
int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);

Просмотреть файл

@ -58,7 +58,7 @@ char irq_tab_alchemy[][5] __initdata = {
[7] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 07 - AdapterD-Slot1 (bottom) */ [7] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 07 - AdapterD-Slot1 (bottom) */
}; };
au1xxx_irq_map_t au1xxx_irq_map[] = { au1xxx_irq_map_t __initdata au1xxx_irq_map[] = {
{ AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0}, { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0},
{ AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 },
{ AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 },
@ -66,4 +66,4 @@ au1xxx_irq_map_t au1xxx_irq_map[] = {
{ AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 },
}; };
int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);

Просмотреть файл

@ -47,8 +47,8 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/mach-au1x00/au1000.h> #include <asm/mach-au1x00/au1000.h>
au1xxx_irq_map_t au1xxx_irq_map[] = { au1xxx_irq_map_t __initdata au1xxx_irq_map[] = {
{ AU1000_GPIO_15, INTC_INT_LOW_LEVEL, 0 }, { AU1000_GPIO_15, INTC_INT_LOW_LEVEL, 0 },
}; };
int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);

Просмотреть файл

@ -47,11 +47,11 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/mach-au1x00/au1000.h> #include <asm/mach-au1x00/au1000.h>
au1xxx_irq_map_t au1xxx_irq_map[] = { au1xxx_irq_map_t __initdata au1xxx_irq_map[] = {
{ AU1000_GPIO_9, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card Fully_Interted# { AU1000_GPIO_9, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card Fully_Interted#
{ AU1000_GPIO_10, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card STSCHG# { AU1000_GPIO_10, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card STSCHG#
{ AU1000_GPIO_11, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card IRQ# { AU1000_GPIO_11, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card IRQ#
{ AU1000_GPIO_13, INTC_INT_LOW_LEVEL, 0 }, // DC_IRQ# { AU1000_GPIO_13, INTC_INT_LOW_LEVEL, 0 }, // DC_IRQ#
}; };
int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);

Просмотреть файл

@ -55,11 +55,11 @@
#define PB1200_INT_END DB1200_INT_END #define PB1200_INT_END DB1200_INT_END
#endif #endif
au1xxx_irq_map_t au1xxx_irq_map[] = { au1xxx_irq_map_t __initdata au1xxx_irq_map[] = {
{ AU1000_GPIO_7, INTC_INT_LOW_LEVEL, 0 }, // This is exteranl interrupt cascade { AU1000_GPIO_7, INTC_INT_LOW_LEVEL, 0 }, // This is exteranl interrupt cascade
}; };
int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);
/* /*
* Support for External interrupts on the PbAu1200 Development platform. * Support for External interrupts on the PbAu1200 Development platform.

Просмотреть файл

@ -52,7 +52,7 @@ char irq_tab_alchemy[][5] __initdata = {
[13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot */ [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot */
}; };
au1xxx_irq_map_t au1xxx_irq_map[] = { au1xxx_irq_map_t __initdata au1xxx_irq_map[] = {
{ AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0}, { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0},
{ AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 },
{ AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 },
@ -60,4 +60,4 @@ au1xxx_irq_map_t au1xxx_irq_map[] = {
{ AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 },
}; };
int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);

Просмотреть файл

@ -52,9 +52,9 @@ char irq_tab_alchemy[][5] __initdata = {
[13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot 1 (right) */ [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot 1 (right) */
}; };
au1xxx_irq_map_t au1xxx_irq_map[] = { au1xxx_irq_map_t __initdata au1xxx_irq_map[] = {
{ AU1000_GPIO_0, INTC_INT_LOW_LEVEL, 0 }, { AU1000_GPIO_0, INTC_INT_LOW_LEVEL, 0 },
{ AU1000_GPIO_1, INTC_INT_LOW_LEVEL, 0 }, { AU1000_GPIO_1, INTC_INT_LOW_LEVEL, 0 },
}; };
int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);

Просмотреть файл

@ -47,7 +47,7 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/au1000.h> #include <asm/au1000.h>
au1xxx_irq_map_t au1xxx_irq_map[] = { au1xxx_irq_map_t __initdata au1xxx_irq_map[] = {
{ AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0}, { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0},
{ AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 },
{ AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 },
@ -63,4 +63,4 @@ au1xxx_irq_map_t au1xxx_irq_map[] = {
{ AU1000_GPIO_5, INTC_INT_LOW_LEVEL, 0 }, { AU1000_GPIO_5, INTC_INT_LOW_LEVEL, 0 },
}; };
int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);