From: Sonic Zhang Date: Thu, 29 Jan 2015 06:38:50 +0000 (+0800) Subject: net: Support DMA threshold mode in DWMAC driver X-Git-Tag: v2015.04-rc4~105 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d2279221508b1c5e2398e821af6b088933a38103;p=oweals%2Fu-boot.git net: Support DMA threshold mode in DWMAC driver - DMA threshold mode can be selected in board config head file. Signed-off-by: Sonic Zhang --- diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 7469e59d49..cc01604e60 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -253,8 +253,13 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis) writel(FIXEDBURST | PRIORXTX_41 | DMA_PBL, &dma_p->busmode); +#ifndef CONFIG_DW_MAC_FORCE_THRESHOLD_MODE writel(readl(&dma_p->opmode) | FLUSHTXFIFO | STOREFORWARD, &dma_p->opmode); +#else + writel(readl(&dma_p->opmode) | FLUSHTXFIFO, + &dma_p->opmode); +#endif writel(readl(&dma_p->opmode) | RXSTART | TXSTART, &dma_p->opmode);