svn commit: r286976 - head/sys/powerpc/mpc85xx
Justin Hibbits
jhibbits at FreeBSD.org
Fri Aug 21 02:22:52 UTC 2015
Author: jhibbits
Date: Fri Aug 21 02:22:51 2015
New Revision: 286976
URL: https://svnweb.freebsd.org/changeset/base/286976
Log:
Simplify the PCI bus scanning logic.
Rather than special casing on PCIC_BRIDGE || PCIC_PROCESSOR, allow all
HDRTYPE_BRIDGE types.
Obtained from: Semihalf
Sponsored by: Alex Perez/Intertial Computing
Modified:
head/sys/powerpc/mpc85xx/pci_mpc85xx.c
Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx.c
==============================================================================
--- head/sys/powerpc/mpc85xx/pci_mpc85xx.c Thu Aug 20 22:44:26 2015 (r286975)
+++ head/sys/powerpc/mpc85xx/pci_mpc85xx.c Fri Aug 21 02:22:51 2015 (r286976)
@@ -265,7 +265,7 @@ fsl_pcib_attach(device_t dev)
*/
sc->sc_busnr = 0;
maxslot = (sc->sc_pcie) ? 0 : PCI_SLOTMAX;
- fsl_pcib_init(sc, sc->sc_busnr, maxslot);
+ sc->sc_busnr = fsl_pcib_init(sc, sc->sc_busnr, maxslot);
if (sc->sc_pcie) {
ltssm = fsl_pcib_cfgread(sc, 0, 0, 0, PCIR_LTSSM, 1);
@@ -570,19 +570,8 @@ fsl_pcib_init(struct fsl_pcib_softc *sc,
subclass = fsl_pcib_read_config(sc->sc_dev, bus, slot,
func, PCIR_SUBCLASS, 1);
- /*
- * The PCI Root Complex comes up as a Processor/PowerPC,
- * but is a bridge.
- */
- /* Allow only proper PCI-PCI briges */
- if (class != PCIC_BRIDGE && class != PCIC_PROCESSOR)
- continue;
- if (subclass != PCIS_BRIDGE_PCI &&
- subclass != PCIS_PROCESSOR_POWERPC)
- continue;
-
- if (subclass == PCIS_PROCESSOR_POWERPC &&
- hdrtype != PCIM_HDRTYPE_BRIDGE)
+ /* Allow all DEVTYPE 1 devices */
+ if (hdrtype != PCIM_HDRTYPE_BRIDGE)
continue;
secbus++;
More information about the svn-src-all
mailing list