X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/59390356342939a1b9be7a6509d7cd12d3897775..c8748126906b1a7c3571d2b17d69ea3e0d3e4cae:/target/linux/generic-2.6/files/drivers/ssb/scan.c diff --git a/target/linux/generic-2.6/files/drivers/ssb/scan.c b/target/linux/generic-2.6/files/drivers/ssb/scan.c index b5d909c3a..63ee5cfbe 100644 --- a/target/linux/generic-2.6/files/drivers/ssb/scan.c +++ b/target/linux/generic-2.6/files/drivers/ssb/scan.c @@ -15,19 +15,17 @@ #include #include #include -#include +#include -#ifdef CONFIG_SSB_PCMCIAHOST -# include -# include -# include -# include -#endif +#include +#include +#include +#include #include "ssb_private.h" -const char * ssb_core_name(u16 coreid) +const char *ssb_core_name(u16 coreid) { switch (coreid) { case SSB_DEV_CHIPCOMMON: @@ -205,7 +203,7 @@ void ssb_iounmap(struct ssb_bus *bus) #ifdef CONFIG_SSB_PCIHOST pci_iounmap(bus->host_pci, bus->mmio); #else - assert(0); /* Can't reach this code. */ + SSB_BUG_ON(1); /* Can't reach this code. */ #endif break; } @@ -213,8 +211,8 @@ void ssb_iounmap(struct ssb_bus *bus) bus->mapped_device = NULL; } -static void __iomem * ssb_ioremap(struct ssb_bus *bus, - unsigned long baseaddr) +static void __iomem *ssb_ioremap(struct ssb_bus *bus, + unsigned long baseaddr) { void __iomem *mmio = NULL; @@ -229,7 +227,7 @@ static void __iomem * ssb_ioremap(struct ssb_bus *bus, #ifdef CONFIG_SSB_PCIHOST mmio = pci_iomap(bus->host_pci, 0, ~0UL); #else - assert(0); /* Can't reach this code. */ + SSB_BUG_ON(1); /* Can't reach this code. */ #endif break; } @@ -390,6 +388,17 @@ int ssb_bus_scan(struct ssb_bus *bus, case SSB_DEV_PCI: case SSB_DEV_PCIE: #ifdef CONFIG_SSB_DRIVER_PCICORE + if (bus->bustype == SSB_BUSTYPE_PCI) { + /* Ignore PCI cores on PCI-E cards. + * Ignore PCI-E cores on PCI cards. */ + if (dev->id.coreid == SSB_DEV_PCI) { + if (bus->host_pci->is_pcie) + continue; + } else { + if (!bus->host_pci->is_pcie) + continue; + } + } if (bus->pcicore.dev) { ssb_printk(KERN_WARNING PFX "WARNING: Multiple PCI(E) cores found\n");