Remove PowerMAX_OS define it never worked , it'll never work again,

finishes running joke of OLS2005
This commit is contained in:
Dave Airlie 2005-12-29 08:42:49 +00:00
parent 25d3852b83
commit fc69a2e729
9 changed files with 17 additions and 269 deletions

View File

@ -1,3 +1,17 @@
2005-12-29 Dave Airlie <airlied@linux.ie>
* hw/xfree86/os-support/bus/Pci.c: (pciByteSwap):
* hw/xfree86/os-support/bus/Pci.h:
* hw/xfree86/os-support/bus/freebsdPci.c:
* hw/xfree86/os-support/bus/ix86Pci.c:
* hw/xfree86/os-support/bus/linuxPci.c:
* hw/xfree86/os-support/bus/ppcPci.c: (ppcPciInit):
* hw/xfree86/os-support/bus/zx1PCI.c:
* hw/xfree86/os-support/xf86_OSlib.h:
Remove PowerMAX_OS define it never worked , it'll never work
again, finishes running joke of OLS2005
2005-12-28 Eric Anholt <anholt@FreeBSD.org>
* hw/xgl/Makefile.am:

View File

@ -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);

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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 */

View File

@ -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