summaryrefslogtreecommitdiff
path: root/cpu/ppc4xx/4xx_enet.c
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2008-04-17 18:18:00 +0200
committerWolfgang Denk <wd@denx.de>2008-04-18 00:48:27 -0700
commit5e3dca577b7c1bf58bd2b48449b18b7e7dcd8e04 (patch)
tree844deddb79a21b3761a513d8443ae059ebc4819a /cpu/ppc4xx/4xx_enet.c
parentaccf7355767dc7f6b85d88bb1c75c9d95e84ba5b (diff)
downloadu-boot-imx-5e3dca577b7c1bf58bd2b48449b18b7e7dcd8e04.zip
u-boot-imx-5e3dca577b7c1bf58bd2b48449b18b7e7dcd8e04.tar.gz
u-boot-imx-5e3dca577b7c1bf58bd2b48449b18b7e7dcd8e04.tar.bz2
Fix crash on sequoia in ppc_4xx_eth_init
Currently U-Boot crashes in ppc_4xx_eth_init on sequoia with cache enabled (TLB Parity exeption). This patch fixes the problem. Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'cpu/ppc4xx/4xx_enet.c')
-rw-r--r--cpu/ppc4xx/4xx_enet.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c
index 007cb4f..c40e0ca 100644
--- a/cpu/ppc4xx/4xx_enet.c
+++ b/cpu/ppc4xx/4xx_enet.c
@@ -1083,7 +1083,11 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)
#ifdef CONFIG_4xx_DCACHE
flush_dcache_range(bd_cached, bd_cached + MAL_ALLOC_SIZE);
if (!last_used_ea)
+#if defined(CFG_MEM_TOP_HIDE)
+ bd_uncached = bis->bi_memsize + CFG_MEM_TOP_HIDE;
+#else
bd_uncached = bis->bi_memsize;
+#endif
else
bd_uncached = last_used_ea + MAL_ALLOC_SIZE;