Skip to content

Commit

Permalink
[POWERPC] 4xx: Workaround for CHIP_11 Errata
Browse files Browse the repository at this point in the history
The PowerPC 440EP, 440GR, 440EPx, and 440GRx chips have an issue that
causes the PLB3-to-PLB4 bridge to wait indefinitely for transaction
requests that cross the end-of-memory-range boundary.  Since the DDR
controller only returns the valid portion of a read request, the bridge
will prevent other PLB masters from completing their transactions.

This implements the recommended workaround for this errata for chips that
use older versions of firmware that do not already handle it.  The last
4KiB of memory are hidden from the kernel to prevent the problem
transactions from occurring.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
  • Loading branch information
Josh Boyer committed May 19, 2008
1 parent b8291ad commit 13c501e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions arch/powerpc/boot/4xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,25 @@
#include "reg.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. */
void ibm4xx_sdram_fixup_memsize(void)
{
Expand All @@ -34,6 +53,7 @@ void ibm4xx_sdram_fixup_memsize(void)
memsize += SDRAM_CONFIG_BANK_SIZE(bank_config);
}

memsize = chip_11_errata(memsize);
dt_fixup_memory(0, memsize);
}

Expand Down Expand Up @@ -199,6 +219,7 @@ void ibm4xx_denali_fixup_memsize(void)
bank = 4; /* 4 banks */

memsize = cs * (1 << (col+row)) * bank * dpath;
memsize = chip_11_errata(memsize);
dt_fixup_memory(0, memsize);
}

Expand Down

0 comments on commit 13c501e

Please sign in to comment.