summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/intel/gma/edid.c24
-rw-r--r--src/drivers/intel/gma/edid.h1
2 files changed, 25 insertions, 0 deletions
diff --git a/src/drivers/intel/gma/edid.c b/src/drivers/intel/gma/edid.c
index e70156eb28..052f099177 100644
--- a/src/drivers/intel/gma/edid.c
+++ b/src/drivers/intel/gma/edid.c
@@ -37,6 +37,30 @@ static void wait_rdy(u8 *mmio)
}
}
+static void intel_gmbus_stop_bus(u8 * mmio, u8 bus)
+{
+ wait_rdy(mmio);
+ write32(mmio + 4 * 0, bus);
+ wait_rdy(mmio);
+ write32(mmio + 4 * 8, 0);
+ write32(mmio + 4 * 1, 0x4e0400a1);
+ wait_rdy(mmio);
+ write32(mmio + 4 * 8, 0);
+ write32(mmio + 4 * 1, 0x80000000);
+ write32(mmio + 4 * 1, 0x00000000);
+ wait_rdy(mmio);
+ write32(mmio + 4 * 1, 0x480000a0);
+ wait_rdy(mmio);
+ write32(mmio + 4 * 0, 0x48000000);
+ write32(mmio + 4 * 2, 0x00008000);
+}
+
+void intel_gmbus_stop(u8 *mmio)
+{
+ intel_gmbus_stop_bus(mmio, 6);
+ intel_gmbus_stop_bus(mmio, 2);
+}
+
void intel_gmbus_read_edid(u8 *mmio, u8 bus, u8 slave, u8 *edid, u32 edid_size)
{
int i;
diff --git a/src/drivers/intel/gma/edid.h b/src/drivers/intel/gma/edid.h
index c4763919bd..d8214cf329 100644
--- a/src/drivers/intel/gma/edid.h
+++ b/src/drivers/intel/gma/edid.h
@@ -1 +1,2 @@
void intel_gmbus_read_edid(u8 *gmbus_mmio, u8 bus, u8 slave, u8 *edid, u32 edid_size);
+void intel_gmbus_stop(u8 *gmbus_mmio);