diff --git a/hw/xfree86/os-support/bus/460gxPCI.c b/hw/xfree86/os-support/bus/460gxPCI.c index 3b16f401a..af4e230e6 100644 --- a/hw/xfree86/os-support/bus/460gxPCI.c +++ b/hw/xfree86/os-support/bus/460gxPCI.c @@ -201,32 +201,46 @@ Get460GXBridgeResources(int bus, * the chipset scan is to be stopped, or FALSE if the scan is to move on to the * next chipset. */ + Bool -xf86PreScan460GX(void) +xorgProbe460GX(scanpciWrapperOpt flags) { pciBusInfo_t *pBusInfo; PCITAG tag; - CARD32 tmp; - int i, devno; /* Bus zero should already be set up */ if (!(pBusInfo = pciBusInfo[0])) { cbn_460gx = -1; return FALSE; } - /* First look for a 460GX's primary host bridge */ tag = PCI_MAKE_TAG(0, 0x10, 0); - if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) { - cbn_460gx = -1; - return FALSE; + if (pciReadLong(tag, PCI_ID_REG) == DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) { + return TRUE; } + cbn_460gx = -1; + + return FALSE; +} + +void +xf86PreScan460GX(void) +{ + pciBusInfo_t *pBusInfo; + PCITAG tag; + CARD32 tmp; + int i, devno; + + if (!(pBusInfo = pciBusInfo[0])) + return; + /* Get CBN (Chipset bus number) */ + tag = PCI_MAKE_TAG(0, 0x10, 0); if (!(cbn_460gx = (unsigned int)pciReadByte(tag, CBN))) { /* Sanity check failed */ cbn_460gx = -1; - return TRUE; + return; } if (pciNumBuses <= cbn_460gx) @@ -242,7 +256,7 @@ xf86PreScan460GX(void) if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) { /* Sanity check failed */ cbn_460gx = -1; - return TRUE; + return; } /* @@ -257,7 +271,7 @@ xf86PreScan460GX(void) DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) { /* Sanity check failed */ cbn_460gx = -1; - return TRUE; + return; } if (devno == 0x10) @@ -278,7 +292,7 @@ xf86PreScan460GX(void) if (cbdevs_460gx & (1 << devno)) { /* Sanity check failed */ cbn_460gx = -1; - return TRUE; + return; } /* @@ -294,7 +308,7 @@ xf86PreScan460GX(void) if (cbdevs_460gx & (1 << devno)) { /* Sanity check failed */ cbn_460gx = -1; - return TRUE; + return; } /* @@ -310,7 +324,7 @@ xf86PreScan460GX(void) break; /* Sanity check failed */ cbn_460gx = -1; - return TRUE; + return; } } @@ -337,7 +351,7 @@ xf86PreScan460GX(void) break; } - return TRUE; + return; } /* This does some 460GX-related processing after the PCI bus scan */ diff --git a/hw/xfree86/os-support/bus/460gxPCI.h b/hw/xfree86/os-support/bus/460gxPCI.h index 2ae9c3528..9459705d0 100644 --- a/hw/xfree86/os-support/bus/460gxPCI.h +++ b/hw/xfree86/os-support/bus/460gxPCI.h @@ -29,8 +29,10 @@ #define PCI_460GX_H 1 #include +#include -Bool xf86PreScan460GX(void); +Bool xorgProbe460GX(scanpciWrapperOpt flags); +void xf86PreScan460GX(void); void xf86PostScan460GX(void); #endif diff --git a/hw/xfree86/os-support/bus/e8870PCI.c b/hw/xfree86/os-support/bus/e8870PCI.c index adbd189f1..9eb34a67a 100644 --- a/hw/xfree86/os-support/bus/e8870PCI.c +++ b/hw/xfree86/os-support/bus/e8870PCI.c @@ -34,17 +34,23 @@ #include "Pci.h" Bool -xf86PreScanE8870(void) +xorgProbeE8870(scanpciWrapperOpt flags) { PCITAG tag; /* Look for an E8870's Hub interface */ tag = PCI_MAKE_TAG(0, 0x1E, 0); - if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_82801_P2P)) - return FALSE; + if (pciReadLong(tag, PCI_ID_REG) == DEVID(VENDOR_INTEL, CHIP_82801_P2P)) + return TRUE; + return FALSE; +} + +void +xf86PreScanE8870(void) +{ /* XXX Fill me in... */ - return TRUE; + return; } void diff --git a/hw/xfree86/os-support/bus/e8870PCI.h b/hw/xfree86/os-support/bus/e8870PCI.h index b910bcfd8..2d16077ac 100644 --- a/hw/xfree86/os-support/bus/e8870PCI.h +++ b/hw/xfree86/os-support/bus/e8870PCI.h @@ -29,8 +29,10 @@ #define PCI_E8870_H 1 #include +#include -Bool xf86PreScanE8870(void); +Bool xorgProbeE8870(scanpciWrapperOpt flags); +void xf86PreScanE8870(void); void xf86PostScanE8870(void); #endif diff --git a/hw/xfree86/os-support/bus/zx1PCI.c b/hw/xfree86/os-support/bus/zx1PCI.c index 5d4d6a991..ce3260c26 100644 --- a/hw/xfree86/os-support/bus/zx1PCI.c +++ b/hw/xfree86/os-support/bus/zx1PCI.c @@ -465,13 +465,7 @@ static pciBusInfo_t zx1FakeBus = { NULL, /* bridge -- dynamically set */ }; -/* - * This checks for, and validates, the presence of the ZX1 chipset, and sets - * pZX1mio to a non-NULL pointer accordingly. This function is called before - * the server's PCI bus scan and returns TRUE if the chipset scan is to be - * stopped, or FALSE if the scan is to move on to the next chipset. - */ -Bool +void xf86PreScanZX1(void) { resRange range; @@ -491,7 +485,7 @@ xf86PreScanZX1(void) mapSize = MIO_SIZE; if (!(pZX1mio = xf86MapVidMem(-1, VIDMEM_MMIO, MIO_BASE, mapSize))) - return FALSE; + return; /* Look for ZX1's SBA and IOC */ /* XXX What about Dino? */ if ((MIO_LONG(MIO_FUNCTION0 + PCI_ID_REG) != @@ -500,7 +494,7 @@ xf86PreScanZX1(void) DEVID(VENDOR_HP, CHIP_ZX1_IOC))) { xf86UnMapVidMem(-1, pZX1mio, mapSize); pZX1mio = NULL; - return FALSE; + return; } /* Map rope configuration space */ @@ -510,7 +504,7 @@ xf86PreScanZX1(void) !(pZX1ioa = xf86MapVidMem(-1, VIDMEM_MMIO, ioaaddr, IOA_SIZE))) { xf86UnMapVidMem(-1, pZX1mio, mapSize); pZX1mio = NULL; - return TRUE; + return; } for (i = 0; i < 8; i++) { @@ -924,7 +918,7 @@ xf86PreScanZX1(void) nRange = 0; - return TRUE; + return; } /* This is called to finalise the results of a PCI bus scan */ diff --git a/hw/xfree86/os-support/bus/zx1PCI.h b/hw/xfree86/os-support/bus/zx1PCI.h index b1e8a95b5..f46a68a30 100644 --- a/hw/xfree86/os-support/bus/zx1PCI.h +++ b/hw/xfree86/os-support/bus/zx1PCI.h @@ -30,7 +30,7 @@ #include -Bool xf86PreScanZX1(void); +void xf86PreScanZX1(void); void xf86PostScanZX1(void); #endif