?? pcmcia.patch
字號(hào):
Index: linux/arch/mips/au1000/common/setup.c===================================================================--- linux.orig/arch/mips/au1000/common/setup.c 2005-06-02 09:37:00.295902893 -0700+++ linux/arch/mips/au1000/common/setup.c 2005-06-02 09:37:34.902203886 -0700@@ -164,7 +164,7 @@ early_initcall(au1x00_setup); -#if defined(CONFIG_64BIT_PHYS_ADDR) && (defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550))+#if defined(CONFIG_64BIT_PHYS_ADDR) && (defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550) || defined(CONFIG_SOC_AU1200)) /* This routine should be valid for all Au1x based boards */ phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size) {@@ -173,7 +173,7 @@ /* Don't fixup 36 bit addresses */ if ((phys_addr >> 32) != 0) return phys_addr; -#ifdef CONFIG_PCI+#if defined(CONFIG_PCI) && !defined(CONFIG_SOC_AU1200) start = (u32)Au1500_PCI_MEM_START; end = (u32)Au1500_PCI_MEM_END; /* check for pci memory window */Index: linux/drivers/pcmcia/Makefile===================================================================--- linux.orig/drivers/pcmcia/Makefile 2005-01-24 21:28:38.000000000 -0700+++ linux/drivers/pcmcia/Makefile 2005-06-02 09:37:34.903203721 -0700@@ -32,9 +32,6 @@ obj-$(CONFIG_PCMCIA_VRC4173) += vrc4173_cardu.o obj-$(CONFIG_PCMCIA_AU1X00) += au1x00_ss.o -pcmcia_core-y += cistpl.o rsrc_mgr.o bulkmem.o cs.o socket_sysfs.o-pcmcia_core-$(CONFIG_CARDBUS) += cardbus.o- sa11xx_core-y += soc_common.o sa11xx_base.o pxa2xx_core-y += soc_common.o pxa2xx_base.o @@ -46,9 +43,11 @@ 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.oIndex: linux/drivers/pcmcia/au1000_db1x00.c===================================================================--- linux.orig/drivers/pcmcia/au1000_db1x00.c 2004-10-13 23:24:25.000000000 -0700+++ linux/drivers/pcmcia/au1000_db1x00.c 2005-06-02 09:48:47.812394295 -0700@@ -40,7 +40,15 @@ #include <asm/irq.h> #include <asm/signal.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" @@ -50,7 +58,6 @@ #define debug(x,args...) #endif -static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; struct au1000_pcmcia_socket au1000_pcmcia_socket[PCMCIA_NUM_SOCKS]; extern int au1x00_pcmcia_socket_probe(struct device *, struct pcmcia_low_level *, int, int);@@ -59,6 +66,8 @@ { #ifdef CONFIG_MIPS_DB1550 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 skt->irq = skt->nr ? AU1000_GPIO_5 : AU1000_GPIO_2; #endif@@ -85,11 +94,19 @@ switch (skt->nr) { case 0: vs = bcsr->status & 0x3;+#if defined(CONFIG_MIPS_DB1200) || defined(CONFIG_MIPS_PB1200)+ inserted = BOARD_CARD_INSERTED(0);+#else inserted = !(bcsr->status & (1<<4));+#endif break; case 1: 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));+#endif break; default:/* should never happen */ return;Index: linux/drivers/pcmcia/au1000_generic.c===================================================================--- linux.orig/drivers/pcmcia/au1000_generic.c 2005-01-24 21:28:38.000000000 -0700+++ linux/drivers/pcmcia/au1000_generic.c 2005-06-02 09:37:34.903203721 -0700@@ -423,7 +423,7 @@ */ if (i == 0) { skt->virt_io = (void *)- (ioremap((phys_t)AU1X_SOCK0_IO, 0x1000) -+ (u32)(ioremap((ioaddr_t)AU1X_SOCK0_IO, 0x1000) - (u32)mips_io_port_base); skt->phys_attr = AU1X_SOCK0_PSEUDO_PHYS_ATTR; skt->phys_mem = AU1X_SOCK0_PSEUDO_PHYS_MEM;@@ -431,7 +431,7 @@ #ifndef CONFIG_MIPS_XXS1500 else { skt->virt_io = (void *)- (ioremap((phys_t)AU1X_SOCK1_IO, 0x1000) -+ (u32)(ioremap((ioaddr_t)AU1X_SOCK1_IO, 0x1000) - (u32)mips_io_port_base); skt->phys_attr = AU1X_SOCK1_PSEUDO_PHYS_ATTR; skt->phys_mem = AU1X_SOCK1_PSEUDO_PHYS_MEM;@@ -441,6 +441,7 @@ ret = ops->hw_init(skt); skt->socket.features = SS_CAP_STATIC_MAP|SS_CAP_PCCARD;+ skt->socket.resource_ops = &pccard_static_ops; skt->socket.irq_mask = 0; skt->socket.map_size = MAP_SIZE; skt->socket.pci_irq = skt->irq;Index: linux/drivers/pcmcia/au1000_generic.h===================================================================--- linux.orig/drivers/pcmcia/au1000_generic.h 2005-02-28 06:35:57.000000000 -0700+++ linux/drivers/pcmcia/au1000_generic.h 2005-06-02 09:37:34.904203556 -0700@@ -45,13 +45,13 @@ /* pcmcia socket 1 needs external glue logic so the memory map * 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_PHYS_ATTR 0xF48000000 #define AU1X_SOCK1_PHYS_MEM 0xF88000000 #define AU1X_SOCK1_PSEUDO_PHYS_ATTR 0xF4800000 #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_PHYS_ATTR 0xF44000000 #define AU1X_SOCK1_PHYS_MEM 0xF84000000@@ -61,21 +61,21 @@ struct pcmcia_state { unsigned detect: 1,- .ready = 1,- .wrprot = 1,+ ready: 1, bvd1: 1, bvd2: 1,+ wrprot: 1, vs_3v: 1, vs_Xv: 1; }; struct pcmcia_configure { unsigned sock: 8,- .vcc = 8,- .vpp = 8,- .output = 1,- .speaker = 1,- .reset = 1;+ vcc: 8,+ vpp: 8,+ output: 1,+ speaker: 1,+ reset: 1; }; struct pcmcia_irqs {Index: linux/include/asm-mips/mach-db1x00/db1200.h===================================================================--- linux.orig/include/asm-mips/mach-db1x00/db1200.h 2005-02-28 23:33:19.000000000 -0700+++ linux/include/asm-mips/mach-db1x00/db1200.h 2005-06-02 09:41:30.067479570 -0700@@ -207,6 +207,16 @@ #define DB1200_INT_END (DB1200_INT_BEGIN + 15) /* 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_PC1_INT DB1200_PC1_INT #define BOARD_CARD_INSERTED(SOCKET) bcsr->sig_status & (1<<(8+(2*SOCKET)))Index: linux/include/asm-mips/mach-pb1x00/pb1200.h===================================================================--- linux.orig/include/asm-mips/mach-pb1x00/pb1200.h 2005-02-28 23:33:19.000000000 -0700+++ linux/include/asm-mips/mach-pb1x00/pb1200.h 2005-06-02 09:37:34.904203556 -0700@@ -174,6 +174,14 @@ #define BCSR_INT_SD1INSERT 0x4000 #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_IRQ PB1200_ETH_INT Index: linux/include/pcmcia/cs_types.h===================================================================--- linux.orig/include/pcmcia/cs_types.h 2005-02-06 19:55:03.000000000 -0700+++ linux/include/pcmcia/cs_types.h 2005-06-02 09:37:34.904203556 -0700@@ -21,9 +21,10 @@ #include <sys/types.h> #endif -#if defined(__arm__) || defined(__mips__)-/* This (ioaddr_t) is exposed to userspace & hence cannot be changed. */+#if defined(__arm__) typedef u_int ioaddr_t;+#elif defined(__mips__)+typedef unsigned long long ioaddr_t; #else typedef u_short ioaddr_t; #endifIndex: linux/include/pcmcia/ss.h===================================================================--- linux.orig/include/pcmcia/ss.h 2005-02-06 19:55:03.000000000 -0700+++ linux/include/pcmcia/ss.h 2005-06-02 09:37:34.904203556 -0700@@ -88,7 +88,7 @@ u_char map; u_char flags; u_short speed;- u_long static_start;+ ioaddr_t static_start; u_int card_start; struct resource *res; } pccard_mem_map;
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -