summaryrefslogtreecommitdiff
path: root/src/northbridge/intel/i82830
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/intel/i82830')
-rw-r--r--src/northbridge/intel/i82830/raminit.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/northbridge/intel/i82830/raminit.c b/src/northbridge/intel/i82830/raminit.c
index 93371c9ebc..8d75c42189 100644
--- a/src/northbridge/intel/i82830/raminit.c
+++ b/src/northbridge/intel/i82830/raminit.c
@@ -75,25 +75,18 @@ static void do_ram_command(u32 command)
static void ram_read32(u8 dimm_start, u32 offset)
{
-#if CONFIG_DEBUG_RAM_SETUP
- if (offset == 0x55aa55aa) {
- PRINTK_DEBUG(" Reading RAM at 0x%08x => 0x%08x\n", (dimm_start * 32 * 1024 * 1024), read32(dimm_start * 32 * 1024 * 1024));
- PRINTK_DEBUG(" Writing RAM at 0x%08x <= 0x%08x\n", (dimm_start * 32 * 1024 * 1024), offset);
- write32(dimm_start * 32 * 1024 * 1024, offset);
- PRINTK_DEBUG(" Reading RAM at 0x%08x => 0x%08x\n", (dimm_start * 32 * 1024 * 1024), read32(dimm_start * 32 * 1024 * 1024));
- } else {
- PRINTK_DEBUG(" to 0x%08x\n", (dimm_start * 32 * 1024 * 1024) + offset);
- read32((dimm_start * 32 * 1024 * 1024) + offset);
- }
-#else
+ u32 reg32, base_addr = 32 * 1024 * 1024 * dimm_start;
if (offset == 0x55aa55aa) {
- read32(dimm_start * 32 * 1024 * 1024);
- write32(dimm_start * 32 * 1024 * 1024, offset);
- read32(dimm_start * 32 * 1024 * 1024);
+ reg32 = read32(base_addr);
+ PRINTK_DEBUG(" Reading RAM at 0x%08x => 0x%08x\n", base_addr, reg32);
+ PRINTK_DEBUG(" Writing RAM at 0x%08x <= 0x%08x\n", base_addr, offset);
+ write32(base_addr, offset);
+ reg32 = read32(base_addr);
+ PRINTK_DEBUG(" Reading RAM at 0x%08x => 0x%08x\n", base_addr, reg32);
} else {
- read32((dimm_start * 32 * 1024 * 1024) + offset);
+ PRINTK_DEBUG(" to 0x%08x\n", base_addr + offset);
+ read32(base_addr + offset);
}
-#endif
}
static void initialize_dimm_rows(void)