diff options
author | Valentine Barshak <vbarshak@ru.mvista.com> | 2007-09-21 10:50:09 -0400 |
---|---|---|
committer | Josh Boyer <jwboyer@linux.vnet.ibm.com> | 2007-10-03 08:20:18 -0400 |
commit | 340ffd267c85fc28da7cfd681b177c816af800cf (patch) | |
tree | b9a757d6d0566420fe103c02d60f2b520e5c3880 /arch | |
parent | 8112753bb2c0045398c89d0647792b39805f6d40 (diff) |
[POWERPC] 4xx: 440EPx/GRx incorrect write to DDR SDRAM errata workaround
Add a workaround for PowerPC 440EPx/GRx incorrect write to
DDR SDRAM errata. Data can be written to wrong address
in SDRAM when write pipelining enabled on plb0. We disable
it in the cpu_setup for these processors at early init.
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/cpu_setup_44x.S | 25 | ||||
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 3 |
2 files changed, 27 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/cpu_setup_44x.S b/arch/powerpc/kernel/cpu_setup_44x.S index c790634d946b..8e1812e2f3ee 100644 --- a/arch/powerpc/kernel/cpu_setup_44x.S +++ b/arch/powerpc/kernel/cpu_setup_44x.S | |||
@@ -20,7 +20,14 @@ | |||
20 | _GLOBAL(__setup_cpu_440ep) | 20 | _GLOBAL(__setup_cpu_440ep) |
21 | b __init_fpu_44x | 21 | b __init_fpu_44x |
22 | _GLOBAL(__setup_cpu_440epx) | 22 | _GLOBAL(__setup_cpu_440epx) |
23 | b __init_fpu_44x | 23 | mflr r4 |
24 | bl __init_fpu_44x | ||
25 | bl __plb_disable_wrp | ||
26 | mtlr r4 | ||
27 | blr | ||
28 | _GLOBAL(__setup_cpu_440grx) | ||
29 | b __plb_disable_wrp | ||
30 | |||
24 | 31 | ||
25 | /* enable APU between CPU and FPU */ | 32 | /* enable APU between CPU and FPU */ |
26 | _GLOBAL(__init_fpu_44x) | 33 | _GLOBAL(__init_fpu_44x) |
@@ -31,3 +38,19 @@ _GLOBAL(__init_fpu_44x) | |||
31 | isync | 38 | isync |
32 | blr | 39 | blr |
33 | 40 | ||
41 | /* | ||
42 | * Workaround for the incorrect write to DDR SDRAM errata. | ||
43 | * The write address can be corrupted during writes to | ||
44 | * DDR SDRAM when write pipelining is enabled on PLB0. | ||
45 | * Disable write pipelining here. | ||
46 | */ | ||
47 | #define DCRN_PLB4A0_ACR 0x81 | ||
48 | |||
49 | _GLOBAL(__plb_disable_wrp) | ||
50 | mfdcr r3,DCRN_PLB4A0_ACR | ||
51 | /* clear WRP bit in PLB4A0_ACR */ | ||
52 | rlwinm r3,r3,0,8,6 | ||
53 | mtdcr DCRN_PLB4A0_ACR,r3 | ||
54 | isync | ||
55 | blr | ||
56 | |||
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 94d98190e19a..b03a442b7888 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -33,6 +33,7 @@ EXPORT_SYMBOL(cur_cpu_spec); | |||
33 | #ifdef CONFIG_PPC32 | 33 | #ifdef CONFIG_PPC32 |
34 | extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec); | 34 | extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec); |
35 | extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec); | 35 | extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec); |
36 | extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec); | ||
36 | extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec); | 37 | extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec); |
37 | extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec); | 38 | extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec); |
38 | extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec); | 39 | extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec); |
@@ -1146,6 +1147,8 @@ static struct cpu_spec cpu_specs[] = { | |||
1146 | .cpu_user_features = COMMON_USER_BOOKE, | 1147 | .cpu_user_features = COMMON_USER_BOOKE, |
1147 | .icache_bsize = 32, | 1148 | .icache_bsize = 32, |
1148 | .dcache_bsize = 32, | 1149 | .dcache_bsize = 32, |
1150 | .cpu_setup = __setup_cpu_440grx, | ||
1151 | .platform = "ppc440", | ||
1149 | }, | 1152 | }, |
1150 | { /* 440GP Rev. B */ | 1153 | { /* 440GP Rev. B */ |
1151 | .pvr_mask = 0xf0000fff, | 1154 | .pvr_mask = 0xf0000fff, |