diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2009-10-04 08:55:28 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-02-27 06:52:51 -0500 |
commit | 27dd65ac9afabc8e67ab73f7c2f575eddbb47167 (patch) | |
tree | d8da508ceff4f2e69f8cc621a8bdebe83fef02e8 /arch/mips/alchemy/devboards/db1x00 | |
parent | 66213b3ccfc770704025ce9465fa3aaedde21b55 (diff) |
MIPS: Alchemy: devboards: wire up new PCMCIA driver.
Register the PCMCIA driver on all boards supported by it,
get rid of now-unused pcmcia macros in the board headers
(and subsequently empty pb1100/pb1500 ones).
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')
-rw-r--r-- | arch/mips/alchemy/devboards/db1x00/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/db1x00/board_setup.c | 4 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/db1x00/platform.c | 84 |
3 files changed, 89 insertions, 1 deletions
diff --git a/arch/mips/alchemy/devboards/db1x00/Makefile b/arch/mips/alchemy/devboards/db1x00/Makefile index ce48d58920d0..613c0c0c8be9 100644 --- a/arch/mips/alchemy/devboards/db1x00/Makefile +++ b/arch/mips/alchemy/devboards/db1x00/Makefile | |||
@@ -5,4 +5,4 @@ | |||
5 | # Makefile for the Alchemy Semiconductor DBAu1xx0 boards. | 5 | # Makefile for the Alchemy Semiconductor DBAu1xx0 boards. |
6 | # | 6 | # |
7 | 7 | ||
8 | obj-y := board_setup.o | 8 | obj-y := board_setup.o platform.o |
diff --git a/arch/mips/alchemy/devboards/db1x00/board_setup.c b/arch/mips/alchemy/devboards/db1x00/board_setup.c index 9a619aeeaf60..3b228a282b07 100644 --- a/arch/mips/alchemy/devboards/db1x00/board_setup.c +++ b/arch/mips/alchemy/devboards/db1x00/board_setup.c | |||
@@ -187,8 +187,12 @@ static int __init db1x00_init_irq(void) | |||
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(AU1000_GPIO_7, 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# */ | ||
191 | set_irq_type(AU1000_GPIO_1, IRQF_TRIGGER_LOW); /* CD1# */ | ||
190 | set_irq_type(AU1000_GPIO_3, IRQF_TRIGGER_LOW); /* CARD0# */ | 192 | set_irq_type(AU1000_GPIO_3, IRQF_TRIGGER_LOW); /* CARD0# */ |
191 | set_irq_type(AU1000_GPIO_5, IRQF_TRIGGER_LOW); /* CARD1# */ | 193 | set_irq_type(AU1000_GPIO_5, IRQF_TRIGGER_LOW); /* CARD1# */ |
194 | set_irq_type(AU1000_GPIO_21, IRQF_TRIGGER_LOW); /* STSCHG0# */ | ||
195 | set_irq_type(AU1000_GPIO_22, IRQF_TRIGGER_LOW); /* STSCHG1# */ | ||
192 | #else | 196 | #else |
193 | set_irq_type(AU1000_GPIO_0, IRQF_TRIGGER_LOW); /* CD0# */ | 197 | set_irq_type(AU1000_GPIO_0, IRQF_TRIGGER_LOW); /* CD0# */ |
194 | set_irq_type(AU1000_GPIO_3, IRQF_TRIGGER_LOW); /* CD1# */ | 198 | set_irq_type(AU1000_GPIO_3, IRQF_TRIGGER_LOW); /* CD1# */ |
diff --git a/arch/mips/alchemy/devboards/db1x00/platform.c b/arch/mips/alchemy/devboards/db1x00/platform.c new file mode 100644 index 000000000000..b762b790512a --- /dev/null +++ b/arch/mips/alchemy/devboards/db1x00/platform.c | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * DBAu1xxx board platform device registration | ||
3 | * | ||
4 | * Copyright (C) 2009 Manuel Lauss | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/init.h> | ||
22 | #include <linux/platform_device.h> | ||
23 | |||
24 | #include <asm/mach-au1x00/au1xxx.h> | ||
25 | #include "../platform.h" | ||
26 | |||
27 | #if defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || \ | ||
28 | defined(CONFIG_MIPS_DB1500) || defined(CONFIG_MIPS_DB1550) | ||
29 | #define DB1XXX_HAS_PCMCIA | ||
30 | #endif | ||
31 | |||
32 | /* DB1xxx PCMCIA interrupt sources: | ||
33 | * CD0/1 GPIO0/3 | ||
34 | * STSCHG0/1 GPIO1/4 | ||
35 | * CARD0/1 GPIO2/5 | ||
36 | * Db1550: 0/1, 21/22, 3/5 | ||
37 | */ | ||
38 | #ifndef CONFIG_MIPS_DB1550 | ||
39 | /* Db1000, Db1100, Db1500 */ | ||
40 | #define DB1XXX_PCMCIA_CD0 AU1000_GPIO_0 | ||
41 | #define DB1XXX_PCMCIA_STSCHG0 AU1000_GPIO_1 | ||
42 | #define DB1XXX_PCMCIA_CARD0 AU1000_GPIO_2 | ||
43 | #define DB1XXX_PCMCIA_CD1 AU1000_GPIO_3 | ||
44 | #define DB1XXX_PCMCIA_STSCHG1 AU1000_GPIO_4 | ||
45 | #define DB1XXX_PCMCIA_CARD1 AU1000_GPIO_5 | ||
46 | #else | ||
47 | #define DB1XXX_PCMCIA_CD0 AU1000_GPIO_0 | ||
48 | #define DB1XXX_PCMCIA_STSCHG0 AU1500_GPIO_21 | ||
49 | #define DB1XXX_PCMCIA_CARD0 AU1000_GPIO_3 | ||
50 | #define DB1XXX_PCMCIA_CD1 AU1000_GPIO_1 | ||
51 | #define DB1XXX_PCMCIA_STSCHG1 AU1500_GPIO_22 | ||
52 | #define DB1XXX_PCMCIA_CARD1 AU1000_GPIO_5 | ||
53 | #endif | ||
54 | |||
55 | static int __init db1xxx_dev_init(void) | ||
56 | { | ||
57 | #ifdef DB1XXX_HAS_PCMCIA | ||
58 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS, | ||
59 | PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1, | ||
60 | PCMCIA_MEM_PSEUDO_PHYS, | ||
61 | PCMCIA_MEM_PSEUDO_PHYS + 0x00040000 - 1, | ||
62 | PCMCIA_IO_PSEUDO_PHYS, | ||
63 | PCMCIA_IO_PSEUDO_PHYS + 0x00001000 - 1, | ||
64 | DB1XXX_PCMCIA_CARD0, | ||
65 | DB1XXX_PCMCIA_CD0, | ||
66 | /*DB1XXX_PCMCIA_STSCHG0*/0, | ||
67 | 0, | ||
68 | 0); | ||
69 | |||
70 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS + 0x00400000, | ||
71 | PCMCIA_ATTR_PSEUDO_PHYS + 0x00440000 - 1, | ||
72 | PCMCIA_MEM_PSEUDO_PHYS + 0x00400000, | ||
73 | PCMCIA_MEM_PSEUDO_PHYS + 0x00440000 - 1, | ||
74 | PCMCIA_IO_PSEUDO_PHYS + 0x00400000, | ||
75 | PCMCIA_IO_PSEUDO_PHYS + 0x00401000 - 1, | ||
76 | DB1XXX_PCMCIA_CARD1, | ||
77 | DB1XXX_PCMCIA_CD1, | ||
78 | /*DB1XXX_PCMCIA_STSCHG1*/0, | ||
79 | 0, | ||
80 | 1); | ||
81 | #endif | ||
82 | return 0; | ||
83 | } | ||
84 | device_initcall(db1xxx_dev_init); | ||