[U-Boot] [PATCH 2/8] net: zynq: Setup BD when structures are filled
Michal Simek
michal.simek at xilinx.com
Tue Oct 27 16:17:53 CET 2015
Fix incorrect sequence in BD handling.
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---
drivers/net/zynq_gem.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 5aa21b9f24a7..f13a244c7756 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -432,9 +432,6 @@ static int zynq_gem_send(struct eth_device *dev, void *ptr, int len)
struct zynq_gem_priv *priv = dev->priv;
struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
- /* setup BD */
- writel((u32)priv->tx_bd, ®s->txqbase);
-
/* Setup Tx BD */
memset(priv->tx_bd, 0, sizeof(struct emac_bd));
@@ -443,6 +440,9 @@ static int zynq_gem_send(struct eth_device *dev, void *ptr, int len)
ZYNQ_GEM_TXBUF_LAST_MASK |
ZYNQ_GEM_TXBUF_WRAP_MASK;
+ /* setup BD */
+ writel((u32)priv->tx_bd, ®s->txqbase);
+
addr = (u32) ptr;
addr &= ~(ARCH_DMA_MINALIGN - 1);
size = roundup(len, ARCH_DMA_MINALIGN);
--
2.5.0
More information about the U-Boot
mailing list