[MIPS] MTX1: add idsel cardbus ressources

Adds cardbus ressources for MTX1 boards which have a PCMCIA controller.

Signed-off-by: Florian Fainelli <florian.fainelli@int-evry.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by Florian Fainelli and committed by Ralf Baechle baa545fd 6fff9891

+30 -1
+29
arch/mips/au1000/mtx-1/board_setup.c
··· 43 43 #include <asm/pgtable.h> 44 44 #include <asm/mach-au1x00/au1000.h> 45 45 46 + extern int (*board_pci_idsel)(unsigned int devsel, int assert); 47 + int mtx1_pci_idsel(unsigned int devsel, int assert); 48 + 46 49 void board_reset (void) 47 50 { 48 51 /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */ ··· 75 72 au_writel( 0xFFFFFFFF, SYS_TRIOUTCLR ); 76 73 au_writel( 0x00000001, SYS_OUTPUTCLR ); // set M66EN (PCI 66MHz) to OFF 77 74 au_writel( 0x00000008, SYS_OUTPUTSET ); // set PCI CLKRUN# to OFF 75 + au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON 78 76 au_writel( 0x00000020, SYS_OUTPUTCLR ); // set eth PHY TX_ER to OFF 79 77 80 78 // enable LED and set it to green 81 79 au_writel( au_readl(GPIO2_DIR) | 0x1800, GPIO2_DIR ); 82 80 au_writel( 0x18000800, GPIO2_OUTPUT ); 83 81 82 + board_pci_idsel = mtx1_pci_idsel; 83 + 84 84 printk("4G Systems MTX-1 Board\n"); 85 85 } 86 + 87 + int 88 + mtx1_pci_idsel(unsigned int devsel, int assert) 89 + { 90 + #define MTX_IDSEL_ONLY_0_AND_3 0 91 + #if MTX_IDSEL_ONLY_0_AND_3 92 + if (devsel != 0 && devsel != 3) { 93 + printk("*** not 0 or 3\n"); 94 + return 0; 95 + } 96 + #endif 97 + 98 + if (assert && devsel != 0) { 99 + // supress signal to cardbus 100 + au_writel( 0x00000002, SYS_OUTPUTCLR ); // set EXT_IO3 OFF 101 + } 102 + else { 103 + au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON 104 + } 105 + au_sync_udelay(1); 106 + return 1; 107 + } 108 +
+1 -1
arch/mips/au1000/mtx-1/irqmap.c
··· 48 48 #include <asm/mach-au1x00/au1000.h> 49 49 50 50 char irq_tab_alchemy[][5] __initdata = { 51 - [0] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 00 - AdapterA-Slot0 (top) */ 51 + [0] = { -1, INTA, INTA, INTX, INTX}, /* IDSEL 00 - AdapterA-Slot0 (top) */ 52 52 [1] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 01 - AdapterA-Slot1 (bottom) */ 53 53 [2] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 02 - AdapterB-Slot0 (top) */ 54 54 [3] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 03 - AdapterB-Slot1 (bottom) */