[PATCH video-chips 1/3] config: remove ISA bus code, as support is removed from xserver

Gaetan Nadon memsize at videotron.ca
Wed Apr 7 08:46:00 PDT 2010


Remove declaration check and AM conditional HAVE_ISA along
with the code conditionnaly included.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 configure.ac    |    8 --
 src/ct_driver.c |  234 -------------------------------------------------------
 2 files changed, 0 insertions(+), 242 deletions(-)

diff --git a/configure.ac b/configure.ac
index cb49d5b..4f0d80b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,14 +78,6 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
 fi
 AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
 
-save_CFLAGS="$CFLAGS"
-CFLAGS="$XORG_CFLAGS"
-AC_CHECK_DECL(xf86ConfigIsaEntity,
-	      [AC_DEFINE(HAVE_ISA, 1, [Have ISA support])],
-	      [],
-	      [#include "xf86.h"])
-CFLAGS="$save_CFLAGS"
-
 # Checks for header files.
 AC_HEADER_STDC
 
diff --git a/src/ct_driver.c b/src/ct_driver.c
index 6cf482a..19aa689 100644
--- a/src/ct_driver.c
+++ b/src/ct_driver.c
@@ -102,11 +102,6 @@
 /* All drivers implementing backing store need this */
 #include "mibstore.h"
 
-/* All drivers using the mi banking wrapper need this */
-#ifdef HAVE_ISA
-#include "mibank.h"
-#endif
-
 /* All drivers using the mi colormap manipulation need this */
 #include "micmap.h"
 
@@ -558,28 +553,6 @@ static PciChipsets CHIPSPCIchipsets[] = {
     { -1,	     -1,	     RES_UNDEFINED}
 };
 
-#ifdef HAVE_ISA
-static IsaChipsets CHIPSISAchipsets[] = {
-    { CHIPS_CT65520,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT65525,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT65530,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT65535,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT65540,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT65545,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT65546,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT65548,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT65550,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT65554,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT65555,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT68554,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT69000,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT69030,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT64200,		RES_EXCLUSIVE_VGA },
-    { CHIPS_CT64300,		RES_EXCLUSIVE_VGA },
-    { -1,			RES_UNDEFINED }
-};
-#endif
-
 /* The options supported by the Chips and Technologies Driver */
 typedef enum {
     OPTION_LINEAR,
@@ -950,130 +923,11 @@ CHIPSProbe(DriverPtr drv, int flags)
 	}
     }
 
-#ifdef HAVE_ISA 
-    /* Isa Bus */
-    numUsed = xf86MatchIsaInstances(CHIPS_NAME,CHIPSChipsets,CHIPSISAchipsets,
-				    drv,chipsFindIsaDevice,devSections,
-				    numDevSections,&usedChips);
-    if (numUsed > 0) {
-	if (flags & PROBE_DETECT)
-	    foundScreen = TRUE;
-	else for (i = 0; i < numUsed; i++) {
-	    ScrnInfoPtr pScrn = NULL;
-	    if ((pScrn = xf86ConfigIsaEntity(pScrn,0,
-						   usedChips[i],
-						   CHIPSISAchipsets,NULL,
-						   NULL,NULL,NULL,NULL))) {
-		pScrn->driverVersion = CHIPS_VERSION;
-		pScrn->driverName    = CHIPS_DRIVER_NAME;
-		pScrn->name          = CHIPS_NAME;
-		pScrn->Probe         = CHIPSProbe;
-		pScrn->PreInit       = CHIPSPreInit;
-		pScrn->ScreenInit    = CHIPSScreenInit;
-		pScrn->SwitchMode    = CHIPSSwitchMode;
-		pScrn->AdjustFrame   = CHIPSAdjustFrame;
-		pScrn->EnterVT       = CHIPSEnterVT;
-		pScrn->LeaveVT       = CHIPSLeaveVT;
-		pScrn->FreeScreen    = CHIPSFreeScreen;
-		pScrn->ValidMode     = CHIPSValidMode;
-		foundScreen = TRUE;
-	    }
-	    xfree(usedChips);
-	}
-    }
-#endif
-    
     xfree(devSections);
     return foundScreen;
 }
 #endif
 
