summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/quark/dram.c
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2015-10-14 08:46:36 (GMT)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2015-10-14 08:46:36 (GMT)
commit13a3972585af60ec367d209cedbd3601e0c77467 (patch)
tree4b3312669b3e501f6bc10b39d8c7bbf516f07aac /arch/x86/cpu/quark/dram.c
parent208bd51396fb606dbdcf45b064e6b372d7dd3e81 (diff)
parent297faccca2235e359012118495b9b73451d54bb9 (diff)
downloadu-boot-13a3972585af60ec367d209cedbd3601e0c77467.tar.xz
Merge remote-tracking branch 'u-boot/master'
Diffstat (limited to 'arch/x86/cpu/quark/dram.c')
-rw-r--r--arch/x86/cpu/quark/dram.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c
index 9cac846..1b89376 100644
--- a/arch/x86/cpu/quark/dram.c
+++ b/arch/x86/cpu/quark/dram.c
@@ -7,8 +7,10 @@
#include <common.h>
#include <errno.h>
#include <fdtdec.h>
+#include <asm/mtrr.h>
#include <asm/post.h>
#include <asm/arch/mrc.h>
+#include <asm/arch/msg_port.h>
#include <asm/arch/quark.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -111,6 +113,14 @@ int dram_init(void)
gd->ram_size = mrc_params.mem_size;
post_code(POST_DRAM);
+ /* variable range MTRR#2: RAM area */
+ disable_caches();
+ msg_port_write(MSG_PORT_HOST_BRIDGE, MTRR_VAR_PHYBASE(MTRR_VAR_RAM),
+ 0 | MTRR_TYPE_WRBACK);
+ msg_port_write(MSG_PORT_HOST_BRIDGE, MTRR_VAR_PHYMASK(MTRR_VAR_RAM),
+ (~(gd->ram_size - 1)) | MTRR_PHYS_MASK_VALID);
+ enable_caches();
+
return 0;
}