Commit c9091f9e authored by Linus Torvalds's avatar Linus Torvalds

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
parents cc2020e6 13c501e6
...@@ -21,6 +21,25 @@ ...@@ -21,6 +21,25 @@
#include "reg.h" #include "reg.h"
#include "dcr.h" #include "dcr.h"
static unsigned long chip_11_errata(unsigned long memsize)
{
unsigned long pvr;
pvr = mfpvr();
switch (pvr & 0xf0000ff0) {
case 0x40000850:
case 0x400008d0:
case 0x200008d0:
memsize -= 4096;
break;
default:
break;
}
return memsize;
}
/* Read the 4xx SDRAM controller to get size of system memory. */ /* Read the 4xx SDRAM controller to get size of system memory. */
void ibm4xx_sdram_fixup_memsize(void) void ibm4xx_sdram_fixup_memsize(void)
{ {
...@@ -34,6 +53,7 @@ void ibm4xx_sdram_fixup_memsize(void) ...@@ -34,6 +53,7 @@ void ibm4xx_sdram_fixup_memsize(void)
memsize += SDRAM_CONFIG_BANK_SIZE(bank_config); memsize += SDRAM_CONFIG_BANK_SIZE(bank_config);
} }
memsize = chip_11_errata(memsize);
dt_fixup_memory(0, memsize); dt_fixup_memory(0, memsize);
} }
...@@ -199,6 +219,7 @@ void ibm4xx_denali_fixup_memsize(void) ...@@ -199,6 +219,7 @@ void ibm4xx_denali_fixup_memsize(void)
bank = 4; /* 4 banks */ bank = 4; /* 4 banks */
memsize = cs * (1 << (col+row)) * bank * dpath; memsize = cs * (1 << (col+row)) * bank * dpath;
memsize = chip_11_errata(memsize);
dt_fixup_memory(0, memsize); dt_fixup_memory(0, memsize);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment