diff options
Diffstat (limited to 'drivers/ssb/scan.c')
| -rw-r--r-- | drivers/ssb/scan.c | 54 | 
1 files changed, 31 insertions, 23 deletions
diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c index ee079ab9fb2..b9429df583e 100644 --- a/drivers/ssb/scan.c +++ b/drivers/ssb/scan.c @@ -2,7 +2,7 @@   * Sonics Silicon Backplane   * Bus scanning   * - * Copyright (C) 2005-2007 Michael Buesch <mb@bu3sch.de> + * Copyright (C) 2005-2007 Michael Buesch <m@bues.ch>   * Copyright (C) 2005 Martin Langer <martin-langer@gmx.de>   * Copyright (C) 2005 Stefano Brivio <st3@riseup.net>   * Copyright (C) 2005 Danny van Dyk <kugelfang@gentoo.org> @@ -90,6 +90,8 @@ const char *ssb_core_name(u16 coreid)  		return "ARM 1176";  	case SSB_DEV_ARM_7TDMI:  		return "ARM 7TDMI"; +	case SSB_DEV_ARM_CM3: +		return "ARM Cortex M3";  	}  	return "UNKNOWN";  } @@ -123,8 +125,7 @@ static u16 pcidev_to_chipid(struct pci_dev *pci_dev)  		chipid_fallback = 0x4401;  		break;  	default: -		ssb_printk(KERN_ERR PFX -			   "PCI-ID not in fallback list\n"); +		ssb_err("PCI-ID not in fallback list\n");  	}  	return chipid_fallback; @@ -150,8 +151,7 @@ static u8 chipid_to_nrcores(u16 chipid)  	case 0x4704:  		return 9;  	default: -		ssb_printk(KERN_ERR PFX -			   "CHIPID not in nrcores fallback list\n"); +		ssb_err("CHIPID not in nrcores fallback list\n");  	}  	return 1; @@ -258,7 +258,10 @@ static int we_support_multiple_80211_cores(struct ssb_bus *bus)  #ifdef CONFIG_SSB_PCIHOST  	if (bus->bustype == SSB_BUSTYPE_PCI) {  		if (bus->host_pci->vendor == PCI_VENDOR_ID_BROADCOM && -		    bus->host_pci->device == 0x4324) +		    ((bus->host_pci->device == 0x4313) || +		     (bus->host_pci->device == 0x431A) || +		     (bus->host_pci->device == 0x4321) || +		     (bus->host_pci->device == 0x4324)))  			return 1;  	}  #endif /* CONFIG_SSB_PCIHOST */ @@ -307,8 +310,7 @@ int ssb_bus_scan(struct ssb_bus *bus,  	} else {  		if (bus->bustype == SSB_BUSTYPE_PCI) {  			bus->chip_id = pcidev_to_chipid(bus->host_pci); -			pci_read_config_word(bus->host_pci, PCI_REVISION_ID, -					     &bus->chip_rev); +			bus->chip_rev = bus->host_pci->revision;  			bus->chip_package = 0;  		} else {  			bus->chip_id = 0x4710; @@ -316,12 +318,13 @@ int ssb_bus_scan(struct ssb_bus *bus,  			bus->chip_package = 0;  		}  	} +	ssb_info("Found chip with id 0x%04X, rev 0x%02X and package 0x%02X\n", +		 bus->chip_id, bus->chip_rev, bus->chip_package);  	if (!bus->nr_devices)  		bus->nr_devices = chipid_to_nrcores(bus->chip_id);  	if (bus->nr_devices > ARRAY_SIZE(bus->devices)) { -		ssb_printk(KERN_ERR PFX -			   "More than %d ssb cores found (%d)\n", -			   SSB_MAX_NR_CORES, bus->nr_devices); +		ssb_err("More than %d ssb cores found (%d)\n", +			SSB_MAX_NR_CORES, bus->nr_devices);  		goto err_unmap;  	}  	if (bus->bustype == SSB_BUSTYPE_SSB) { @@ -363,8 +366,7 @@ int ssb_bus_scan(struct ssb_bus *bus,  			nr_80211_cores++;  			if (nr_80211_cores > 1) {  				if (!we_support_multiple_80211_cores(bus)) { -					ssb_dprintk(KERN_INFO PFX "Ignoring additional " -						    "802.11 core\n"); +					ssb_dbg("Ignoring additional 802.11 core\n");  					continue;  				}  			} @@ -372,8 +374,7 @@ int ssb_bus_scan(struct ssb_bus *bus,  		case SSB_DEV_EXTIF:  #ifdef CONFIG_SSB_DRIVER_EXTIF  			if (bus->extif.dev) { -				ssb_printk(KERN_WARNING PFX -					   "WARNING: Multiple EXTIFs found\n"); +				ssb_warn("WARNING: Multiple EXTIFs found\n");  				break;  			}  			bus->extif.dev = dev; @@ -381,8 +382,7 @@ int ssb_bus_scan(struct ssb_bus *bus,  			break;  		case SSB_DEV_CHIPCOMMON:  			if (bus->chipco.dev) { -				ssb_printk(KERN_WARNING PFX -					   "WARNING: Multiple ChipCommon found\n"); +				ssb_warn("WARNING: Multiple ChipCommon found\n");  				break;  			}  			bus->chipco.dev = dev; @@ -391,8 +391,7 @@ int ssb_bus_scan(struct ssb_bus *bus,  		case SSB_DEV_MIPS_3302:  #ifdef CONFIG_SSB_DRIVER_MIPS  			if (bus->mipscore.dev) { -				ssb_printk(KERN_WARNING PFX -					   "WARNING: Multiple MIPS cores found\n"); +				ssb_warn("WARNING: Multiple MIPS cores found\n");  				break;  			}  			bus->mipscore.dev = dev; @@ -405,21 +404,30 @@ int ssb_bus_scan(struct ssb_bus *bus,  				/* 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) +					if (pci_is_pcie(bus->host_pci))  						continue;  				} else { -					if (!bus->host_pci->is_pcie) +					if (!pci_is_pcie(bus->host_pci))  						continue;  				}  			}  			if (bus->pcicore.dev) { -				ssb_printk(KERN_WARNING PFX -					   "WARNING: Multiple PCI(E) cores found\n"); +				ssb_warn("WARNING: Multiple PCI(E) cores found\n");  				break;  			}  			bus->pcicore.dev = dev;  #endif /* CONFIG_SSB_DRIVER_PCICORE */  			break; +		case SSB_DEV_ETHERNET: +			if (bus->bustype == SSB_BUSTYPE_PCI) { +				if (bus->host_pci->vendor == PCI_VENDOR_ID_BROADCOM && +				    (bus->host_pci->device & 0xFF00) == 0x4300) { +					/* This is a dangling ethernet core on a +					 * wireless device. Ignore it. */ +					continue; +				} +			} +			break;  		default:  			break;  		}  | 
