From 29acf7c970d12c1dfd7bf6c7a42fe2448aa7f3d7 Mon Sep 17 00:00:00 2001 From: Yinan Shen Date: Wed, 6 May 2009 19:14:33 -0700 Subject: G80: Fix incorrect I2C port access for ports above 3. --- src/g80_output.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/g80_output.c') diff --git a/src/g80_output.c b/src/g80_output.c index 420a73e..75bf7ba 100644 --- a/src/g80_output.c +++ b/src/g80_output.c @@ -217,8 +217,9 @@ fail: static CARD32 i2cAddr(const int port) { - const CARD32 base = (port > 3) ? 0x0000E1E0 : 0x0000E138; - return base + port * 0x18; + const CARD32 base = (port > 3) ? 0x0000E1D4 : 0x0000E138; + const CARD32 offset = (port > 3) ? 0x20 : 0x18; + return base + port * offset; } static void G80_I2CPutBits(I2CBusPtr b, int clock, int data) -- cgit v1.2.3