diff options
Diffstat (limited to 'xorg-server/hw/xfree86/os-support/bus/Pci.h')
-rw-r--r-- | xorg-server/hw/xfree86/os-support/bus/Pci.h | 82 |
1 files changed, 6 insertions, 76 deletions
diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.h b/xorg-server/hw/xfree86/os-support/bus/Pci.h index 557483b9b..5feb73349 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Pci.h +++ b/xorg-server/hw/xfree86/os-support/bus/Pci.h @@ -115,16 +115,10 @@ /* * Global Definitions */ -#define MAX_PCI_DEVICES 128 /* Max number of devices accomodated */ - /* by xf86scanpci */ -#if defined(sun) && defined(SVR4) && defined(sparc) -# define MAX_PCI_BUSES 4096 /* Max number of PCI buses */ -#elif (defined(__alpha__) || defined(__ia64__)) && defined (linux) -# define MAX_PCI_DOMAINS 512 -# define PCI_DOM_MASK 0x01fful -# define MAX_PCI_BUSES (MAX_PCI_DOMAINS*256) /* 256 per domain */ +#if (defined(__alpha__) || defined(__ia64__)) && defined (linux) +#define PCI_DOM_MASK 0x01fful #else -# define MAX_PCI_BUSES 256 /* Max number of PCI buses */ +#define PCI_DOM_MASK 0x0ffu #endif #define DEVID(vendor, device) \ @@ -174,58 +168,21 @@ #endif /* !defined(DEBUGPCI) */ -/* - * PCI Config mechanism definitions - */ -#define PCI_EN 0x80000000 - -#define PCI_CFGMECH1_ADDRESS_REG 0xCF8 -#define PCI_CFGMECH1_DATA_REG 0xCFC - -#define PCI_CFGMECH1_MAXDEV 32 - #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \ - defined(__DragonFly__) + defined(__DragonFly__) || defined(__sun) #define ARCH_PCI_INIT bsdPciInit #endif #if defined(linux) -# define ARCH_PCI_INIT linuxPciInit -# if defined(__m32r__) -# define INCLUDE_XF86_MAP_PCI_MEM -# define INCLUDE_XF86_NO_DOMAIN -# endif +#define ARCH_PCI_INIT linuxPciInit #endif /* defined(linux) */ - -#if !defined(ARCH_PCI_INIT) -/* - * Select architecture specific PCI init function - */ -#if defined(__i386__) || defined(__i386) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) -# define ARCH_PCI_INIT ix86PciInit -#elif defined(__powerpc__) || defined(__powerpc64__) -# define ARCH_PCI_INIT ppcPciInit -#elif defined(__sparc__) || defined(sparc) -# define ARCH_PCI_INIT sparcPciInit -# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge -#endif -#endif /* !defined(ARCH_PCI_INIT) */ - #ifndef ARCH_PCI_INIT #error No PCI support available for this architecture/OS combination #endif extern void ARCH_PCI_INIT(void); -#if defined(XF86SCANPCI_WRAPPER) -typedef enum { - SCANPCI_INIT, - SCANPCI_TERM -} scanpciWrapperOpt; -extern void XF86SCANPCI_WRAPPER(scanpciWrapperOpt flags); -#endif - /* * Table of functions used to access a specific PCI bus domain * (e.g. a primary PCI bus and all of its secondaries) @@ -234,36 +191,9 @@ typedef struct pci_bus_funcs { ADDRESS (*pciAddrBusToHost)(PCITAG, PciAddrType, ADDRESS); } pciBusFuncs_t, *pciBusFuncs_p; -/* - * pciBusInfo_t - One structure per defined PCI bus - */ -typedef struct pci_bus_info { - unsigned char configMech; /* PCI config type to use */ - unsigned char numDevices; /* Range of valid devnums */ - unsigned char secondary; /* Boolean: bus is a secondary */ - int primary_bus; /* Parent bus */ - pciBusFuncs_p funcs; /* PCI access functions */ - void *pciBusPriv; /* Implementation private data */ - struct pci_device *bridge; /* bridge that opens this bus */ -} pciBusInfo_t; - -#define HOST_NO_BUS ((pciBusInfo_t *)(-1)) - -/* configMech values */ -#define PCI_CFG_MECH_UNKNOWN 0 /* Not yet known */ -#define PCI_CFG_MECH_1 1 /* Most machines */ -#define PCI_CFG_MECH_2 2 /* Older PC's */ -#define PCI_CFG_MECH_OTHER 3 /* Something else */ - /* Generic PCI service functions and helpers */ -CARD32 pciCfgMech1Read(PCITAG tag, int offset); -void pciCfgMech1Write(PCITAG tag, int offset, CARD32 val); -void pciCfgMech1SetBits(PCITAG tag, int offset, CARD32 mask, - CARD32 val); ADDRESS pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS); -extern int pciMaxBusNum; - -extern pciBusInfo_t *pciBusInfo[]; +extern pciBusFuncs_t *pciBusFuncs; #endif /* _PCI_H */ |