diff options
author | Florian Fainelli <florian.fainelli@int-evry.fr> | 2007-03-02 16:07:48 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-03-04 14:02:44 -0500 |
commit | baa545fddd752f46ced034bc3d95778649b67c2d (patch) | |
tree | 06bbed0ec063477368e8befba2781ceace3b714c /arch/mips/au1000 | |
parent | 6fff989157aa0506520637277ec4653306689c25 (diff) |
[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>
Diffstat (limited to 'arch/mips/au1000')
-rw-r--r-- | arch/mips/au1000/mtx-1/board_setup.c | 29 | ||||
-rw-r--r-- | arch/mips/au1000/mtx-1/irqmap.c | 2 |
2 files changed, 30 insertions, 1 deletions
diff --git a/arch/mips/au1000/mtx-1/board_setup.c b/arch/mips/au1000/mtx-1/board_setup.c index 7a3cf72c51aa..7bc5af8917da 100644 --- a/arch/mips/au1000/mtx-1/board_setup.c +++ b/arch/mips/au1000/mtx-1/board_setup.c | |||
@@ -43,6 +43,9 @@ | |||
43 | #include <asm/pgtable.h> | 43 | #include <asm/pgtable.h> |
44 | #include <asm/mach-au1x00/au1000.h> | 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 | void board_reset (void) | 49 | void board_reset (void) |
47 | { | 50 | { |
48 | /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */ | 51 | /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */ |
@@ -72,11 +75,37 @@ void __init board_setup(void) | |||
72 | au_writel( 0xFFFFFFFF, SYS_TRIOUTCLR ); | 75 | au_writel( 0xFFFFFFFF, SYS_TRIOUTCLR ); |
73 | au_writel( 0x00000001, SYS_OUTPUTCLR ); // set M66EN (PCI 66MHz) to OFF | 76 | au_writel( 0x00000001, SYS_OUTPUTCLR ); // set M66EN (PCI 66MHz) to OFF |
74 | au_writel( 0x00000008, SYS_OUTPUTSET ); // set PCI CLKRUN# to OFF | 77 | au_writel( 0x00000008, SYS_OUTPUTSET ); // set PCI CLKRUN# to OFF |
78 | au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON | ||
75 | au_writel( 0x00000020, SYS_OUTPUTCLR ); // set eth PHY TX_ER to OFF | 79 | au_writel( 0x00000020, SYS_OUTPUTCLR ); // set eth PHY TX_ER to OFF |
76 | 80 | ||
77 | // enable LED and set it to green | 81 | // enable LED and set it to green |
78 | au_writel( au_readl(GPIO2_DIR) | 0x1800, GPIO2_DIR ); | 82 | au_writel( au_readl(GPIO2_DIR) | 0x1800, GPIO2_DIR ); |
79 | au_writel( 0x18000800, GPIO2_OUTPUT ); | 83 | au_writel( 0x18000800, GPIO2_OUTPUT ); |
80 | 84 | ||
85 | board_pci_idsel = mtx1_pci_idsel; | ||
86 | |||
81 | printk("4G Systems MTX-1 Board\n"); | 87 | printk("4G Systems MTX-1 Board\n"); |
82 | } | 88 | } |
89 | |||
90 | int | ||
91 | mtx1_pci_idsel(unsigned int devsel, int assert) | ||
92 | { | ||
93 | #define MTX_IDSEL_ONLY_0_AND_3 0 | ||
94 | #if MTX_IDSEL_ONLY_0_AND_3 | ||
95 | if (devsel != 0 && devsel != 3) { | ||
96 | printk("*** not 0 or 3\n"); | ||
97 | return 0; | ||
98 | } | ||
99 | #endif | ||
100 | |||
101 | if (assert && devsel != 0) { | ||
102 | // supress signal to cardbus | ||
103 | au_writel( 0x00000002, SYS_OUTPUTCLR ); // set EXT_IO3 OFF | ||
104 | } | ||
105 | else { | ||
106 | au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON | ||
107 | } | ||
108 | au_sync_udelay(1); | ||
109 | return 1; | ||
110 | } | ||
111 | |||
diff --git a/arch/mips/au1000/mtx-1/irqmap.c b/arch/mips/au1000/mtx-1/irqmap.c index 4693a4eb2b82..a4fa0f227e42 100644 --- a/arch/mips/au1000/mtx-1/irqmap.c +++ b/arch/mips/au1000/mtx-1/irqmap.c | |||
@@ -48,7 +48,7 @@ | |||
48 | #include <asm/mach-au1x00/au1000.h> | 48 | #include <asm/mach-au1x00/au1000.h> |
49 | 49 | ||
50 | char irq_tab_alchemy[][5] __initdata = { | 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 | [1] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 01 - AdapterA-Slot1 (bottom) */ | 52 | [1] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 01 - AdapterA-Slot1 (bottom) */ |
53 | [2] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 02 - AdapterB-Slot0 (top) */ | 53 | [2] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 02 - AdapterB-Slot0 (top) */ |
54 | [3] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 03 - AdapterB-Slot1 (bottom) */ | 54 | [3] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 03 - AdapterB-Slot1 (bottom) */ |