gma/edid: Fix gma register access.

0x20 was incorrectly represented as 4 * 5 while in fact it's 4 * 8

Change-Id: I6053a3baa6de0da9f1d648009353bc1fe542f81f
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/10237
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Vladimir Serbinenko 2015-05-18 13:13:48 +02:00
parent 4679c41db2
commit 3387e4e770
1 changed files with 2 additions and 2 deletions

View File

@ -49,11 +49,11 @@ void intel_gmbus_read_edid(u8 *mmio, u8 bus, u8 slave, u8 *edid, u32 edid_size)
write32(mmio + 4 * 0, bus); write32(mmio + 4 * 0, bus);
wait_rdy(mmio); wait_rdy(mmio);
/* Ensure index bits are disabled. */ /* Ensure index bits are disabled. */
write32(mmio + 4 * 5, 0); write32(mmio + 4 * 8, 0);
write32(mmio + 4 * 1, 0x46000000 | (slave << 1)); write32(mmio + 4 * 1, 0x46000000 | (slave << 1));
wait_rdy(mmio); wait_rdy(mmio);
/* Ensure index bits are disabled. */ /* Ensure index bits are disabled. */
write32(mmio + 4 * 5, 0); write32(mmio + 4 * 8, 0);
write32(mmio + 4 * 1, 0x4a000001 | (slave << 1) write32(mmio + 4 * 1, 0x4a000001 | (slave << 1)
| (edid_size << 16)); | (edid_size << 16));
for (i = 0; i < edid_size / 4; i++) { for (i = 0; i < edid_size / 4; i++) {