Re: [U-Boot] [PATCH 2/3] net/altera_tse: use flush_dcache_range instead of flush_dcache
Dear Stefan Kristiansson, In message 1320410288-15008-3-git-send-email-stefan.kristians...@saunalahti.fi you wrote: flush_dcache is not declared in the common.h API, flush_dcache_range however is Signed-off-by: Stefan Kristiansson stefan.kristians...@saunalahti.fi Cc: Ben Warren biggerbadder...@gmail.com Cc: Thomas Chou tho...@wytron.com.tw --- drivers/net/altera_tse.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Now here's something you're really going to like! - Rocket J. Squirrel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] net/altera_tse: use flush_dcache_range instead of flush_dcache
On 11/04/2011 08:38 PM, Stefan Kristiansson wrote: flush_dcache is not declared in the common.h API, flush_dcache_range however is Signed-off-by: Stefan Kristianssonstefan.kristians...@saunalahti.fi Cc: Ben Warrenbiggerbadder...@gmail.com Cc: Thomas Choutho...@wytron.com.tw --- drivers/net/altera_tse.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) Acked-by: Thomas Chou tho...@wytron.com.tw diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c index 5b00717..0e6aac7 100644 --- a/drivers/net/altera_tse.c +++ b/drivers/net/altera_tse.c @@ -268,7 +268,8 @@ static int tse_eth_send(struct eth_device *dev, volatile struct alt_sgdma_descriptor *tx_desc_cur = (volatile struct alt_sgdma_descriptor *)tx_desc[0]; - flush_dcache((unsigned long)packet, length); + flush_dcache_range((unsigned long)packet, + (unsigned long)packet + length); alt_sgdma_construct_descriptor_burst( (volatile struct alt_sgdma_descriptor *)tx_desc[0], (volatile struct alt_sgdma_descriptor *)tx_desc[1], @@ -306,7 +307,8 @@ static int tse_eth_rx(struct eth_device *dev) NetReceive(NetRxPackets[0], packet_length); /* start descriptor again */ - flush_dcache((unsigned long)(NetRxPackets[0]), PKTSIZE_ALIGN); + flush_dcache_range((unsigned long)(NetRxPackets[0]), + (unsigned long)(NetRxPackets[0]) + PKTSIZE_ALIGN); alt_sgdma_construct_descriptor_burst( (volatile struct alt_sgdma_descriptor *)rx_desc[0], (volatile struct alt_sgdma_descriptor *)rx_desc[1], @@ -834,7 +836,8 @@ static int tse_eth_init(struct eth_device *dev, bd_t * bd) 0x0 /* channel */ ); debug(Configuring rx desc\n); - flush_dcache((unsigned long)(NetRxPackets[0]), PKTSIZE_ALIGN); + flush_dcache_range((unsigned long)(NetRxPackets[0]), + (unsigned long)(NetRxPackets[0]) + PKTSIZE_ALIGN); alt_sgdma_construct_descriptor_burst( (volatile struct alt_sgdma_descriptor *)rx_desc[0], (volatile struct alt_sgdma_descriptor *)rx_desc[1], ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] net/altera_tse: use flush_dcache_range instead of flush_dcache
flush_dcache is not declared in the common.h API, flush_dcache_range however is Signed-off-by: Stefan Kristiansson stefan.kristians...@saunalahti.fi Cc: Ben Warren biggerbadder...@gmail.com Cc: Thomas Chou tho...@wytron.com.tw --- drivers/net/altera_tse.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c index 5b00717..0e6aac7 100644 --- a/drivers/net/altera_tse.c +++ b/drivers/net/altera_tse.c @@ -268,7 +268,8 @@ static int tse_eth_send(struct eth_device *dev, volatile struct alt_sgdma_descriptor *tx_desc_cur = (volatile struct alt_sgdma_descriptor *)tx_desc[0]; - flush_dcache((unsigned long)packet, length); + flush_dcache_range((unsigned long)packet, + (unsigned long)packet + length); alt_sgdma_construct_descriptor_burst( (volatile struct alt_sgdma_descriptor *)tx_desc[0], (volatile struct alt_sgdma_descriptor *)tx_desc[1], @@ -306,7 +307,8 @@ static int tse_eth_rx(struct eth_device *dev) NetReceive(NetRxPackets[0], packet_length); /* start descriptor again */ - flush_dcache((unsigned long)(NetRxPackets[0]), PKTSIZE_ALIGN); + flush_dcache_range((unsigned long)(NetRxPackets[0]), + (unsigned long)(NetRxPackets[0]) + PKTSIZE_ALIGN); alt_sgdma_construct_descriptor_burst( (volatile struct alt_sgdma_descriptor *)rx_desc[0], (volatile struct alt_sgdma_descriptor *)rx_desc[1], @@ -834,7 +836,8 @@ static int tse_eth_init(struct eth_device *dev, bd_t * bd) 0x0 /* channel */ ); debug(Configuring rx desc\n); - flush_dcache((unsigned long)(NetRxPackets[0]), PKTSIZE_ALIGN); + flush_dcache_range((unsigned long)(NetRxPackets[0]), + (unsigned long)(NetRxPackets[0]) + PKTSIZE_ALIGN); alt_sgdma_construct_descriptor_burst( (volatile struct alt_sgdma_descriptor *)rx_desc[0], (volatile struct alt_sgdma_descriptor *)rx_desc[1], -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot