From d773fd370a92a6da2f7dbf91c085eb0df1f6f30d Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sat, 20 Nov 2010 20:23:08 +0000 Subject: Some more DIMM0 related cleanups and deduplication. - VIA VT8235: Do the shift in smbus_read_byte() as all other chipsets do. - spd.h: Move RC00-RC63 #defines here, they were duplicated in lots of romstage.c files and lots of spd_addr.h files. Don't even bother for those spd_addr.h which aren't even actually used, drop them right away. - Replace various 0x50 hardcoded numbers with DIMM0, 0x51 with DIMM1, and 0xa0 with (DIMM0 << 1) where appropriate. - Various debug.c files: Replace SMBUS_MEM_DEVICE_START with DIMM0, SMBUS_MEM_DEVICE_END with DIMM7, and drop useless SMBUS_MEM_DEVICE_INC. - VIA VX800: Drop unused SMBUS_ADDR_CH* #defines. - VIA VT8623: Do the shift in smbus_read_byte() as all other chipsets do. Then, replace 0xa0 (which now becomes 0x50) with DIMM0. - alix1c/romstage.c, alix2d/romstage.c: Adapt to recent bit shift changes. - Various files: Drop DIMM_SPD_BASE and/or replace it with DIMM0. Signed-off-by: Uwe Hermann Acked-by: Patrick Georgi git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6100 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/mainboard/intel/jarrell/debug.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/mainboard/intel/jarrell') diff --git a/src/mainboard/intel/jarrell/debug.c b/src/mainboard/intel/jarrell/debug.c index 87c67b5964..93199d7b8a 100644 --- a/src/mainboard/intel/jarrell/debug.c +++ b/src/mainboard/intel/jarrell/debug.c @@ -1,6 +1,4 @@ -#define SMBUS_MEM_DEVICE_START 0x50 -#define SMBUS_MEM_DEVICE_END 0x57 -#define SMBUS_MEM_DEVICE_INC 1 +#include static void print_reg(unsigned char index) { @@ -271,8 +269,8 @@ static void dump_spd_registers(const struct mem_controller *ctrl) void dump_spd_registers(void) { unsigned device; - device = SMBUS_MEM_DEVICE_START; - while(device <= SMBUS_MEM_DEVICE_END) { + device = DIMM0; + while(device <= DIMM7) { int status = 0; int i; print_debug("\n"); @@ -296,7 +294,7 @@ void dump_spd_registers(void) print_debug_hex8(status); print_debug_char(' '); } - device += SMBUS_MEM_DEVICE_INC; + device++; print_debug("\n"); } } @@ -324,7 +322,7 @@ void dump_ipmi_registers(void) print_debug_hex8(status); print_debug_char(' '); } - device += SMBUS_MEM_DEVICE_INC; + device++; print_debug("\n"); } } -- cgit v1.2.3