X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmacb.c;h=424ca59707f2d5549dda2d6998e6cabb1720c5f1;hb=c05ed00afb95fa5237f16962fccf5810437317bf;hp=83594253787cefb0736e9e70a558b4338ddd7607;hpb=7c56408be61ec5597c944bb67c034e7bf01922d5;p=oweals%2Fu-boot.git diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 8359425378..424ca59707 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -6,6 +6,8 @@ #include #include #include +#include +#include /* * The u-boot networking stack is a little weird. It seems like the @@ -38,7 +40,7 @@ #include #include -#include +#include #include #include @@ -327,8 +329,6 @@ static int _macb_send(struct macb_device *macb, const char *name, void *packet, macb->tx_ring[tx_head].addr = paddr; barrier(); macb_flush_ring_desc(macb, TX); - /* Do we need check paddr and length is dcache line aligned? */ - flush_dcache_range(paddr, paddr + ALIGN(length, ARCH_DMA_MINALIGN)); macb_writel(macb, NCR, MACB_BIT(TE) | MACB_BIT(RE) | MACB_BIT(TSTART)); /* @@ -344,7 +344,7 @@ static int _macb_send(struct macb_device *macb, const char *name, void *packet, udelay(1); } - dma_unmap_single(packet, length, paddr); + dma_unmap_single(paddr, length, DMA_TO_DEVICE); if (i <= MACB_TX_TIMEOUT) { if (ctrl & MACB_BIT(TX_UNDERRUN)) @@ -809,7 +809,7 @@ static int _macb_init(struct macb_device *macb, const char *name) macb->next_rx_tail = 0; #ifdef CONFIG_MACB_ZYNQ - macb_writel(macb, DMACFG, MACB_ZYNQ_GEM_DMACR_INIT); + gem_writel(macb, DMACFG, MACB_ZYNQ_GEM_DMACR_INIT); #endif macb_writel(macb, RBQP, macb->rx_ring_dma);