From: Pete P. <pp...@us...> - 2002-02-15 19:47:32
|
Update of /cvsroot/linux-mips/linux/drivers/pcmcia In directory usw-pr-cvs1:/tmp/cvs-serv7382/drivers/pcmcia Modified Files: au1000_generic.c au1000_pb1000.c cs.c Log Message: * removed runtime copyright prints * Added Pb1500 support (only pcmcia not working at this time) and modified all drivers as necessary * renamed most Au1000 registers to match latest databook * better Au1000 usb hardware fixes for early silicon * updated mtd driver to support Pb1500 partitioning Index: au1000_generic.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/pcmcia/au1000_generic.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- au1000_generic.c 19 Nov 2001 15:48:59 -0000 1.5 +++ au1000_generic.c 15 Feb 2002 19:47:27 -0000 1.6 @@ -60,7 +60,7 @@ #endif MODULE_AUTHOR("Pete Popov, MontaVista Software <pp...@mv...>"); -MODULE_DESCRIPTION("Linux PCMCIA Card Services: Au1000 Socket Controller"); +MODULE_DESCRIPTION("Linux PCMCIA Card Services: Au1x00 Socket Controller"); #define MAP_SIZE 0x1000000 @@ -139,7 +139,7 @@ unsigned int i; unsigned long timing3; - printk("\nAU1000 PCMCIA (CS release %s)\n", CS_RELEASE); + printk("\nAu1x00 PCMCIA (CS release %s)\n", CS_RELEASE); CardServices(GetCardServicesInfo, &info); @@ -150,6 +150,8 @@ #ifdef CONFIG_MIPS_PB1000 pcmcia_low_level=&pb1000_pcmcia_ops; +#elif defined(CONFIG_MIPS_PB1500) + pcmcia_low_level=&pb1500_pcmcia_ops; #else #error Unsupported AU1000 board. #endif @@ -162,9 +164,9 @@ /* setup the static bus controller */ timing3 = 0x100e3a07; - writel(0x00000002, STATIC_CONFIG_3); /* type = PCMCIA */ - writel(timing3, STATIC_TIMING_3); - writel(0x10000000, STATIC_ADDRESS_3); /* any PCMCIA select */ + writel(0x00000002, MEM_STCFG3); /* type = PCMCIA */ + writel(timing3, MEM_STTIME3); + writel(0x10000000, MEM_STADDR3); /* any PCMCIA select */ au_sync_delay(1); pcmcia_socket = Index: au1000_pb1000.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/pcmcia/au1000_pb1000.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- au1000_pb1000.c 4 Oct 2001 21:16:48 -0000 1.3 +++ au1000_pb1000.c 15 Feb 2002 19:47:27 -0000 1.4 @@ -63,14 +63,14 @@ u32 pcr; pcr = PCR_SLOT_0_RST | PCR_SLOT_1_RST; - writel(0x8000, AU1000_MDR); /* clear pcmcia interrupt */ + writel(0x8000, PB1000_MDR); /* clear pcmcia interrupt */ au_sync_delay(100); - writel(0x4000, AU1000_MDR); /* enable pcmcia interrupt */ + writel(0x4000, PB1000_MDR); /* enable pcmcia interrupt */ au_sync(); pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ,0); pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ,1); - writew(pcr, AU1000_PCR); + writew(pcr, PB1000_PCR); au_sync_delay(20); /* There's two sockets, but only the first one, 0, is used and tested */ @@ -83,7 +83,7 @@ pcr = PCR_SLOT_0_RST | PCR_SLOT_1_RST; pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ,0); pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ,1); - writew(pcr, AU1000_PCR); + writew(pcr, PB1000_PCR); au_sync_delay(20); return 0; } @@ -94,8 +94,8 @@ u16 levels, pcr; unsigned char vs; - levels = readw(AU1000_ACR1); - pcr = readw(AU1000_PCR); + levels = readw(PB1000_ACR1); + pcr = readw(PB1000_PCR); state->ready = 0; state->vs_Xv = 0; @@ -178,7 +178,7 @@ if(configure->sock > PCMCIA_MAX_SOCK) return -1; - pcr = readw(AU1000_PCR); + pcr = readw(PB1000_PCR); if (configure->sock == 0) { pcr &= ~(PCR_SLOT_0_VCC0 | PCR_SLOT_0_VCC1 | @@ -190,9 +190,10 @@ } pcr &= ~PCR_SLOT_0_RST; - writew(pcr, AU1000_PCR); + /* + writew(pcr, PB1000_PCR); au_sync_delay(200); - + */ DEBUG(KERN_INFO "Vcc %dV Vpp %dV, pcr %x\n", configure->vcc, configure->vpp, pcr); switch(configure->vcc){ @@ -287,17 +288,17 @@ break; } - writew(pcr, AU1000_PCR); + writew(pcr, PB1000_PCR); au_sync_delay(300); - writew(pcr | PCR_SLOT_0_RST, AU1000_PCR); + writew(pcr | PCR_SLOT_0_RST, PB1000_PCR); au_sync_delay(100); pcr &= ~(PCR_SLOT_0_RST); if (configure->reset) { pcr |= PCR_SLOT_0_RST; } - writew(pcr, AU1000_PCR); + writew(pcr, PB1000_PCR); au_sync_delay(100); return 0; } Index: cs.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/pcmcia/cs.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- cs.c 18 Dec 2001 04:14:21 -0000 1.7 +++ cs.c 15 Feb 2002 19:47:27 -0000 1.8 @@ -821,7 +821,7 @@ return 1; for (i = 0; i < MAX_IO_WIN; i++) { if (s->io[i].NumPorts == 0) { - if (find_io_region(base, num, align, name) == 0) { + if (find_io_region(base, num, align, name, s) == 0) { s->io[i].Attributes = attr; s->io[i].BasePort = *base; s->io[i].NumPorts = s->io[i].InUse = num; @@ -833,7 +833,7 @@ /* Try to extend top of window */ try = s->io[i].BasePort + s->io[i].NumPorts; if ((*base == 0) || (*base == try)) - if (find_io_region(&try, num, 0, name) == 0) { + if (find_io_region(&try, num, 0, name, s) == 0) { *base = try; s->io[i].NumPorts += num; s->io[i].InUse += num; @@ -842,7 +842,7 @@ /* Try to extend bottom of window */ try = s->io[i].BasePort - num; if ((*base == 0) || (*base == try)) - if (find_io_region(&try, num, 0, name) == 0) { + if (find_io_region(&try, num, 0, name, s) == 0) { s->io[i].BasePort = *base = try; s->io[i].NumPorts += num; s->io[i].InUse += num; @@ -2012,7 +2012,7 @@ find_mem_region(&win->base, win->size, align, (req->Attributes & WIN_MAP_BELOW_1MB) || !(s->cap.features & SS_CAP_PAGE_REGS), - (*handle)->dev_info)) + (*handle)->dev_info, s)) return CS_IN_USE; (*handle)->state |= CLIENT_WIN_REQ(w); |