diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2009-10-04 08:55:27 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-02-27 06:52:51 -0500 |
commit | 66213b3ccfc770704025ce9465fa3aaedde21b55 (patch) | |
tree | 2f74c1819b371926952c9c5b8f98ae808588e728 /arch/mips | |
parent | 7e50b2b741bb4f9dbddc9f56972ef82a7d4b33ed (diff) |
MIPS: PCMCIA: new socket driver for Au1000 demoboards.
New PCMCIA socket driver for all Db/Pb1xxx boards (except Pb1000),
which replaces au1000_db1x00.c and (most of) au1000_pb1x00.c.
Notable improvements:
- supports Db1000, DB/PB1100/1500/1550/1200.
- support for carddetect and statuschange IRQs.
- pcmcia socket mem/io/attr areas and irqs passed through
platform resource information.
- doesn't freeze system during card insertion/ejection like
the one it replaces.
- boardtype is automatically detected using BCSR ID register.
Run-tested on the DB1200.
Cc: Linux-PCMCIA <linux-pcmcia@lists.infradead.org>
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/alchemy/common/platform.c | 6 | ||||
-rw-r--r-- | arch/mips/alchemy/common/setup.c | 3 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/au1000.h | 14 |
3 files changed, 16 insertions, 7 deletions
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c index 117f99f70649..2b76a57c4947 100644 --- a/arch/mips/alchemy/common/platform.c +++ b/arch/mips/alchemy/common/platform.c | |||
@@ -308,11 +308,6 @@ static struct platform_device au1200_mmc1_device = { | |||
308 | #endif /* #ifndef CONFIG_MIPS_DB1200 */ | 308 | #endif /* #ifndef CONFIG_MIPS_DB1200 */ |
309 | #endif /* #ifdef CONFIG_SOC_AU1200 */ | 309 | #endif /* #ifdef CONFIG_SOC_AU1200 */ |
310 | 310 | ||
311 | static struct platform_device au1x00_pcmcia_device = { | ||
312 | .name = "au1x00-pcmcia", | ||
313 | .id = 0, | ||
314 | }; | ||
315 | |||
316 | /* All Alchemy demoboards with I2C have this #define in their headers */ | 311 | /* All Alchemy demoboards with I2C have this #define in their headers */ |
317 | #ifdef SMBUS_PSC_BASE | 312 | #ifdef SMBUS_PSC_BASE |
318 | static struct resource pbdb_smbus_resources[] = { | 313 | static struct resource pbdb_smbus_resources[] = { |
@@ -334,7 +329,6 @@ static struct platform_device pbdb_smbus_device = { | |||
334 | static struct platform_device *au1xxx_platform_devices[] __initdata = { | 329 | static struct platform_device *au1xxx_platform_devices[] __initdata = { |
335 | &au1xx0_uart_device, | 330 | &au1xx0_uart_device, |
336 | &au1xxx_usb_ohci_device, | 331 | &au1xxx_usb_ohci_device, |
337 | &au1x00_pcmcia_device, | ||
338 | #ifdef CONFIG_FB_AU1100 | 332 | #ifdef CONFIG_FB_AU1100 |
339 | &au1100_lcd_device, | 333 | &au1100_lcd_device, |
340 | #endif | 334 | #endif |
diff --git a/arch/mips/alchemy/common/setup.c b/arch/mips/alchemy/common/setup.c index 6184baa56786..375984e5c2e6 100644 --- a/arch/mips/alchemy/common/setup.c +++ b/arch/mips/alchemy/common/setup.c | |||
@@ -107,7 +107,8 @@ phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size) | |||
107 | * The pseudo address we use is 0xF400 0000. Any address over | 107 | * The pseudo address we use is 0xF400 0000. Any address over |
108 | * 0xF400 0000 is a PCMCIA pseudo address. | 108 | * 0xF400 0000 is a PCMCIA pseudo address. |
109 | */ | 109 | */ |
110 | if ((phys_addr >= 0xF4000000) && (phys_addr < 0xFFFFFFFF)) | 110 | if ((phys_addr >= PCMCIA_ATTR_PSEUDO_PHYS) && |
111 | (phys_addr < PCMCIA_PSEUDO_END)) | ||
111 | return (phys_t)(phys_addr << 4); | 112 | return (phys_t)(phys_addr << 4); |
112 | 113 | ||
113 | /* default nop */ | 114 | /* default nop */ |
diff --git a/arch/mips/include/asm/mach-au1x00/au1000.h b/arch/mips/include/asm/mach-au1x00/au1000.h index 05078224e933..fceeca883359 100644 --- a/arch/mips/include/asm/mach-au1x00/au1000.h +++ b/arch/mips/include/asm/mach-au1x00/au1000.h | |||
@@ -1724,6 +1724,20 @@ enum soc_au1200_ints { | |||
1724 | 1724 | ||
1725 | #endif | 1725 | #endif |
1726 | 1726 | ||
1727 | /* | ||
1728 | * All Au1xx0 SOCs have a PCMCIA controller. | ||
1729 | * We setup our 32-bit pseudo addresses to be equal to the | ||
1730 | * 36-bit addr >> 4, to make it easier to check the address | ||
1731 | * and fix it. | ||
1732 | * The PCMCIA socket 0 physical attribute address is 0xF 4000 0000. | ||
1733 | * The pseudo address we use is 0xF400 0000. Any address over | ||
1734 | * 0xF400 0000 is a PCMCIA pseudo address. | ||
1735 | */ | ||
1736 | #define PCMCIA_IO_PSEUDO_PHYS (PCMCIA_IO_PHYS_ADDR >> 4) | ||
1737 | #define PCMCIA_ATTR_PSEUDO_PHYS (PCMCIA_ATTR_PHYS_ADDR >> 4) | ||
1738 | #define PCMCIA_MEM_PSEUDO_PHYS (PCMCIA_MEM_PHYS_ADDR >> 4) | ||
1739 | #define PCMCIA_PSEUDO_END (0xffffffff) | ||
1740 | |||
1727 | #ifndef _LANGUAGE_ASSEMBLY | 1741 | #ifndef _LANGUAGE_ASSEMBLY |
1728 | typedef volatile struct { | 1742 | typedef volatile struct { |
1729 | /* 0x0000 */ u32 toytrim; | 1743 | /* 0x0000 */ u32 toytrim; |