Commit d6460827 authored by Pete Popov's avatar Pete Popov Committed by Ralf Baechle

Updated pcmcia driver with pb1200 and db1200 support.

Updated db1200_defconfig so pcmcia is enabled by default.
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent efe29c0f
...@@ -207,8 +207,6 @@ static struct platform_device au1200_ide0_device = { ...@@ -207,8 +207,6 @@ static struct platform_device au1200_ide0_device = {
.resource = au1200_ide0_resources, .resource = au1200_ide0_resources,
}; };
#endif
static struct platform_device au1x00_pcmcia_device = { static struct platform_device au1x00_pcmcia_device = {
.name = "au1x00-pcmcia", .name = "au1x00-pcmcia",
.id = 0, .id = 0,
......
...@@ -42,9 +42,11 @@ pxa2xx_core-y += soc_common.o pxa2xx_base.o ...@@ -42,9 +42,11 @@ pxa2xx_core-y += soc_common.o pxa2xx_base.o
au1x00_ss-y += au1000_generic.o au1x00_ss-y += au1000_generic.o
au1x00_ss-$(CONFIG_MIPS_PB1000) += au1000_pb1x00.o au1x00_ss-$(CONFIG_MIPS_PB1000) += au1000_pb1x00.o
au1x00_ss-$(CONFIG_MIPS_PB1100) += au1000_pb1x00.o au1x00_ss-$(CONFIG_MIPS_PB1100) += au1000_pb1x00.o
au1x00_ss-$(CONFIG_MIPS_PB1200) += au1000_db1x00.o
au1x00_ss-$(CONFIG_MIPS_PB1500) += au1000_pb1x00.o au1x00_ss-$(CONFIG_MIPS_PB1500) += au1000_pb1x00.o
au1x00_ss-$(CONFIG_MIPS_DB1000) += au1000_db1x00.o au1x00_ss-$(CONFIG_MIPS_DB1000) += au1000_db1x00.o
au1x00_ss-$(CONFIG_MIPS_DB1100) += au1000_db1x00.o au1x00_ss-$(CONFIG_MIPS_DB1100) += au1000_db1x00.o
au1x00_ss-$(CONFIG_MIPS_DB1200) += au1000_db1x00.o
au1x00_ss-$(CONFIG_MIPS_DB1500) += au1000_db1x00.o au1x00_ss-$(CONFIG_MIPS_DB1500) += au1000_db1x00.o
au1x00_ss-$(CONFIG_MIPS_DB1550) += au1000_db1x00.o au1x00_ss-$(CONFIG_MIPS_DB1550) += au1000_db1x00.o
au1x00_ss-$(CONFIG_MIPS_XXS1500) += au1000_xxs1500.o au1x00_ss-$(CONFIG_MIPS_XXS1500) += au1000_xxs1500.o
......
...@@ -40,7 +40,15 @@ ...@@ -40,7 +40,15 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/signal.h> #include <asm/signal.h>
#include <asm/mach-au1x00/au1000.h> #include <asm/mach-au1x00/au1000.h>
#include <asm/mach-db1x00/db1x00.h>
#if defined(CONFIG_MIPS_DB1200)
#include <db1200.h>
#elif defined(CONFIG_MIPS_PB1200)
#include <pb1200.h>
#else
#include <asm/mach-db1x00/db1x00.h>
static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
#endif
#include "au1000_generic.h" #include "au1000_generic.h"
...@@ -50,7 +58,6 @@ ...@@ -50,7 +58,6 @@
#define debug(x,args...) #define debug(x,args...)
#endif #endif
static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
struct au1000_pcmcia_socket au1000_pcmcia_socket[PCMCIA_NUM_SOCKS]; struct au1000_pcmcia_socket au1000_pcmcia_socket[PCMCIA_NUM_SOCKS];
extern int au1x00_pcmcia_socket_probe(struct device *, struct pcmcia_low_level *, int, int); extern 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,6 +66,8 @@ static int db1x00_pcmcia_hw_init(struct au1000_pcmcia_socket *skt)
{ {
#ifdef CONFIG_MIPS_DB1550 #ifdef CONFIG_MIPS_DB1550
skt->irq = skt->nr ? AU1000_GPIO_5 : AU1000_GPIO_3; skt->irq = skt->nr ? AU1000_GPIO_5 : AU1000_GPIO_3;
#elif defined(CONFIG_MIPS_DB1200) || defined(CONFIG_MIPS_PB1200)
skt->irq = skt->nr ? BOARD_PC1_INT : BOARD_PC0_INT;
#else #else
skt->irq = skt->nr ? AU1000_GPIO_5 : AU1000_GPIO_2; skt->irq = skt->nr ? AU1000_GPIO_5 : AU1000_GPIO_2;
#endif #endif
...@@ -85,11 +94,19 @@ db1x00_pcmcia_socket_state(struct au1000_pcmcia_socket *skt, struct pcmcia_state ...@@ -85,11 +94,19 @@ db1x00_pcmcia_socket_state(struct au1000_pcmcia_socket *skt, struct pcmcia_state
switch (skt->nr) { switch (skt->nr) {
case 0: case 0:
vs = bcsr->status & 0x3; vs = bcsr->status & 0x3;
#if defined(CONFIG_MIPS_DB1200) || defined(CONFIG_MIPS_PB1200)
inserted = BOARD_CARD_INSERTED(0);
#else
inserted = !(bcsr->status & (1<<4)); inserted = !(bcsr->status & (1<<4));
#endif
break; break;
case 1: case 1:
vs = (bcsr->status & 0xC)>>2; vs = (bcsr->status & 0xC)>>2;
#if defined(CONFIG_MIPS_DB1200) || defined(CONFIG_MIPS_PB1200)
inserted = BOARD_CARD_INSERTED(1);
#else
inserted = !(bcsr->status & (1<<5)); inserted = !(bcsr->status & (1<<5));
#endif
break; break;
default:/* should never happen */ default:/* should never happen */
return; return;
......
...@@ -44,13 +44,13 @@ ...@@ -44,13 +44,13 @@
/* pcmcia socket 1 needs external glue logic so the memory map /* pcmcia socket 1 needs external glue logic so the memory map
* differs from board to board. * differs from board to board.
*/ */
#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_PB1550) #if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_PB1200)
#define AU1X_SOCK1_IO 0xF08000000 #define AU1X_SOCK1_IO 0xF08000000
#define AU1X_SOCK1_PHYS_ATTR 0xF48000000 #define AU1X_SOCK1_PHYS_ATTR 0xF48000000
#define AU1X_SOCK1_PHYS_MEM 0xF88000000 #define AU1X_SOCK1_PHYS_MEM 0xF88000000
#define AU1X_SOCK1_PSEUDO_PHYS_ATTR 0xF4800000 #define AU1X_SOCK1_PSEUDO_PHYS_ATTR 0xF4800000
#define AU1X_SOCK1_PSEUDO_PHYS_MEM 0xF8800000 #define AU1X_SOCK1_PSEUDO_PHYS_MEM 0xF8800000
#elif defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || defined(CONFIG_MIPS_DB1500) || defined(CONFIG_MIPS_DB1550) #elif defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || defined(CONFIG_MIPS_DB1500) || defined(CONFIG_MIPS_DB1550) || defined(CONFIG_MIPS_DB1200)
#define AU1X_SOCK1_IO 0xF04000000 #define AU1X_SOCK1_IO 0xF04000000
#define AU1X_SOCK1_PHYS_ATTR 0xF44000000 #define AU1X_SOCK1_PHYS_ATTR 0xF44000000
#define AU1X_SOCK1_PHYS_MEM 0xF84000000 #define AU1X_SOCK1_PHYS_MEM 0xF84000000
......
...@@ -206,6 +206,16 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; ...@@ -206,6 +206,16 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
#define DB1200_INT_END (DB1200_INT_BEGIN + 15) #define DB1200_INT_END (DB1200_INT_BEGIN + 15)
/* For drivers/pcmcia/au1000_db1x00.c */ /* For drivers/pcmcia/au1000_db1x00.c */
/* PCMCIA Db1x00 specific defines */
#define PCMCIA_MAX_SOCK 1
#define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1)
/* VPP/VCC */
#define SET_VCC_VPP(VCC, VPP, SLOT)\
((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8))
#define BOARD_PC0_INT DB1200_PC0_INT #define BOARD_PC0_INT DB1200_PC0_INT
#define BOARD_PC1_INT DB1200_PC1_INT #define BOARD_PC1_INT DB1200_PC1_INT
#define BOARD_CARD_INSERTED(SOCKET) bcsr->sig_status & (1<<(8+(2*SOCKET))) #define BOARD_CARD_INSERTED(SOCKET) bcsr->sig_status & (1<<(8+(2*SOCKET)))
......
...@@ -173,6 +173,14 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; ...@@ -173,6 +173,14 @@ static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;
#define BCSR_INT_SD1INSERT 0x4000 #define BCSR_INT_SD1INSERT 0x4000
#define BCSR_INT_SD1EJECT 0x8000 #define BCSR_INT_SD1EJECT 0x8000
/* PCMCIA Db1x00 specific defines */
#define PCMCIA_MAX_SOCK 1
#define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK+1)
/* VPP/VCC */
#define SET_VCC_VPP(VCC, VPP, SLOT)\
((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8))
#define AU1XXX_SMC91111_PHYS_ADDR (0x0D000300) #define AU1XXX_SMC91111_PHYS_ADDR (0x0D000300)
#define AU1XXX_SMC91111_IRQ PB1200_ETH_INT #define AU1XXX_SMC91111_IRQ PB1200_ETH_INT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment