summaryrefslogtreecommitdiff
path: root/src/northbridge/amd/lx/raminit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/amd/lx/raminit.c')
-rw-r--r--src/northbridge/amd/lx/raminit.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/northbridge/amd/lx/raminit.c b/src/northbridge/amd/lx/raminit.c
index d4a5d7b701..3aeea646c1 100644
--- a/src/northbridge/amd/lx/raminit.c
+++ b/src/northbridge/amd/lx/raminit.c
@@ -135,6 +135,17 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
print_debug("DRAM controller init done.\r\n");
- /* DRAM working now?? */
+ /* Fixes from Jordan Crouse of AMD. */
+
+ /* make sure there is nothing stale in the cache */
+ __asm__("wbinvd\n");
+
+ print_debug("RAM DLL lock\r\n");
+ /* The RAM dll needs a write to lock on so generate a few dummy writes */
+ volatile unsigned long *ptr;
+ for (i=0;i<5;i++) {
+ ptr = (void *)i;
+ *ptr = (unsigned long)i;
+ }
}