diff --git a/src/via_i2c.c b/src/via_i2c.c index 7d75b29..aba3e4d 100644 --- a/src/via_i2c.c +++ b/src/via_i2c.c @@ -389,29 +389,21 @@ ViaI2CBus3Init(ScrnInfoPtr pScrn) pI2CBus->scrnIndex = pScrn->scrnIndex; pI2CBus->DriverPrivate.ptr = hwp; - switch (pVia->Chipset) { - case VIA_P4M800PRO: - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "using alternative PutBits/GetBits functions for I2C Bus 3\n")); - pI2CBus->I2CPutBits = ViaI2C3SimplePutBits; - pI2CBus->I2CGetBits = ViaI2C3SimpleGetBits; - break; - default: - pI2CBus->I2CAddress = ViaI2C3Address; + pI2CBus->I2CAddress = ViaI2C3Address; #ifdef X_NEED_I2CSTART - pI2CBus->I2CStart = ViaI2C3Start; + pI2CBus->I2CStart = ViaI2C3Start; #endif - pI2CBus->I2CStop = ViaI2C3Stop; - pI2CBus->I2CPutByte = ViaI2C3PutByte; - pI2CBus->I2CGetByte = ViaI2C3GetByte; - pI2CBus->DriverPrivate.ptr = hwp; - - pI2CBus->BitTimeout = 10; - pI2CBus->ByteTimeout = 10; - pI2CBus->HoldTime = 10; - pI2CBus->StartTimeout = 10; - break; - } + pI2CBus->I2CStop = ViaI2C3Stop; + pI2CBus->I2CPutByte = ViaI2C3PutByte; + pI2CBus->I2CGetByte = ViaI2C3GetByte; + pI2CBus->I2CPutBits = ViaI2C3SimplePutBits; + pI2CBus->I2CGetBits = ViaI2C3SimpleGetBits; + pI2CBus->DriverPrivate.ptr = hwp; + + pI2CBus->BitTimeout = 10; + pI2CBus->ByteTimeout = 10; + pI2CBus->HoldTime = 10; + pI2CBus->StartTimeout = 10; if (!xf86I2CBusInit(pI2CBus)) { DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_ERROR, diff --git a/src/via_ums.c b/src/via_ums.c index 92b2cb5..8a152ca 100644 --- a/src/via_ums.c +++ b/src/via_ums.c @@ -82,6 +82,12 @@ viaMMIODisable(ScrnInfoPtr pScrn) break; } + /* Disable extended mode access. */ + ViaSeqMask(hwp, 0x1A, 0x00, 0x08); + + /* Lock extended I/O space. */ + ViaSeqMask(hwp, 0x10, 0x00, 0x01); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting viaMMIODisable.\n")); }