summaryrefslogtreecommitdiff
path: root/src/i830_i2c.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-02-26 12:26:23 -0800
committerEric Anholt <eric@anholt.net>2008-02-26 13:25:20 -0800
commite55d86f654aa9dd4951b441636c8ca4b37786daf (patch)
tree72bf642423a9aa39d8ef3b1809333226c6267a2a /src/i830_i2c.c
parent6935c732c351585f31e2094c4201a00e3d5529b3 (diff)
Fix SDVO I2C access on Mac Mini in EFI mode.
The GMBUS was being left in SDVO pin access mode, which blocked our bit-banging access to those pins. Thanks to Peter Jones for quick debugging turnaround in getting this fixed.
Diffstat (limited to 'src/i830_i2c.c')
-rw-r--r--src/i830_i2c.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/i830_i2c.c b/src/i830_i2c.c
index d80229d5..33a75a81 100644
--- a/src/i830_i2c.c
+++ b/src/i830_i2c.c
@@ -346,6 +346,7 @@ Bool
I830I2CInit(ScrnInfoPtr pScrn, I2CBusPtr *bus_ptr, int i2c_reg, char *name)
{
I2CBusPtr pI2CBus;
+ I830Ptr pI830 = I830PTR(pScrn);
pI2CBus = xf86CreateI2CBusRec();
@@ -379,6 +380,12 @@ I830I2CInit(ScrnInfoPtr pScrn, I2CBusPtr *bus_ptr, int i2c_reg, char *name)
pI2CBus->AcknTimeout = 40;
pI2CBus->RiseFallTime = 20;
+ /* Disable the GMBUS, which we won't use. If it is left enabled (for
+ * example, by Mac Mini EFI initialization), GPIO access to the pins it
+ * uses gets disabled.
+ */
+ OUTREG(GMBUS0, 0);
+
if (!xf86I2CBusInit(pI2CBus))
return FALSE;