drm/nouveau: magic to make auxch on new macbooks booted in EFI mode work
authorBen Skeggs <bskeggs@redhat.com>
Tue, 19 Jul 2011 05:59:39 +0000 (15:59 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 20 Sep 2011 06:08:32 +0000 (16:08 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_i2c.c

index 739c0ac3a9b76ed4c46d0431e8b7262ddb5a4c4b..f6a27fabcfe028f4f224bf64ae01503b09a9bbc8 100644 (file)
@@ -286,7 +286,10 @@ nouveau_i2c_find(struct drm_device *dev, int index)
                        val  = 0xe001;
                }
 
-               nv_wr32(dev, reg, (nv_rd32(dev, reg) & ~0xf003) | val);
+               /* nfi, but neither auxch or i2c work if it's 1 */
+               nv_mask(dev, reg + 0x0c, 0x00000001, 0x00000000);
+               /* nfi, but switches auxch vs normal i2c */
+               nv_mask(dev, reg + 0x00, 0x0000f003, val);
        }
 
        if (!i2c->chan && nouveau_i2c_init(dev, i2c, index))