diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2015-01-29 06:38:50 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-03-05 16:17:53 (GMT) |
commit | d2279221508b1c5e2398e821af6b088933a38103 (patch) | |
tree | 4d261e944e124065e03efd6a958a0b976f68c292 | |
parent | 2ddaf13bd28d9d9450831e84e30d617d2f49f1bd (diff) | |
download | u-boot-d2279221508b1c5e2398e821af6b088933a38103.tar.xz |
net: Support DMA threshold mode in DWMAC driver
- DMA threshold mode can be selected in board config head file.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
-rw-r--r-- | drivers/net/designware.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 7469e59..cc01604 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); |