aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/amd/gx2
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/amd/gx2')
-rw-r--r--src/northbridge/amd/gx2/northbridgeinit.c2
-rw-r--r--src/northbridge/amd/gx2/raminit.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/northbridge/amd/gx2/northbridgeinit.c b/src/northbridge/amd/gx2/northbridgeinit.c
index 319d95a8ef..348cdb941c 100644
--- a/src/northbridge/amd/gx2/northbridgeinit.c
+++ b/src/northbridge/amd/gx2/northbridgeinit.c
@@ -656,7 +656,7 @@ void northbridge_init_early(void)
/* Now that the descriptor to memory is set up. */
/* The memory controller needs one read to synch its lines before it can be used. */
- i = *(volatile int *) 0;
+ read32(zeroptr);
GeodeLinkPriority();
diff --git a/src/northbridge/amd/gx2/raminit.c b/src/northbridge/amd/gx2/raminit.c
index 46ec6b8830..db10138b34 100644
--- a/src/northbridge/amd/gx2/raminit.c
+++ b/src/northbridge/amd/gx2/raminit.c
@@ -16,6 +16,7 @@
#include <cpu/amd/gx2def.h>
#include <spd.h>
+#include <stddef.h>
static const unsigned char NumColAddr[] = {
0x00, 0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x07,
@@ -596,10 +597,8 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
/* The RAM dll needs a write to lock on so generate a few dummy writes */
/* Note: The descriptor needs to be enabled to point at memory */
- volatile unsigned long *ptr;
for (i = 0; i < 5; i++) {
- ptr = (void *)i;
- *ptr = (unsigned long)i;
+ write32(zeroptr + i, i);
}
printk(BIOS_INFO, "RAM DLL lock\n");