Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66213b3c authored by Manuel Lauss's avatar Manuel Lauss Committed by Ralf Baechle
Browse files

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: default avatarManuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 7e50b2b7
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -308,11 +308,6 @@ static struct platform_device au1200_mmc1_device = {
#endif /* #ifndef CONFIG_MIPS_DB1200 */
#endif /* #ifdef CONFIG_SOC_AU1200 */

static struct platform_device au1x00_pcmcia_device = {
	.name 		= "au1x00-pcmcia",
	.id 		= 0,
};

/* All Alchemy demoboards with I2C have this #define in their headers */
#ifdef SMBUS_PSC_BASE
static struct resource pbdb_smbus_resources[] = {
@@ -334,7 +329,6 @@ static struct platform_device pbdb_smbus_device = {
static struct platform_device *au1xxx_platform_devices[] __initdata = {
	&au1xx0_uart_device,
	&au1xxx_usb_ohci_device,
	&au1x00_pcmcia_device,
#ifdef CONFIG_FB_AU1100
	&au1100_lcd_device,
#endif
+2 −1
Original line number Diff line number Diff line
@@ -107,7 +107,8 @@ phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size)
	 * The pseudo address we use is 0xF400 0000. Any address over
	 * 0xF400 0000 is a PCMCIA pseudo address.
	 */
	if ((phys_addr >= 0xF4000000) && (phys_addr < 0xFFFFFFFF))
	if ((phys_addr >= PCMCIA_ATTR_PSEUDO_PHYS) &&
	    (phys_addr < PCMCIA_PSEUDO_END))
		return (phys_t)(phys_addr << 4);

	/* default nop */
+14 −0
Original line number Diff line number Diff line
@@ -1724,6 +1724,20 @@ enum soc_au1200_ints {

#endif

/*
 * All Au1xx0 SOCs have a PCMCIA controller.
 * We setup our 32-bit pseudo addresses to be equal to the
 * 36-bit addr >> 4, to make it easier to check the address
 * and fix it.
 * The PCMCIA socket 0 physical attribute address is 0xF 4000 0000.
 * The pseudo address we use is 0xF400 0000. Any address over
 * 0xF400 0000 is a PCMCIA pseudo address.
 */
#define PCMCIA_IO_PSEUDO_PHYS	(PCMCIA_IO_PHYS_ADDR >> 4)
#define PCMCIA_ATTR_PSEUDO_PHYS	(PCMCIA_ATTR_PHYS_ADDR >> 4)
#define PCMCIA_MEM_PSEUDO_PHYS	(PCMCIA_MEM_PHYS_ADDR >> 4)
#define PCMCIA_PSEUDO_END	(0xffffffff)

#ifndef _LANGUAGE_ASSEMBLY
typedef volatile struct {
	/* 0x0000 */ u32 toytrim;
+11 −0
Original line number Diff line number Diff line
@@ -174,6 +174,17 @@ config PCMCIA_AU1X00
	tristate "Au1x00 pcmcia support"
	depends on SOC_AU1X00 && PCMCIA

config PCMCIA_ALCHEMY_DEVBOARD
	tristate "Alchemy Db/Pb1xxx PCMCIA socket services"
	depends on SOC_AU1X00 && PCMCIA
	select 64BIT_PHYS_ADDR
	help
	  Enable this driver of you want PCMCIA support on your Alchemy
	  Db1000, Db/Pb1100, Db/Pb1500, Db/Pb1550, Db/Pb1200 board.
	  NOT suitable for the PB1000!

	  This driver is also available as a module called db1xxx_ss.ko

config PCMCIA_BCM63XX
	tristate "bcm63xx pcmcia support"
	depends on BCM63XX && PCMCIA
+1 −8
Original line number Diff line number Diff line
@@ -35,17 +35,10 @@ obj-$(CONFIG_OMAP_CF) += omap_cf.o
obj-$(CONFIG_BFIN_CFPCMCIA)			+= bfin_cf_pcmcia.o
obj-$(CONFIG_AT91_CF)				+= at91_cf.o
obj-$(CONFIG_ELECTRA_CF)			+= electra_cf.o
obj-$(CONFIG_PCMCIA_ALCHEMY_DEVBOARD)		+= db1xxx_ss.o

au1x00_ss-y					+= au1000_generic.o
au1x00_ss-$(CONFIG_MIPS_PB1000)			+= 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_DB1000)			+= 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_DB1550)			+= au1000_db1x00.o
au1x00_ss-$(CONFIG_MIPS_XXS1500)		+= au1000_xxs1500.o

sa1111_cs-y					+= sa1111_generic.o
Loading