northbridge/intel/i440bx: Merge RAM init routines
There are 4 routines used in RAM init that most if not all
i440bx mainboards call in the same order. Implements a single
RAM init routine for them to allow for future consolidation.
Boards to be changed to use this one routine in a future change.
Change-Id: Ib553b07b117de12b7982586bce0f9355f55013a0
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/20676
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
diff --git a/src/northbridge/intel/i440bx/raminit.c b/src/northbridge/intel/i440bx/raminit.c
index 67d8d3f..565719d 100644
--- a/src/northbridge/intel/i440bx/raminit.c
+++ b/src/northbridge/intel/i440bx/raminit.c
@@ -979,3 +979,11 @@
PRINT_DEBUG("Northbridge following SDRAM init:\n");
DUMPNORTH();
}
+
+void sdram_initialize(void)
+{
+ dump_spd_registers();
+ sdram_set_registers();
+ sdram_set_spd_registers();
+ sdram_enable();
+}
\ No newline at end of file
diff --git a/src/northbridge/intel/i440bx/raminit.h b/src/northbridge/intel/i440bx/raminit.h
index 609b591..e20d559 100644
--- a/src/northbridge/intel/i440bx/raminit.h
+++ b/src/northbridge/intel/i440bx/raminit.h
@@ -25,6 +25,9 @@
void sdram_set_registers(void);
void sdram_set_spd_registers(void);
void sdram_enable(void);
+/* A merger of above functions */
+void sdram_initialize(void);
+
/* Debug */
#if IS_ENABLED(CONFIG_DEBUG_RAM_SETUP)
void dump_spd_registers(void);