X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/f52d66ff00b24111f87c274d3d7085ef2e1d27b1..2a88ac56956dbae4320bb19b2a17536d7757049c:/target/linux/brcm-2.4/patches/009-wrt54g3g_pcmcia.patch?ds=sidebyside diff --git a/target/linux/brcm-2.4/patches/009-wrt54g3g_pcmcia.patch b/target/linux/brcm-2.4/patches/009-wrt54g3g_pcmcia.patch index 0759eeb40..be84d2d60 100644 --- a/target/linux/brcm-2.4/patches/009-wrt54g3g_pcmcia.patch +++ b/target/linux/brcm-2.4/patches/009-wrt54g3g_pcmcia.patch @@ -1,41 +1,8 @@ -diff -urN linux.old/arch/mips/bcm947xx/pcibios.c linux.dev/arch/mips/bcm947xx/pcibios.c ---- linux.old/arch/mips/bcm947xx/pcibios.c 2006-04-07 21:20:59.000000000 +0200 -+++ linux.dev/arch/mips/bcm947xx/pcibios.c 2006-04-08 03:17:59.000000000 +0200 -@@ -157,6 +157,7 @@ - - static u32 pci_iobase = 0x100; - static u32 pci_membase = SB_PCI_DMA; -+static u32 pcmcia_membase = 0x40004000; - - void __init - pcibios_fixup_bus(struct pci_bus *b) -@@ -188,7 +189,7 @@ - /* Fix up resource bases */ - for (pos = 0; pos < 6; pos++) { - res = &d->resource[pos]; -- base = (res->flags & IORESOURCE_IO) ? &pci_iobase : &pci_membase; -+ base = (res->flags & IORESOURCE_IO) ? &pci_iobase : ((b->number == 2) ? &pcmcia_membase : &pci_membase); - if (res->end) { - size = res->end - res->start + 1; - if (*base & (size - 1)) -@@ -308,7 +309,12 @@ - where = PCI_BASE_ADDRESS_0 + (resource * 4); - size = res->end - res->start; - pci_read_config_dword(dev, where, ®); -- reg = (reg & size) | (((u32)(res->start - root->start)) & ~size); -+ -+ if (dev->bus->number == 1) -+ reg = (reg & size) | (((u32)(res->start - root->start)) & ~size); -+ else -+ reg = res->start; -+ - pci_write_config_dword(dev, where, reg); - } - -diff -urN linux.old/drivers/pcmcia/yenta.c linux.dev/drivers/pcmcia/yenta.c ---- linux.old/drivers/pcmcia/yenta.c 2004-11-17 12:54:21.000000000 +0100 -+++ linux.dev/drivers/pcmcia/yenta.c 2006-04-11 17:47:45.000000000 +0200 -@@ -543,6 +543,9 @@ +Index: linux-2.4.35.4/drivers/pcmcia/yenta.c +=================================================================== +--- linux-2.4.35.4.orig/drivers/pcmcia/yenta.c ++++ linux-2.4.35.4/drivers/pcmcia/yenta.c +@@ -543,6 +543,9 @@ static unsigned int yenta_probe_irq(pci_ * Probe for usable interrupts using the force * register to generate bogus card status events. */ @@ -45,7 +12,7 @@ diff -urN linux.old/drivers/pcmcia/yenta.c linux.dev/drivers/pcmcia/yenta.c cb_writel(socket, CB_SOCKET_EVENT, -1); cb_writel(socket, CB_SOCKET_MASK, CB_CSTSMASK); exca_writeb(socket, I365_CSCINT, 0); -@@ -557,7 +560,8 @@ +@@ -557,7 +560,8 @@ static unsigned int yenta_probe_irq(pci_ } cb_writel(socket, CB_SOCKET_MASK, 0); exca_writeb(socket, I365_CSCINT, 0); @@ -55,7 +22,7 @@ diff -urN linux.old/drivers/pcmcia/yenta.c linux.dev/drivers/pcmcia/yenta.c mask = probe_irq_mask(val) & 0xffff; bridge_ctrl &= ~CB_BRIDGE_INTR; -@@ -578,6 +582,12 @@ +@@ -578,6 +582,12 @@ static void yenta_get_socket_capabilitie socket->cap.cb_dev = socket->dev; socket->cap.bus = NULL; @@ -68,7 +35,7 @@ diff -urN linux.old/drivers/pcmcia/yenta.c linux.dev/drivers/pcmcia/yenta.c printk(KERN_INFO "Yenta ISA IRQ mask 0x%04x, PCI irq %d\n", socket->cap.irq_mask, socket->cb_irq); } -@@ -609,6 +619,15 @@ +@@ -609,6 +619,15 @@ static void yenta_open_bh(void * data) printk(KERN_INFO "Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE)); @@ -84,7 +51,7 @@ diff -urN linux.old/drivers/pcmcia/yenta.c linux.dev/drivers/pcmcia/yenta.c /* Register it with the pcmcia layer.. */ cardbus_register(socket); -@@ -731,7 +750,7 @@ +@@ -731,7 +750,7 @@ static void yenta_allocate_res(pci_socke { struct pci_bus *bus; struct resource *root, *res; @@ -93,7 +60,7 @@ diff -urN linux.old/drivers/pcmcia/yenta.c linux.dev/drivers/pcmcia/yenta.c u32 align, size, min, max; unsigned offset; unsigned mask; -@@ -750,6 +769,15 @@ +@@ -750,6 +769,15 @@ static void yenta_allocate_res(pci_socke res->end = 0; root = pci_find_parent_resource(socket->dev, res); @@ -109,7 +76,7 @@ diff -urN linux.old/drivers/pcmcia/yenta.c linux.dev/drivers/pcmcia/yenta.c if (!root) return; -@@ -794,6 +822,7 @@ +@@ -794,6 +822,7 @@ static void yenta_allocate_res(pci_socke res->start = res->end = 0; return; }