aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/devboards/db1x00/board_setup.c
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@googlemail.com>2009-10-07 14:15:15 -0400
committerRalf Baechle <ralf@linux-mips.org>2010-02-27 06:52:53 -0500
commit788144656b8a862e724a1296e64ab6375eb541ed (patch)
tree96208eed56da25acdf9d923b9d9986e82dcd8944 /arch/mips/alchemy/devboards/db1x00/board_setup.c
parent93e9cd8485b31e5a33f1040bff4d15e65c0b2d19 (diff)
MIPS: Alchemy: Stop IRQ name sharing
Eliminate the sharing of IRQ names among the differenct Alchemy variants. IRQ numbers need no longer be hidden behind a CONFIG_SOC_AU1XXX symbol: step 1 in my quest to make the Alchemy code less reliant on a hardcoded subtype. This patch also renames the GPIO irq number constants. It's really an interrupt line, NOT a GPIO number! Code which relied on certain irq numbers to have the same name across all supported cpu subtypes is changed to determine current cpu subtype at runtime; in some places this isn't possible so a "compat" symbol is used. Run-tested on DB1200. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy/devboards/db1x00/board_setup.c')
-rw-r--r--arch/mips/alchemy/devboards/db1x00/board_setup.c64
1 files changed, 39 insertions, 25 deletions
diff --git a/arch/mips/alchemy/devboards/db1x00/board_setup.c b/arch/mips/alchemy/devboards/db1x00/board_setup.c
index 3b228a282b07..64eb26ffd088 100644
--- a/arch/mips/alchemy/devboards/db1x00/board_setup.c
+++ b/arch/mips/alchemy/devboards/db1x00/board_setup.c
@@ -39,32 +39,32 @@
39 39
40#ifdef CONFIG_MIPS_DB1500 40#ifdef CONFIG_MIPS_DB1500
41char irq_tab_alchemy[][5] __initdata = { 41char irq_tab_alchemy[][5] __initdata = {
42 [12] = { -1, INTA, INTX, INTX, INTX }, /* IDSEL 12 - HPT371 */ 42 [12] = { -1, AU1500_PCI_INTA, 0xff, 0xff, 0xff }, /* IDSEL 12 - HPT371 */
43 [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot */ 43 [13] = { -1, AU1500_PCI_INTA, AU1500_PCI_INTB, AU1500_PCI_INTC, AU1500_PCI_INTD }, /* IDSEL 13 - PCI slot */
44}; 44};
45#endif 45#endif
46 46
47#ifdef CONFIG_MIPS_BOSPORUS 47#ifdef CONFIG_MIPS_BOSPORUS
48char irq_tab_alchemy[][5] __initdata = { 48char irq_tab_alchemy[][5] __initdata = {
49 [11] = { -1, INTA, INTB, INTX, INTX }, /* IDSEL 11 - miniPCI */ 49 [11] = { -1, AU1500_PCI_INTA, AU1500_PCI_INTB, 0xff, 0xff }, /* IDSEL 11 - miniPCI */
50 [12] = { -1, INTA, INTX, INTX, INTX }, /* IDSEL 12 - SN1741 */ 50 [12] = { -1, AU1500_PCI_INTA, 0xff, 0xff, 0xff }, /* IDSEL 12 - SN1741 */
51 [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot */ 51 [13] = { -1, AU1500_PCI_INTA, AU1500_PCI_INTB, AU1500_PCI_INTC, AU1500_PCI_INTD }, /* IDSEL 13 - PCI slot */
52}; 52};
53#endif 53#endif
54 54
55#ifdef CONFIG_MIPS_MIRAGE 55#ifdef CONFIG_MIPS_MIRAGE
56char irq_tab_alchemy[][5] __initdata = { 56char irq_tab_alchemy[][5] __initdata = {
57 [11] = { -1, INTD, INTX, INTX, INTX }, /* IDSEL 11 - SMI VGX */ 57 [11] = { -1, AU1500_PCI_INTD, 0xff, 0xff, 0xff }, /* IDSEL 11 - SMI VGX */
58 [12] = { -1, INTX, INTX, INTC, INTX }, /* IDSEL 12 - PNX1300 */ 58 [12] = { -1, 0xff, 0xff, AU1500_PCI_INTC, 0xff }, /* IDSEL 12 - PNX1300 */
59 [13] = { -1, INTA, INTB, INTX, INTX }, /* IDSEL 13 - miniPCI */ 59 [13] = { -1, AU1500_PCI_INTA, AU1500_PCI_INTB, 0xff, 0xff }, /* IDSEL 13 - miniPCI */
60}; 60};
61#endif 61#endif
62 62
63#ifdef CONFIG_MIPS_DB1550 63#ifdef CONFIG_MIPS_DB1550
64char irq_tab_alchemy[][5] __initdata = { 64char irq_tab_alchemy[][5] __initdata = {
65 [11] = { -1, INTC, INTX, INTX, INTX }, /* IDSEL 11 - on-board HPT371 */ 65 [11] = { -1, AU1550_PCI_INTC, 0xff, 0xff, 0xff }, /* IDSEL 11 - on-board HPT371 */
66 [12] = { -1, INTB, INTC, INTD, INTA }, /* IDSEL 12 - PCI slot 2 (left) */ 66 [12] = { -1, AU1550_PCI_INTB, AU1550_PCI_INTC, AU1550_PCI_INTD, AU1550_PCI_INTA }, /* IDSEL 12 - PCI slot 2 (left) */
67 [13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot 1 (right) */ 67 [13] = { -1, AU1550_PCI_INTA, AU1550_PCI_INTB, AU1550_PCI_INTC, AU1550_PCI_INTD }, /* IDSEL 13 - PCI slot 1 (right) */
68}; 68};
69#endif 69#endif
70 70
@@ -185,21 +185,35 @@ void __init board_setup(void)
185static int __init db1x00_init_irq(void) 185static int __init db1x00_init_irq(void)
186{ 186{
187#if defined(CONFIG_MIPS_MIRAGE) 187#if defined(CONFIG_MIPS_MIRAGE)
188 set_irq_type(AU1000_GPIO_7, IRQF_TRIGGER_RISING); /* TS pendown */ 188 set_irq_type(AU1500_GPIO7_INT, IRQF_TRIGGER_RISING); /* TS pendown */
189#elif defined(CONFIG_MIPS_DB1550) 189#elif defined(CONFIG_MIPS_DB1550)
190 set_irq_type(AU1000_GPIO_0, IRQF_TRIGGER_LOW); /* CD0# */ 190 set_irq_type(AU1550_GPIO0_INT, IRQF_TRIGGER_LOW); /* CD0# */
191 set_irq_type(AU1000_GPIO_1, IRQF_TRIGGER_LOW); /* CD1# */ 191 set_irq_type(AU1550_GPIO1_INT, IRQF_TRIGGER_LOW); /* CD1# */
192 set_irq_type(AU1000_GPIO_3, IRQF_TRIGGER_LOW); /* CARD0# */ 192 set_irq_type(AU1550_GPIO3_INT, IRQF_TRIGGER_LOW); /* CARD0# */
193 set_irq_type(AU1000_GPIO_5, IRQF_TRIGGER_LOW); /* CARD1# */ 193 set_irq_type(AU1550_GPIO5_INT, IRQF_TRIGGER_LOW); /* CARD1# */
194 set_irq_type(AU1000_GPIO_21, IRQF_TRIGGER_LOW); /* STSCHG0# */ 194 set_irq_type(AU1550_GPIO21_INT, IRQF_TRIGGER_LOW); /* STSCHG0# */
195 set_irq_type(AU1000_GPIO_22, IRQF_TRIGGER_LOW); /* STSCHG1# */ 195 set_irq_type(AU1550_GPIO22_INT, IRQF_TRIGGER_LOW); /* STSCHG1# */
196#else 196#elif defined(CONFIG_MIPS_DB1500)
197 set_irq_type(AU1000_GPIO_0, IRQF_TRIGGER_LOW); /* CD0# */ 197 set_irq_type(AU1500_GPIO0_INT, IRQF_TRIGGER_LOW); /* CD0# */
198 set_irq_type(AU1000_GPIO_3, IRQF_TRIGGER_LOW); /* CD1# */ 198 set_irq_type(AU1500_GPIO3_INT, IRQF_TRIGGER_LOW); /* CD1# */
199 set_irq_type(AU1000_GPIO_2, IRQF_TRIGGER_LOW); /* CARD0# */ 199 set_irq_type(AU1500_GPIO2_INT, IRQF_TRIGGER_LOW); /* CARD0# */
200 set_irq_type(AU1000_GPIO_5, IRQF_TRIGGER_LOW); /* CARD1# */ 200 set_irq_type(AU1500_GPIO5_INT, IRQF_TRIGGER_LOW); /* CARD1# */
201 set_irq_type(AU1000_GPIO_1, IRQF_TRIGGER_LOW); /* STSCHG0# */ 201 set_irq_type(AU1500_GPIO1_INT, IRQF_TRIGGER_LOW); /* STSCHG0# */
202 set_irq_type(AU1000_GPIO_4, IRQF_TRIGGER_LOW); /* STSCHG1# */ 202 set_irq_type(AU1500_GPIO4_INT, IRQF_TRIGGER_LOW); /* STSCHG1# */
203#elif defined(CONFIG_MIPS_DB1100)
204 set_irq_type(AU1100_GPIO0_INT, IRQF_TRIGGER_LOW); /* CD0# */
205 set_irq_type(AU1100_GPIO3_INT, IRQF_TRIGGER_LOW); /* CD1# */
206 set_irq_type(AU1100_GPIO2_INT, IRQF_TRIGGER_LOW); /* CARD0# */
207 set_irq_type(AU1100_GPIO5_INT, IRQF_TRIGGER_LOW); /* CARD1# */
208 set_irq_type(AU1100_GPIO1_INT, IRQF_TRIGGER_LOW); /* STSCHG0# */
209 set_irq_type(AU1100_GPIO4_INT, IRQF_TRIGGER_LOW); /* STSCHG1# */
210#elif defined(CONFIG_MIPS_DB1000)
211 set_irq_type(AU1000_GPIO0_INT, IRQF_TRIGGER_LOW); /* CD0# */
212 set_irq_type(AU1000_GPIO3_INT, IRQF_TRIGGER_LOW); /* CD1# */
213 set_irq_type(AU1000_GPIO2_INT, IRQF_TRIGGER_LOW); /* CARD0# */
214 set_irq_type(AU1000_GPIO5_INT, IRQF_TRIGGER_LOW); /* CARD1# */
215 set_irq_type(AU1000_GPIO1_INT, IRQF_TRIGGER_LOW); /* STSCHG0# */
216 set_irq_type(AU1000_GPIO4_INT, IRQF_TRIGGER_LOW); /* STSCHG1# */
203#endif 217#endif
204 return 0; 218 return 0;
205} 219}