summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorJoseph Smith <joe@settoplinux.org>2010-04-11 16:36:13 +0000
committerJoseph Smith <joe@smittys.pointclark.net>2010-04-11 16:36:13 +0000
commit77d31ec4a88aeba08db6b7864959a87aeefc6b2b (patch)
tree60f2f99f0cc5881375887fa3e908c83df2953444 /src/northbridge
parentbdf26a6bf523eefa577b5e3d68c1e414d990838a (diff)
More trivial changes to i82830 raminit.c for USE_PRINTK_IN_CAR.
Signed-off-by: Joseph Smith <joe@settoplinux.org> Acked-by: Joseph Smith <joe@settoplinux.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5403 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/intel/i82830/raminit.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/northbridge/intel/i82830/raminit.c b/src/northbridge/intel/i82830/raminit.c
index 2396d35c59..93371c9ebc 100644
--- a/src/northbridge/intel/i82830/raminit.c
+++ b/src/northbridge/intel/i82830/raminit.c
@@ -75,6 +75,7 @@ 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);
@@ -84,6 +85,15 @@ static void ram_read32(u8 dimm_start, u32 offset)
PRINTK_DEBUG(" to 0x%08x\n", (dimm_start * 32 * 1024 * 1024) + offset);
read32((dimm_start * 32 * 1024 * 1024) + offset);
}
+#else
+ if (offset == 0x55aa55aa) {
+ read32(dimm_start * 32 * 1024 * 1024);
+ write32(dimm_start * 32 * 1024 * 1024, offset);
+ read32(dimm_start * 32 * 1024 * 1024);
+ } else {
+ read32((dimm_start * 32 * 1024 * 1024) + offset);
+ }
+#endif
}
static void initialize_dimm_rows(void)
@@ -405,7 +415,7 @@ Public interface.
static void sdram_set_registers(void)
{
- PRINTK_DEBUG("Setting initial sdram registers....\n");
+ printk(BIOS_DEBUG, "Setting initial SDRAM registers....\n");
/* Calculate the value for DRT DRAM Timing Register */
set_dram_timing();
@@ -419,7 +429,7 @@ static void sdram_set_registers(void)
/* Setup DRAM Row Attribute Registers */
set_dram_row_attributes();
- PRINTK_DEBUG("Initial sdram registers have been set.\n");
+ printk(BIOS_DEBUG, "Initial SDRAM registers have been set.\n");
}
static void northbridge_set_registers(void)
@@ -427,7 +437,7 @@ static void northbridge_set_registers(void)
u16 value;
int igd_memory = 0;
- PRINTK_DEBUG("Setting initial nothbridge registers....\n");
+ printk(BIOS_DEBUG, "Setting initial Nothbridge registers....\n");
/* Set the value for Fixed DRAM Hole Control Register */
pci_write_config8(NORTHBRIDGE, FDHC, 0x00);
@@ -473,7 +483,7 @@ static void northbridge_set_registers(void)
value |= 1; // 64MB aperture
pci_write_config16(NORTHBRIDGE, GCC1, value);
- PRINTK_DEBUG("Initial northbridge registers have been set.\n");
+ printk(BIOS_DEBUG, "Initial Northbridge registers have been set.\n");
}
static void sdram_initialize(void)