diff options
author | Dave Airlie <airlied@linux.ie> | 2005-12-29 08:42:49 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-12-29 08:42:49 +0000 |
commit | fc69a2e729532ee062af6676fb187a89f7fffe8a (patch) | |
tree | 4aaeacead2edacee4eefe7768a0ac0794c7c4613 /hw | |
parent | 25d3852b833bc0b61ce8313ce116251a2602b827 (diff) |
Remove PowerMAX_OS define it never worked , it'll never work again,
finishes running joke of OLS2005
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/os-support/bus/Pci.c | 12 | ||||
-rw-r--r-- | hw/xfree86/os-support/bus/Pci.h | 6 | ||||
-rw-r--r-- | hw/xfree86/os-support/bus/freebsdPci.c | 4 | ||||
-rw-r--r-- | hw/xfree86/os-support/bus/ix86Pci.c | 4 | ||||
-rw-r--r-- | hw/xfree86/os-support/bus/linuxPci.c | 4 | ||||
-rw-r--r-- | hw/xfree86/os-support/bus/ppcPci.c | 228 | ||||
-rw-r--r-- | hw/xfree86/os-support/bus/zx1PCI.c | 4 | ||||
-rw-r--r-- | hw/xfree86/os-support/xf86_OSlib.h | 10 |
8 files changed, 3 insertions, 269 deletions
diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c index 4e71eb614..f09425034 100644 --- a/hw/xfree86/os-support/bus/Pci.c +++ b/hw/xfree86/os-support/bus/Pci.c @@ -603,7 +603,7 @@ pciTag(int busnum, int devnum, int funcnum) return(PCI_MAKE_TAG(busnum,devnum,funcnum)); } -#if defined(PCI_MFDEV_SUPPORT) || defined(PowerMAX_OS) +#if defined(PCI_MFDEV_SUPPORT) Bool pciMfDev(int busnum, int devnum) @@ -871,19 +871,9 @@ CARD32 pciByteSwap(CARD32 u) { #if X_BYTE_ORDER == X_BIG_ENDIAN -# if defined(__powerpc__) && defined(PowerMAX_OS) - CARD32 tmp; - - __inst_stwbrx(u, &tmp, 0); - - return(tmp); - -# else /* !PowerMAX_OS */ return lswapl(u); -# endif /* !PowerMAX_OS */ - #else /* !BIG_ENDIAN */ return(u); diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h index 70293d3f4..833c07af0 100644 --- a/hw/xfree86/os-support/bus/Pci.h +++ b/hw/xfree86/os-support/bus/Pci.h @@ -299,8 +299,6 @@ # define ARCH_PCI_INIT netbsdPciInit # define INCLUDE_XF86_MAP_PCI_MEM # define INCLUDE_XF86_NO_DOMAIN -# elif defined(PowerMAX_OS) /* This port is broken */ -# define ARCH_PCI_INIT ppcPciInit # else # define ARCH_PCI_INIT ppcPciInit # define INCLUDE_XF86_MAP_PCI_MEM @@ -403,10 +401,6 @@ typedef struct pci_bus_info { unsigned char numDevices; /* Range of valid devnums */ unsigned char secondary; /* Boolean: bus is a secondary */ int primary_bus; /* Parent bus */ -#ifdef PowerMAX_OS - unsigned long ppc_io_base; /* PowerPC I/O spc membase */ - unsigned long ppc_io_size; /* PowerPC I/O spc size */ -#endif pciBusFuncs_p funcs; /* PCI access functions */ void *pciBusPriv; /* Implementation private data */ pciConfigPtr bridge; /* bridge that opens this bus */ diff --git a/hw/xfree86/os-support/bus/freebsdPci.c b/hw/xfree86/os-support/bus/freebsdPci.c index f6d6f8a6d..2868dafa7 100644 --- a/hw/xfree86/os-support/bus/freebsdPci.c +++ b/hw/xfree86/os-support/bus/freebsdPci.c @@ -79,10 +79,6 @@ static pciBusInfo_t freebsdPci0 = { /* numDevices */ 32, /* secondary */ FALSE, /* primary_bus */ 0, -#ifdef PowerMAX_OS -/* ppc_io_base */ 0, -/* ppc_io_size */ 0, -#endif /* funcs */ &freebsdFuncs0, /* pciBusPriv */ NULL, /* bridge */ NULL diff --git a/hw/xfree86/os-support/bus/ix86Pci.c b/hw/xfree86/os-support/bus/ix86Pci.c index 6e2b650d1..b091ec425 100644 --- a/hw/xfree86/os-support/bus/ix86Pci.c +++ b/hw/xfree86/os-support/bus/ix86Pci.c @@ -211,10 +211,6 @@ static pciBusInfo_t ix86Pci0 = { /* numDevices */ 0, /* Set by ix86PciInit() */ /* secondary */ FALSE, /* primary_bus */ 0, -#ifdef PowerMAX_OS -/* ppc_io_base */ 0, -/* ppc_io_size */ 0, -#endif /* funcs */ &ix86Funcs0, /* Set by ix86PciInit() */ /* pciBusPriv */ NULL, /* bridge */ NULL diff --git a/hw/xfree86/os-support/bus/linuxPci.c b/hw/xfree86/os-support/bus/linuxPci.c index 40fb4604b..bfd576dd3 100644 --- a/hw/xfree86/os-support/bus/linuxPci.c +++ b/hw/xfree86/os-support/bus/linuxPci.c @@ -102,10 +102,6 @@ static pciBusInfo_t linuxPci0 = { /* numDevices */ 32, /* secondary */ FALSE, /* primary_bus */ 0, -#ifdef PowerMAX_OS -/* ppc_io_base */ 0, -/* ppc_io_size */ 0, -#endif /* funcs */ &linuxFuncs0, /* pciBusPriv */ NULL, /* bridge */ NULL diff --git a/hw/xfree86/os-support/bus/ppcPci.c b/hw/xfree86/os-support/bus/ppcPci.c index 7a438af67..3e5ea3187 100644 --- a/hw/xfree86/os-support/bus/ppcPci.c +++ b/hw/xfree86/os-support/bus/ppcPci.c @@ -76,236 +76,8 @@ void ppcPciInit() { -#if defined(PowerMAX_OS) - extern void pmaxPciInit(void); - - pmaxPciInit(); - -#else static void motoppcPciInit(void); motoppcPciInit(); -#endif -} - -#if defined(PowerMAX_OS) - -/* - * Motorola PowerPC platform support - * - * The following code should support the MVME 1600 & 2600 VME boards - * as well as the various PowerStack and RiscPC models. All of these - * machines support PCI config mechanism #1 and use the std config - * address and data regs locations: - * cfg address reg = 0xcf8 (PCI I/O) - * cfg data reg = 0xcfc (PCI I/O) - * - * The moto machines do have different address maps on either side - * of the PCI-host bridge though. - */ -static ADDRESS motoppcBusAddrToHostAddr(PCITAG, PciAddrType, ADDRESS); -static ADDRESS motoppcHostAddrToBusAddr(PCITAG, PciAddrType, ADDRESS); -static CARD32 pciCfgMech1Read(PCITAG tag, int offset); -static void pciCfgMech1Write(PCITAG tag, int offset, CARD32 val); -static void pciCfgMech1SetBits(PCITAG tag, int offset, - CARD32 mask, CARD32 val); - - -static pciBusFuncs_t motoppcFuncs0 = { -/* pciReadLong */ pciCfgMech1Read, -/* pciWriteLong */ pciCfgMech1Write, -/* pciSetBitsLong */ pciCfgMech1SetBits, -/* pciAddrHostToBus */ motoppcHostAddrToBusAddr, -/* pciAddrBusToHost */ motoppcBusAddrToHostAddr -}; - -static pciBusInfo_t motoppcPci0 = { -/* configMech */ PCI_CFG_MECH_1, -/* numDevices */ 32, -/* secondary */ FALSE, -/* primary_bus */ 0, -#ifdef PowerMAX_OS -/* ppc_io_base */ 0x80000000, -/* ppc_io_size */ 64 * 1024, -#endif -/* funcs */ &motoppcFuncs0, -/* pciBusPriv */ NULL, -/* bridge */ NULL -}; - -extern volatile unsigned char *ioBase; - -static void -motoppcPciInit() -{ - pciNumBuses = 1; - pciBusInfo[0] = &motoppcPci0; - pciFindFirstFP = pciGenFindFirst; - pciFindNextFP = pciGenFindNext; - - if (!xf86EnableIO()) - FatalError("motoppcPciInit: EnableIO failed\n"); - - if (ioBase == MAP_FAILED) { - ppcPciIoMap(0); /* Make inb/outb et al work for pci0 and its secondaries */ - - if (ioBase == MAP_FAILED) { - FatalError("motoppcPciInit: Cannot map pci0 I/O segment!!!\n"); - /*NOTREACHED*/ - } - } -} - -extern unsigned long motoPciMemBase = 0; - -#if defined(Lynx) && defined(__powerpc__) -extern unsigned long motoPciMemLen = 0x40000000; -#else -extern unsigned long motoPciMemLen = 0x3f000000; -#endif - -extern unsigned long motoPciMemBaseCPU = 0xc0000000; - -static ADDRESS -motoppcBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr) -{ - unsigned long addr_l = (unsigned long)addr; - - if (type == PCI_MEM) { - if (addr_l >= motoPciMemBase && addr_l < motoPciMemLen) - /* - * PCI memory space addresses [0-0x3effffff] are - * are seen at [0xc0000000,0xfeffffff] on moto host - */ - return((ADDRESS)((motoPciMemBaseCPU - motoPciMemBase) + addr_l)); - - else if (addr_l >= 0x80000000) - /* - * Moto host memory [0,0x7fffffff] is seen at - * [0x80000000,0xffffffff] on PCI bus - */ - return((ADDRESS)(addr_l & 0x7fffffff)); - else - FatalError("motoppcBusAddrToHostAddr: PCI addr 0x%x is not accessible to host!!!\n", - addr_l); - } else - return addr; - - /*NOTREACHED*/ } - -static ADDRESS -motoppcHostAddrToBusAddr(PCITAG tag, PciAddrType type, ADDRESS addr) -{ - unsigned long addr_l = (unsigned long)addr; - - if (type == PCI_MEM) { - if (addr_l < 0x80000000) - /* - * Moto host memory [0,0x7fffffff] is seen at - * [0x80000000,0xffffffff] on PCI bus - */ - return((ADDRESS)(0x80000000 | addr_l)); - - else if (addr_l >= motoPciMemBaseCPU && addr_l < motoPciMemBaseCPU + motoPciMemLen) - /* - * PCI memory space addresses [0-0x3effffff] are - * are seen at [0xc0000000,0xfeffffff] on moto host - */ - return((ADDRESS)(addr_l - (motoPciMemBaseCPU - motoPciMemBase))); - - else - FatalError("motoppcHostAddrToBusAddr: Host addr 0x%x is not accessible to PCI!!!\n", - addr_l); - } else - return addr; - - /*NOTREACHED*/ -} - -#if defined (__powerpc__) -static int buserr_detected; - -static -void buserr(int sig) -{ - buserr_detected = 1; -} -#endif - -static CARD32 -pciCfgMech1Read(PCITAG tag, int offset) -{ - unsigned long rv = 0xffffffff; -#ifdef DEBUGPCI - ErrorF("pciCfgMech1Read(tag=%08x,offset=%08x)\n", tag, offset); -#endif - -#if defined(__powerpc__) - signal(SIGBUS, buserr); - buserr_detected = 0; -#endif - - outl(0xCF8, PCI_EN | tag | (offset & 0xfc)); - rv = inl(0xCFC); - -#if defined(__powerpc__) - signal(SIGBUS, SIG_DFL); - if (buserr_detected) - { -#ifdef DEBUGPCI - ErrorF("pciCfgMech1Read() BUS ERROR\n"); -#endif - return(0xffffffff); - } - else -#endif - return(rv); -} - -static void -pciCfgMech1Write(PCITAG tag, int offset, CARD32 val) -{ -#ifdef DEBUGPCI - ErrorF("pciCfgMech1Write(tag=%08x,offset=%08x,val=%08x)\n", - tag, offset,val); -#endif - -#if defined(__powerpc__) - signal(SIGBUS, SIG_IGN); -#endif - - outl(0xCF8, PCI_EN | tag | (offset & 0xfc)); -#if defined(Lynx) && defined(__powerpc__) - outb(0x80, 0x00); /* without this the next access fails - * on my Powerstack system when we use - * assembler inlines for outl */ -#endif - outl(0xCFC, val); - -#if defined(__powerpc__) - signal(SIGBUS, SIG_DFL); -#endif -} - -static void -pciCfgMech1SetBits(PCITAG tag, int offset, CARD32 mask, CARD32 val) -{ - unsigned long rv = 0xffffffff; - -#if defined(__powerpc__) - signal(SIGBUS, buserr); -#endif - - outl(0xCF8, PCI_EN | tag | (offset & 0xfc)); - rv = inl(0xCFC); - rv = (rv & ~mask) | val; - outl(0xCFC, rv); - -#if defined(__powerpc__) - signal(SIGBUS, SIG_DFL); -#endif -} - -#endif /* PowerMAX_OS */ diff --git a/hw/xfree86/os-support/bus/zx1PCI.c b/hw/xfree86/os-support/bus/zx1PCI.c index 3d219c86f..81111a0ab 100644 --- a/hw/xfree86/os-support/bus/zx1PCI.c +++ b/hw/xfree86/os-support/bus/zx1PCI.c @@ -460,10 +460,6 @@ static pciBusInfo_t zx1FakeBus = { 0, /* numDevices -- copied from bus 0 */ FALSE, /* secondary */ 0, /* primary_bus -- dynamically set */ -#ifdef PowerMAX_OS - 0, /* ppc_io_base -- ignored */ - 0, /* ppc_io_size -- ignored */ -#endif &zx1FakeBusFuncs, /* funcs */ NULL, /* pciBusPriv -- none */ NULL, /* bridge -- dynamically set */ diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h index a154c6a13..ebbdbf156 100644 --- a/hw/xfree86/os-support/xf86_OSlib.h +++ b/hw/xfree86/os-support/xf86_OSlib.h @@ -67,7 +67,7 @@ */ /* $XConsortium: xf86_OSlib.h /main/22 1996/10/27 11:06:31 kaleb $ */ -/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h,v 1.7 2005/05/21 07:46:37 alanc Exp $ */ +/* $XdotOrg: xserver/xorg/hw/xfree86/os-support/xf86_OSlib.h,v 1.13 2005/11/08 06:33:29 jkj Exp $ */ /* * This is private, and should not be included by any drivers. Drivers @@ -131,11 +131,7 @@ typedef signed long xf86ssize_t; # include <errno.h> -# if defined(PowerMAX_OS) -# define HAS_USL_VTS -# include <sys/immu.h> -# include <sys/sysmacros.h> -# elif defined(_NEED_SYSI86) +# if defined(_NEED_SYSI86) # include <sys/immu.h> # if !(defined (sun) && defined (SVR4)) # include <sys/region.h> @@ -218,8 +214,6 @@ typedef signed long xf86ssize_t; # include <sys/mman.h> # if !(defined(sun) && defined (SVR4)) # define DEV_MEM "/dev/pmem" -# elif defined(PowerMAX_OS) -# define DEV_MEM "/dev/iomem" # endif # ifdef SCO325 # undef DEV_MEM |