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.
This commit is contained in:
parent
6935c732c3
commit
e55d86f654
|
|
@ -290,6 +290,14 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
# define GPIO_DATA_VAL_IN (1 << 12)
|
||||
# define GPIO_DATA_PULLUP_DISABLE (1 << 13)
|
||||
|
||||
/* GMBus registers for hardware-assisted (non-bitbanging) I2C access */
|
||||
#define GMBUS0 0x5100
|
||||
#define GMBUS1 0x5104
|
||||
#define GMBUS2 0x5108
|
||||
#define GMBUS3 0x510c
|
||||
#define GMBUS4 0x5110
|
||||
#define GMBUS5 0x5120
|
||||
|
||||
/* p317, 319
|
||||
*/
|
||||
#define VCLK2_VCO_M 0x6008 /* treat as 16 bit? (includes msbs) */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue