aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPete Popov <ppopov@embeddedalley.com>2005-09-16 20:38:10 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:32:24 -0400
commitd6460827af0763dc2f4a5cf0455cbf1e3a9ccb77 (patch)
treeeeac9842013ab85276fff3ee64928c9c4cd1fd2c
parentefe29c0f34dc3ee3511e46458f335edb7ee50327 (diff)
Updated pcmcia driver with pb1200 and db1200 support.
Updated db1200_defconfig so pcmcia is enabled by default. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/au1000/common/platform.c2
-rw-r--r--drivers/pcmcia/Makefile2
-rw-r--r--drivers/pcmcia/au1000_db1x00.c21
-rw-r--r--drivers/pcmcia/au1000_generic.h4
-rw-r--r--include/asm-mips/mach-db1x00/db1200.h10
-rw-r--r--include/asm-mips/mach-pb1x00/pb1200.h8
6 files changed, 41 insertions, 6 deletions
diff --git a/arch/mips/au1000/common/platform.c b/arch/mips/au1000/common/platform.c
index a5e3ea41369..0f29815003f 100644
--- a/arch/mips/au1000/common/platform.c
+++ b/arch/mips/au1000/common/platform.c
@@ -207,8 +207,6 @@ static struct platform_device au1200_ide0_device = {
207 .resource = au1200_ide0_resources, 207 .resource = au1200_ide0_resources,
208}; 208};
209 209
210#endif
211
212static struct platform_device au1x00_pcmcia_device = { 210static struct platform_device au1x00_pcmcia_device = {
213 .name = "au1x00-pcmcia", 211 .name = "au1x00-pcmcia",
214 .id = 0, 212 .id = 0,
diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
index a41fbb38fdc..77ecee7f987 100644
--- a/drivers/pcmcia/Makefile
+++ b/drivers/pcmcia/Makefile
@@ -42,9 +42,11 @@ pxa2xx_core-y += soc_common.o pxa2xx_base.o
42au1x00_ss-y += au1000_generic.o 42au1x00_ss-y += au1000_generic.o
43au1x00_ss-$(CONFIG_MIPS_PB1000) += au1000_pb1x00.o 43au1x00_ss-$(CONFIG_MIPS_PB1000) += au1000_pb1x00.o
44au1x00_ss-$(CONFIG_MIPS_PB1100) += au1000_pb1x00.o 44au1x00_ss-$(CONFIG_MIPS_PB1100) += au1000_pb1x00.o
45au1x00_ss-$(CONFIG_MIPS_PB1200) += au1000_db1x00.o
45au1x00_ss-$(CONFIG_MIPS_PB1500) += au1000_pb1x00.o 46au1x00_ss-$(CONFIG_MIPS_PB1500) += au1000_pb1x00.o
46au1x00_ss-$(CONFIG_MIPS_DB1000) += au1000_db1x00.o 47au1x00_ss-$(CONFIG_MIPS_DB1000) += au1000_db1x00.o
47au1x00_ss-$(CONFIG_MIPS_DB1100) += au1000_db1x00.o 48au1x00_ss-$(CONFIG_MIPS_DB1100) += au1000_db1x00.o
49au1x00_ss-$(CONFIG_MIPS_DB1200) += au1000_db1x00.o
48au1x00_ss-$(CONFIG_MIPS_DB1500) += au1000_db1x00.o 50au1x00_ss-$(CONFIG_MIPS_DB1500) += au1000_db1x00.o
49au1x00_ss-$(CONFIG_MIPS_DB1550) += au1000_db1x00.o 51au1x00_ss-$(CONFIG_MIPS_DB1550) += au1000_db1x00.o
50au1x00_ss-$(CONFIG_MIPS_XXS1500) += au1000_xxs1500.o 52au1x00_ss-$(CONFIG_MIPS_XXS1500) += au1000_xxs1500.o
diff --git a/drivers/pcmcia/au1000_db1x00.c b/drivers/pcmcia/au1000_db1x00.c
index 42cf8bfbcc9..24cfee1a412 100644
--- a/drivers/pcmcia/au1000_db1x00.c
+++ b/drivers/pcmcia/au1000_db1x00.c
@@ -40,7 +40,15 @@
40#include <asm/irq.h> 40#include <asm/irq.h>
41#include <asm/signal.h> 41#include <asm/signal.h>
42#include <asm/mach-au1x00/au1000.h> 42#include <asm/mach-au1x00/au1000.h>
43#include <asm/mach-db1x00/db1x00.h> 43
44#if defined(CONFIG_MIPS_DB1200)
45 #include <db1200.h>
46#elif defined(CONFIG_MIPS_PB1200)
47 #include <pb1200.h>
48#else
49 #include <asm/mach-db1x00/db1x00.h>
50 static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
51#endif
44 52
45#include "au1000_generic.h" 53#include "au1000_generic.h"
46 54
@@ -50,7 +58,6 @@
50#define debug(x,args...) 58#define debug(x,args...)
51#endif 59#endif
52 60
53static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
54 61
55struct au1000_pcmcia_socket au1000_pcmcia_socket[PCMCIA_NUM_SOCKS]; 62struct au1000_pcmcia_socket au1000_pcmcia_socket[PCMCIA_NUM_SOCKS];
56extern int au1x00_pcmcia_socket_probe(struct device *, struct pcmcia_low_level *, int, int); 63extern int au1x00_pcmcia_socket_probe(struct device *, struct pcmcia_low_level *, int, int);
@@ -59,6 +66,8 @@ static int db1x00_pcmcia_hw_init(struct au1000_pcmcia_socket *skt)
59{ 66{
60#ifdef CONFIG_MIPS_DB1550 67#ifdef CONFIG_MIPS_DB1550
61 skt->irq = skt->nr ? AU1000_GPIO_5 : AU1000_GPIO_3; 68 skt->irq = skt->nr ? AU1000_GPIO_5 : AU1000_GPIO_3;
69#elif defined(CONFIG_MIPS_DB1200) || defined(CONFIG_MIPS_PB1200)
70 skt->irq = skt->nr ? BOARD_PC1_INT : BOARD_PC0_INT;
62#else 71#else
63 skt->irq = skt->nr ? AU1000_GPIO_5 : AU1000_GPIO_2; 72 skt->irq = skt->nr ? AU1000_GPIO_5 : AU1000_GPIO_2;
64#endif 73#endif
@@ -85,11 +94,19 @@ db1x00_pcmcia_socket_state(struct au1000_pcmcia_socket *skt, struct pcmcia_state
85 switch (skt->nr) { 94 switch (skt->nr) {
86 case 0: 95 case 0:
87 vs = bcsr->status & 0x3; 96 vs = bcsr->status & 0x3;
97#if defined(CONFIG_MIPS_DB1200) || defined(CONFIG_MIPS_PB1200)
98 inserted = BOARD_CARD_INSERTED(0);
99#else
88 inserted = !(bcsr->status & (1<<4)); 100 inserted = !(bcsr->status & (1<<4));
101#endif
89 break; 102 break;
90 case 1: 103 case 1:
91 vs = (bcsr->status & 0xC)>>2; 104 vs = (bcsr->status & 0xC)>>2;
105#if defined(CONFIG_MIPS_DB1200) || defined(CONFIG_MIPS_PB1200)
106 inserted = BOARD_CARD_INSERTED(1);
107#else
92 inserted = !(bcsr->status & (1<<5)); 108 inserted = !(bcsr->status & (1<<5));
109#endif
93 break; 110 break;
94 default:/* should never happen */ 111 default:/* should never happen */
95 return; 112 return;
diff --git a/drivers/pcmcia/au1000_generic.h b/drivers/pcmcia/au1000_generic.h
index d5122b1ea94..b0e7908392a 100644
--- a/drivers/pcmcia/au1000_generic.h
+++ b/drivers/pcmcia/au1000_generic.h
@@ -44,13 +44,13 @@
44/* pcmcia socket 1 needs external glue logic so the memory map 44/* pcmcia socket 1 needs external glue logic so the memory map
45 * differs from board to board. 45 * differs from board to board.
46 */ 46 */
47#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_PB1550) 47#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_PB1200)
48#define AU1X_SOCK1_IO 0xF08000000 48#define AU1X_SOCK1_IO 0xF08000000
49#define AU1X_SOCK1_PHYS_ATTR 0xF48000000 49#define AU1X_SOCK1_PHYS_ATTR 0xF48000000
50#define AU1X_SOCK1_PHYS_MEM 0xF88000000 50#define AU1X_SOCK1_PHYS_MEM 0xF88000000
51#define AU1X_SOCK1_PSEUDO_PHYS_ATTR 0xF4800000 51#define AU1X_SOCK1_PSEUDO_PHYS_ATTR 0xF4800000
52#define AU1X_SOCK1_PSEUDO_PHYS_MEM 0xF8800000 52#define AU1X_SOCK1_PSEUDO_PHYS_MEM 0xF8800000
53#elif defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || defined(CONFIG_MIPS_DB1500) || defined(CONFIG_MIPS_DB1550) 53#elif defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || defined(CONFIG_MIPS_DB1500) || defined(CONFIG_MIPS_DB1550) || defined(CONFIG_MIPS_DB1200)
54#define AU1X_SOCK1_IO 0xF04000000 54#define AU1X_SOCK1_IO 0xF04000000
55#define AU1X_SOCK1_PHYS_ATTR 0xF44000000 55#define AU1X_SOCK1_PHYS_ATTR 0xF44000000
56#define AU1X_SOCK1_PHYS_MEM 0xF84000000 56#define AU1X_SOCK1_PHYS_MEM 0xF84000000
diff --git a/include/asm-mips/mach-db1x00/db1200.h b/include/asm-mips/mach-db1x00/db1200.h
index 6d1ddf43d29..5d894376fc1 100644
--- a/include/asm-mips/mach-db1x00/db1200.h
+++ b/include/asm-mips/mach-db1x00/db1200.h
@@ -206,6 +206,16 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
206#define DB1200_INT_END (DB1200_INT_BEGIN + 15) 206#define DB1200_INT_END (DB1200_INT_BEGIN + 15)
207 207
208/* For drivers/pcmcia/au1000_db1x00.c */ 208/* For drivers/pcmcia/au1000_db1x00.c */
209
210/* PCMCIA Db1x00 specific defines */
211
212#define PCMCIA_MAX_SOCK 1
213#define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1)
214
215/* VPP/VCC */
216#define SET_VCC_VPP(VCC, VPP, SLOT)\
217 ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8))
218
209#define BOARD_PC0_INT DB1200_PC0_INT 219#define BOARD_PC0_INT DB1200_PC0_INT
210#define BOARD_PC1_INT DB1200_PC1_INT 220#define BOARD_PC1_INT DB1200_PC1_INT
211#define BOARD_CARD_INSERTED(SOCKET) bcsr->sig_status & (1<<(8+(2*SOCKET))) 221#define BOARD_CARD_INSERTED(SOCKET) bcsr->sig_status & (1<<(8+(2*SOCKET)))
diff --git a/include/asm-mips/mach-pb1x00/pb1200.h b/include/asm-mips/mach-pb1x00/pb1200.h
index 0f6646335e9..9a3088b19bf 100644
--- a/include/asm-mips/mach-pb1x00/pb1200.h
+++ b/include/asm-mips/mach-pb1x00/pb1200.h
@@ -173,6 +173,14 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
173#define BCSR_INT_SD1INSERT 0x4000 173#define BCSR_INT_SD1INSERT 0x4000
174#define BCSR_INT_SD1EJECT 0x8000 174#define BCSR_INT_SD1EJECT 0x8000
175 175
176/* PCMCIA Db1x00 specific defines */
177#define PCMCIA_MAX_SOCK 1
178#define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1)
179
180/* VPP/VCC */
181#define SET_VCC_VPP(VCC, VPP, SLOT)\
182 ((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8))
183
176#define AU1XXX_SMC91111_PHYS_ADDR (0x0D000300) 184#define AU1XXX_SMC91111_PHYS_ADDR (0x0D000300)
177#define AU1XXX_SMC91111_IRQ PB1200_ETH_INT 185#define AU1XXX_SMC91111_IRQ PB1200_ETH_INT
178 186