From d7088c459c140d99a98e05c3be02e02592bb607e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Sun, 30 Jul 2006 00:23:20 +0000 Subject: - Fix some copy bugs and thinkos in the i440bx SMbus read code. SBbus reads to RAM now work. Yah! - Rename the register constants to something I can look at more easily. - Make the logic flow match the flow from V1 assembly - #if 0 out other SMbus functions that are still broken. git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2353 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/mainboard/bitworks/ims/auto.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/mainboard/bitworks') diff --git a/src/mainboard/bitworks/ims/auto.c b/src/mainboard/bitworks/ims/auto.c index e9dd3cb46e..1da87bbd5f 100644 --- a/src/mainboard/bitworks/ims/auto.c +++ b/src/mainboard/bitworks/ims/auto.c @@ -83,7 +83,7 @@ static void enable_shadow_ram(void) static inline int spd_read_byte(unsigned device, unsigned address) { - unsigned char c; + int c; c = smbus_read_byte(device, address); return c; } @@ -100,11 +100,13 @@ static void main(unsigned long bist) .channel0 = { (0xa << 3) | 0, (0xa << 3) | 1, - (0xa << 3) | 2, (0xa << 3) | 3, + (0xa << 3) | 2, + (0xa << 3) | 3, }, } }; unsigned long x; + int result; if (bist == 0) { early_mtrr_init(); @@ -117,6 +119,12 @@ static void main(unsigned long bist) report_bist_failure(bist); enable_smbus(); +/* + result = spd_read_byte(cpu[0].channel0[0],0x03); + print_debug("Result: "); + print_debug_hex16(result); + print_debug("\r\n"); +*/ dump_spd_registers(&cpu[0]); #if 0 -- cgit v1.2.3