diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-19 19:36:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-19 19:36:28 -0400 |
commit | c9091f9e571386992c8c5badcec84d49753b9df1 (patch) | |
tree | df53ffae8b44ae0be843ffe4430bd36461248131 | |
parent | cc2020e62dd607ef907bb44325ac95cbb5b76eb2 (diff) | |
parent | 13c501e69c3fba3ca0651abcc4aa7c9091fda70a (diff) |
Merge branch 'for-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx
* 'for-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx:
[POWERPC] 4xx: Workaround for CHIP_11 Errata
-rw-r--r-- | arch/powerpc/boot/4xx.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/powerpc/boot/4xx.c b/arch/powerpc/boot/4xx.c index 758edf1c5815..5c878436f348 100644 --- a/arch/powerpc/boot/4xx.c +++ b/arch/powerpc/boot/4xx.c | |||
@@ -21,6 +21,25 @@ | |||
21 | #include "reg.h" | 21 | #include "reg.h" |
22 | #include "dcr.h" | 22 | #include "dcr.h" |
23 | 23 | ||
24 | static unsigned long chip_11_errata(unsigned long memsize) | ||
25 | { | ||
26 | unsigned long pvr; | ||
27 | |||
28 | pvr = mfpvr(); | ||
29 | |||
30 | switch (pvr & 0xf0000ff0) { | ||
31 | case 0x40000850: | ||
32 | case 0x400008d0: | ||
33 | case 0x200008d0: | ||
34 | memsize -= 4096; | ||
35 | break; | ||
36 | default: | ||
37 | break; | ||
38 | } | ||
39 | |||
40 | return memsize; | ||
41 | } | ||
42 | |||
24 | /* Read the 4xx SDRAM controller to get size of system memory. */ | 43 | /* Read the 4xx SDRAM controller to get size of system memory. */ |
25 | void ibm4xx_sdram_fixup_memsize(void) | 44 | void ibm4xx_sdram_fixup_memsize(void) |
26 | { | 45 | { |
@@ -34,6 +53,7 @@ void ibm4xx_sdram_fixup_memsize(void) | |||
34 | memsize += SDRAM_CONFIG_BANK_SIZE(bank_config); | 53 | memsize += SDRAM_CONFIG_BANK_SIZE(bank_config); |
35 | } | 54 | } |
36 | 55 | ||
56 | memsize = chip_11_errata(memsize); | ||
37 | dt_fixup_memory(0, memsize); | 57 | dt_fixup_memory(0, memsize); |
38 | } | 58 | } |
39 | 59 | ||
@@ -199,6 +219,7 @@ void ibm4xx_denali_fixup_memsize(void) | |||
199 | bank = 4; /* 4 banks */ | 219 | bank = 4; /* 4 banks */ |
200 | 220 | ||
201 | memsize = cs * (1 << (col+row)) * bank * dpath; | 221 | memsize = cs * (1 << (col+row)) * bank * dpath; |
222 | memsize = chip_11_errata(memsize); | ||
202 | dt_fixup_memory(0, memsize); | 223 | dt_fixup_memory(0, memsize); |
203 | } | 224 | } |
204 | 225 | ||