diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2010-04-11 18:54:47 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2010-04-11 18:54:47 +0000 |
commit | d93af23d6aa69e2b8534fabcd8b123d751b65fd8 (patch) | |
tree | a546f75a07dd37672a7366b54e6d8e8748a1db3f /src/northbridge/intel/i82830/raminit.c | |
parent | 77d31ec4a88aeba08db6b7864959a87aeefc6b2b (diff) |
simplify ram_read32 on i82830
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5404 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/intel/i82830/raminit.c')
-rw-r--r-- | src/northbridge/intel/i82830/raminit.c | 25 |
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) |