X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/0c264b8df6ae6bd832c2d38186b812a09d9a4c70..ac329a6a7ec73bc191d17cd0dbb1c34cf570e879:/target/linux/brcm-2.6/patches/001-bcm947xx.patch diff --git a/target/linux/brcm-2.6/patches/001-bcm947xx.patch b/target/linux/brcm-2.6/patches/001-bcm947xx.patch index 380e8190e..5e855be92 100644 --- a/target/linux/brcm-2.6/patches/001-bcm947xx.patch +++ b/target/linux/brcm-2.6/patches/001-bcm947xx.patch @@ -1829,22 +1829,22 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm + BCMINIT(sb_setirq)(sbh, 0, SB_CODEC, 0); + BCMINIT(sb_setirq)(sbh, 0, SB_EXTIF, 0); + BCMINIT(sb_setirq)(sbh, 2, SB_ENET, 1); -+ BCMINIT(sb_setirq)(sbh, 3, SB_ILINE20, 0); ++ // BCMINIT(sb_setirq)(sbh, 3, SB_ILINE20, 0); /* seems to be unused */ + BCMINIT(sb_setirq)(sbh, 4, SB_PCI, 0); + ASSERT(eir); + value = BCMINIT(early_nvram_get)("et0phyaddr"); + if (value && !strcmp(value, "31")) { + /* Enable internal UART */ + W_REG(&eir->corecontrol, CC_UE); -+ /* Give USB its own interrupt */ -+ BCMINIT(sb_setirq)(sbh, 1, SB_USB, 0); + } else { + /* Disable internal UART */ + W_REG(&eir->corecontrol, 0); + /* Give Ethernet its own interrupt */ + BCMINIT(sb_setirq)(sbh, 1, SB_ENET, 0); -+ BCMINIT(sb_setirq)(sbh, 0, SB_USB, 0); + } ++ /* USB gets its own interrupt */ ++ BCMINIT(sb_setirq)(sbh, 3, SB_USB, 0); ++ + break; + case BCM5350_DEVICE_ID: + /* Clear interrupt map */ @@ -2512,6 +2512,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm +} + + + diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbpci.c linux.dev/arch/mips/bcm947xx/broadcom/sbpci.c --- linux.old/arch/mips/bcm947xx/broadcom/sbpci.c 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/arch/mips/bcm947xx/broadcom/sbpci.c 2006-10-15 23:29:14.000000000 +0200 @@ -3053,7 +3054,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbpci.c linux.dev/arch/mips/bcm9 diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bcm947xx/broadcom/sbutils.c --- linux.old/arch/mips/bcm947xx/broadcom/sbutils.c 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/arch/mips/bcm947xx/broadcom/sbutils.c 2006-10-15 23:29:14.000000000 +0200 -@@ -0,0 +1,2370 @@ +@@ -0,0 +1,2371 @@ +/* + * Misc utility routines for accessing chip-specific features + * of the SiliconBackplane-based Broadcom chips. @@ -5424,6 +5425,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc +EXPORT_SYMBOL(sb_gpiosetcore); +EXPORT_SYMBOL(sb_gpiotimerval); +EXPORT_SYMBOL(sb_watchdog); ++EXPORT_SYMBOL(sb_kattach); diff -urN linux.old/arch/mips/bcm947xx/broadcom/sflash.c linux.dev/arch/mips/bcm947xx/broadcom/sflash.c --- linux.old/arch/mips/bcm947xx/broadcom/sflash.c 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/arch/mips/bcm947xx/broadcom/sflash.c 2006-10-15 23:29:14.000000000 +0200 @@ -11243,7 +11245,7 @@ diff -urN linux.old/arch/mips/bcm947xx/Makefile linux.dev/arch/mips/bcm947xx/Mak diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c --- linux.old/arch/mips/bcm947xx/pci.c 1970-01-01 01:00:00.000000000 +0100 +++ linux.dev/arch/mips/bcm947xx/pci.c 2006-10-15 23:29:14.000000000 +0200 -@@ -0,0 +1,215 @@ +@@ -0,0 +1,227 @@ +#include +#include +#include @@ -11329,7 +11331,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c +static struct resource ext_pci_io_resource = { + .name = "Ext PCI I/O resources", + .start = 0x100, -+ .end = 0x1FF, ++ .end = 0x7FF, + .flags = IORESOURCE_IO, +}; + @@ -11356,11 +11358,23 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c + +int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ ++ unsigned long flags; + u8 irq; ++ uint idx; + -+ if (dev->bus->number == 1) -+ return 2; -+ ++ /* external: use the irq of the pci core */ ++ if (dev->bus->number >= 1) { ++ spin_lock_irqsave(&sbh_lock, flags); ++ idx = sb_coreidx(sbh); ++ sb_setcore(sbh, SB_PCI, 0); ++ irq = sb_irq(sbh); ++ sb_setcoreidx(sbh, idx); ++ spin_unlock_irqrestore(&sbh_lock, flags); ++ ++ return irq + 2; ++ } ++ ++ /* internal */ + pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); + return irq + 2; +}