diff options
author | Matthias Fuchs <matthias.fuchs@esd-electronics.com> | 2007-12-14 11:19:56 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2007-12-27 19:35:33 +0100 |
commit | ba79fde58a48c0a6ff8e2a96caba951594142203 (patch) | |
tree | 7126f98a633950fd4e5f52734130b8cd52192177 /cpu/ppc4xx/4xx_enet.c | |
parent | 871e6ce188a7c6bc7321bcf8372857035d20f1cd (diff) | |
download | u-boot-imx-ba79fde58a48c0a6ff8e2a96caba951594142203.zip u-boot-imx-ba79fde58a48c0a6ff8e2a96caba951594142203.tar.gz u-boot-imx-ba79fde58a48c0a6ff8e2a96caba951594142203.tar.bz2 |
ppc4xx: fix flush + invalidate_dcache_range arguments
flush + invalidate_dcache_range() expect the start and stop+1 address.
So the stop address is the first address behind (!) the range.
Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Diffstat (limited to 'cpu/ppc4xx/4xx_enet.c')
-rw-r--r-- | cpu/ppc4xx/4xx_enet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c index c20dc73..bfe0864 100644 --- a/cpu/ppc4xx/4xx_enet.c +++ b/cpu/ppc4xx/4xx_enet.c @@ -849,7 +849,7 @@ 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 - 1); + flush_dcache_range(bd_cached, bd_cached + MAL_ALLOC_SIZE); bd_uncached = bis->bi_memsize; program_tlb(bd_cached, bd_uncached, MAL_ALLOC_SIZE, TLB_WORD2_I_ENABLE); @@ -1064,7 +1064,7 @@ static int ppc_4xx_eth_send (struct eth_device *dev, volatile void *ptr, /* memcpy ((void *) &tx_buff[tx_slot], (const void *) ptr, len); */ memcpy ((void *) hw_p->txbuf_ptr, (const void *) ptr, len); - flush_dcache_range((u32)hw_p->txbuf_ptr, (u32)hw_p->txbuf_ptr + len - 1); + flush_dcache_range((u32)hw_p->txbuf_ptr, (u32)hw_p->txbuf_ptr + len); /*-----------------------------------------------------------------------+ * set TX Buffer busy, and send it @@ -1566,7 +1566,7 @@ static int ppc_4xx_eth_rx (struct eth_device *dev) /* NetReceive(NetRxPackets[i], length); */ invalidate_dcache_range((u32)hw_p->rx[user_index].data_ptr, (u32)hw_p->rx[user_index].data_ptr + - length - 4 - 1); + length - 4); NetReceive (NetRxPackets[user_index], length - 4); /* Free Recv Buffer */ hw_p->rx[user_index].ctrl |= MAL_RX_CTRL_EMPTY; |