summaryrefslogtreecommitdiff
path: root/arch/i386/cpu/sc520
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2011-02-12 15:11:32 +1100
committerGraeme Russ <graeme.russ@gmail.com>2011-02-12 15:11:32 +1100
commit0c24c9cc71cb3e0976a4806d57450e79b349fb40 (patch)
tree6a4cddc7fd1e317dab27889a22ad50f7013e7879 /arch/i386/cpu/sc520
parentc53fd2bb6dc63c10fd2817f3041de24fd277255b (diff)
x86: Add processor flags header from linux
Diffstat (limited to 'arch/i386/cpu/sc520')
-rw-r--r--arch/i386/cpu/sc520/sc520.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/i386/cpu/sc520/sc520.c b/arch/i386/cpu/sc520/sc520.c
index 7acd471d96..21037d29d7 100644
--- a/arch/i386/cpu/sc520/sc520.c
+++ b/arch/i386/cpu/sc520/sc520.c
@@ -26,6 +26,7 @@
#include <common.h>
#include <asm/io.h>
+#include <asm/processor-flags.h>
#include <asm/ic/sc520.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -41,6 +42,8 @@ volatile sc520_mmcr_t *sc520_mmcr = (sc520_mmcr_t *)0xfffef000;
void init_sc520(void)
{
+ const u32 nw_cd_rst = ~(X86_CR0_NW | X86_CR0_CD);
+
/*
* Set the UARTxCTL register at it's slower,
* baud clock giving us a 1.8432 MHz reference
@@ -84,8 +87,8 @@ void init_sc520(void)
/* turn on the cache and disable write through */
asm("movl %%cr0, %%eax\n"
- "andl $0x9fffffff, %%eax\n"
- "movl %%eax, %%cr0\n" : : : "eax");
+ "andl %0, %%eax\n"
+ "movl %%eax, %%cr0\n" : : "i" (nw_cd_rst) : "eax");
}
unsigned long init_sc520_dram(void)