summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>2014-11-04 09:15:48 +0900
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2014-11-04 09:28:47 +0900
commitf7ca1f76fd01f3fc7e75fb3fd801c7bef16598db (patch)
tree72b9783e4ca950f2d288838e1802a1de5f8a9379 /drivers/net
parent000889cdb928bbe92440181331702b0eb8e6110b (diff)
downloadu-boot-imx-f7ca1f76fd01f3fc7e75fb3fd801c7bef16598db.zip
u-boot-imx-f7ca1f76fd01f3fc7e75fb3fd801c7bef16598db.tar.gz
u-boot-imx-f7ca1f76fd01f3fc7e75fb3fd801c7bef16598db.tar.bz2
net: sh-eth: Add cache writeback control after setting bit of DMA descriptor
A bit field of DMA descriptor is on memory area of DMA. If we set data to bit of DMA descriptor, we must be writeback data of DMA descriptor. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/sh_eth.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index d1d3b68..4bf493e 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -2,9 +2,9 @@
* sh_eth.c - Driver for Renesas ethernet controler.
*
* Copyright (C) 2008, 2011 Renesas Solutions Corp.
- * Copyright (c) 2008, 2011 Nobuhiro Iwamatsu
+ * Copyright (c) 2008, 2011, 2014 2014 Nobuhiro Iwamatsu
* Copyright (c) 2007 Carlos Munoz <carlos@kenati.com>
- * Copyright (C) 2013 Renesas Electronics Corporation
+ * Copyright (C) 2013, 2014 Renesas Electronics Corporation
*
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -83,6 +83,8 @@ int sh_eth_send(struct eth_device *dev, void *packet, int len)
else
port_info->tx_desc_cur->td0 = TD_TACT | TD_TFP;
+ flush_cache_wback(port_info->tx_desc_cur, sizeof(struct tx_desc_s));
+
/* Restart the transmitter if disabled */
if (!(sh_eth_read(eth, EDTRR) & EDTRR_TRNS))
sh_eth_write(eth, EDTRR_TRNS, EDTRR);
@@ -133,6 +135,10 @@ int sh_eth_recv(struct eth_device *dev)
port_info->rx_desc_cur->rd0 = RD_RACT | RD_RDLE;
else
port_info->rx_desc_cur->rd0 = RD_RACT;
+
+ flush_cache_wback(port_info->rx_desc_cur,
+ sizeof(struct rx_desc_s));
+
/* Point to the next descriptor */
port_info->rx_desc_cur++;
if (port_info->rx_desc_cur >=