-#ifdef HAVE_ISA
-static int
-chipsFindIsaDevice(GDevPtr dev)
-{
-    int found = -1;
-    unsigned char tmp;
-
-    /* 
-     * This function has the only direct register access in the C&T driver. 
-     * All other register access through functions to allow for full MMIO.
-     */
-    outb(0x3D6, 0x00);
-    tmp = inb(0x3D7);
-
-    switch (tmp & 0xF0) {
-    case 0x70: 		/* CT65520 */
-	found = CHIPS_CT65520; break;
-    case 0x80:		/* CT65525 or CT65530 */
-	found = CHIPS_CT65530; break;
-    case 0xA0:		/* CT64200 */
-	found = CHIPS_CT64200; break;
-    case 0xB0:		/* CT64300 */
-	found = CHIPS_CT64300; break;
-    case 0xC0:		/* CT65535 */
-	found = CHIPS_CT65535; break;
-    default:
-	switch (tmp & 0xF8) {
-	    case 0xD0:		/* CT65540 */
-		found = CHIPS_CT65540; break;
-	    case 0xD8:		/* CT65545 or CT65546 or CT65548 */
-		switch (tmp & 7) {
-		case 3:
-		    found = CHIPS_CT65546; break;
-		case 4:
-		    found = CHIPS_CT65548; break;
-		default:
-		    found = CHIPS_CT65545; break;
-
-		}
-		break;
-	    default:
-		if (tmp == 0x2C) {
-		    outb(0x3D6, 0x01);
-		    tmp = inb(0x3D7);
-		    if (tmp != 0x10) break;
-		    outb(0x3D6, 0x02);
-		    tmp = inb(0x3D7);
-		    switch (tmp) {
-		    case 0xE0:		/* CT65550 */
-			found = CHIPS_CT65550; break;
-		    case 0xE4:		/* CT65554 */
-			found = CHIPS_CT65554; break;
-		    case 0xE5:		/* CT65555 */
-			found = CHIPS_CT65555; break;
-		    case 0xF4:		/* CT68554 */
-			found = CHIPS_CT68554; break;
-		    case 0xC0:		/* CT69000 */
-			found = CHIPS_CT69000; break;
-		    case 0x30:		/* CT69030 */
-			outb(0x3D6, 0x03);
-			tmp = inb(0x3D7);
-			if (tmp == 0xC)
-			    found = CHIPS_CT69030;
-			break;
-		    default:
-			break;
-		    }
-		}
-		break;
-	}
-	break;
-    }
-    /* We only want ISA/VL Bus - so check for PCI Bus */
-    if(found > CHIPS_CT65548) {
-	outb(0x3D6, 0x08);
-	tmp = inb(0x3D7);
-	if(tmp & 0x01) found = -1; 
-    } else if(found > CHIPS_CT65535) {
-	outb(0x3D6, 0x01);
-	tmp = inb(0x3D7);
-	if ((tmp & 0x07) == 0x06) found = -1;
-    }
-    return found;
-}
-#endif
-
 /* Mandatory */
 Bool
 CHIPSPreInit(ScrnInfoPtr pScrn, int flags)
@@ -1548,12 +1402,10 @@ chipsPreInitHiQV(ScrnInfoPtr pScrn, int flags)
 	from = X_CONFIG;
     }
 
-#ifndef HAVE_ISA
     if (!(cPtr->Flags & ChipsLinearSupport)) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Linear framebuffer required\n");
 	return FALSE;
     }
-#endif
 
     /* linear base */
     if (cPtr->Flags & ChipsLinearSupport) {
@@ -2659,12 +2511,10 @@ chipsPreInitWingine(ScrnInfoPtr pScrn, int flags)
 	from = X_CONFIG;
     }
 
-#ifndef HAVE_ISA
     if (!(cPtr->Flags & ChipsLinearSupport)) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Linear framebuffer required\n");
 	return FALSE;
     }
-#endif
 
     /* linear base */
     if (useLinear) {
@@ -3129,12 +2979,10 @@ chipsPreInit655xx(ScrnInfoPtr pScrn, int flags)
 	from = X_CONFIG;
     }
     
-#ifndef HAVE_ISA
     if (!(cPtr->Flags & ChipsLinearSupport)) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Linear framebuffer required\n");
 	return FALSE;
     }
-#endif
 
     /* linear base */
     if (useLinear) {
@@ -4146,88 +3994,6 @@ CHIPSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 
     cPtr->HWCursorShown = FALSE;
 
-#ifdef HAVE_ISA
-    if (!(cPtr->Flags & ChipsLinearSupport)) {
-	miBankInfoPtr pBankInfo;
-
-	/* Setup the vga banking variables */
-	pBankInfo = (miBankInfoPtr)xnfcalloc(sizeof(miBankInfoRec),1);
-	if (pBankInfo == NULL)
-	    return FALSE;
-	
-#if defined(__arm32__)
-	cPtr->Bank = -1;
-#endif
-	pBankInfo->pBankA = hwp->Base;
-	pBankInfo->pBankB = (unsigned char *)hwp->Base + 0x08000;
-	pBankInfo->BankSize = 0x08000;
-	pBankInfo->nBankDepth = (pScrn->depth == 4) ? 1 : pScrn->depth;
-
-	if (IS_HiQV(cPtr)) {
-	    pBankInfo->pBankB = hwp->Base;
-	    pBankInfo->BankSize = 0x10000;
-	    if (pScrn->bitsPerPixel < 8) {
-		pBankInfo->SetSourceBank =
-			(miBankProcPtr)CHIPSHiQVSetReadWritePlanar;
-		pBankInfo->SetDestinationBank =
-			(miBankProcPtr)CHIPSHiQVSetReadWritePlanar;
-		pBankInfo->SetSourceAndDestinationBanks =
-			(miBankProcPtr)CHIPSHiQVSetReadWritePlanar;
-	    } else {
-		pBankInfo->SetSourceBank =
-			(miBankProcPtr)CHIPSHiQVSetReadWrite;
-		pBankInfo->SetDestinationBank =
-			(miBankProcPtr)CHIPSHiQVSetReadWrite;
-		pBankInfo->SetSourceAndDestinationBanks =
-			(miBankProcPtr)CHIPSHiQVSetReadWrite;
-	    }
-	} else {
-	    if (IS_Wingine(cPtr)) {
-		if (pScrn->bitsPerPixel < 8) {
-		    pBankInfo->SetSourceBank =
-			    (miBankProcPtr)CHIPSWINSetReadPlanar;
-		    pBankInfo->SetDestinationBank =
-			    (miBankProcPtr)CHIPSWINSetWritePlanar;
-		    pBankInfo->SetSourceAndDestinationBanks =
-			    (miBankProcPtr)CHIPSWINSetReadWritePlanar;
-		} else {
-		    pBankInfo->SetSourceBank = (miBankProcPtr)CHIPSWINSetRead;
-		    pBankInfo->SetDestinationBank =
-			    (miBankProcPtr)CHIPSWINSetWrite;
-		    pBankInfo->SetSourceAndDestinationBanks =
-			    (miBankProcPtr)CHIPSWINSetReadWrite;
-		}
-	    } else {
-		if (pScrn->bitsPerPixel < 8) {
-		    pBankInfo->SetSourceBank =
-			    (miBankProcPtr)CHIPSSetReadPlanar;
-		    pBankInfo->SetDestinationBank =
-			    (miBankProcPtr)CHIPSSetWritePlanar;
-		    pBankInfo->SetSourceAndDestinationBanks =
-			    (miBankProcPtr)CHIPSSetReadWritePlanar;
-		} else {
-		    pBankInfo->SetSourceBank = (miBankProcPtr)CHIPSSetRead;
-		    pBankInfo->SetDestinationBank =
-			    (miBankProcPtr)CHIPSSetWrite;
-		    pBankInfo->SetSourceAndDestinationBanks =
-			    (miBankProcPtr)CHIPSSetReadWrite;
-		}
-	    }
-	}
-	if (!miInitializeBanking(pScreen, pScrn->virtualX, pScrn->virtualY,
-				 pScrn->displayWidth, pBankInfo)) {
-	    xfree(pBankInfo);
-	    pBankInfo = NULL;
-	    return FALSE;
-	}
-	miInitializeBackingStore(pScreen);
-	xf86SetBackingStore(pScreen);
-
-	/* Initialise cursor functions */
-	miDCInitialize (pScreen, xf86GetPointerScreenFuncs());
-
-    } else
-#endif /* HAVE_ISA */
     {
     /* !!! Only support linear addressing for now. This might change */
 	/* Setup pointers to free space in video ram */
-- 
1.6.0.4



More information about the xorg-devel mailing list