Skip to content
Snippets Groups Projects
Commit 49692c5f authored by Ian Campbell's avatar Ian Campbell Committed by Albert ARIBAUD
Browse files

net/designware: Make DMA burst length configurable and reduce by default


The correct value for this setting can vary across SoCs and boards, so make it
configurable.

Also reduce the default value to 8, which is the same default as used in the
Linux driver.

Signed-off-by: default avatarIan Campbell <ijc@hellion.org.uk>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
parent 1857075a
No related branches found
No related tags found
No related merge requests found
...@@ -249,7 +249,7 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis) ...@@ -249,7 +249,7 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis)
rx_descs_init(dev); rx_descs_init(dev);
tx_descs_init(dev); tx_descs_init(dev);
writel(FIXEDBURST | PRIORXTX_41 | BURST_16, &dma_p->busmode); writel(FIXEDBURST | PRIORXTX_41 | DMA_PBL, &dma_p->busmode);
writel(readl(&dma_p->opmode) | FLUSHTXFIFO | STOREFORWARD, writel(readl(&dma_p->opmode) | FLUSHTXFIFO | STOREFORWARD,
&dma_p->opmode); &dma_p->opmode);
......
...@@ -77,18 +77,18 @@ struct eth_dma_regs { ...@@ -77,18 +77,18 @@ struct eth_dma_regs {
#define DW_DMA_BASE_OFFSET (0x1000) #define DW_DMA_BASE_OFFSET (0x1000)
/* Default DMA Burst length */
#ifndef CONFIG_DW_GMAC_DEFAULT_DMA_PBL
#define CONFIG_DW_GMAC_DEFAULT_DMA_PBL 8
#endif
/* Bus mode register definitions */ /* Bus mode register definitions */
#define FIXEDBURST (1 << 16) #define FIXEDBURST (1 << 16)
#define PRIORXTX_41 (3 << 14) #define PRIORXTX_41 (3 << 14)
#define PRIORXTX_31 (2 << 14) #define PRIORXTX_31 (2 << 14)
#define PRIORXTX_21 (1 << 14) #define PRIORXTX_21 (1 << 14)
#define PRIORXTX_11 (0 << 14) #define PRIORXTX_11 (0 << 14)
#define BURST_1 (1 << 8) #define DMA_PBL (CONFIG_DW_GMAC_DEFAULT_DMA_PBL<<8)
#define BURST_2 (2 << 8)
#define BURST_4 (4 << 8)
#define BURST_8 (8 << 8)
#define BURST_16 (16 << 8)
#define BURST_32 (32 << 8)
#define RXHIGHPRIO (1 << 1) #define RXHIGHPRIO (1 << 1)
#define DMAMAC_SRST (1 << 0) #define DMAMAC_SRST (1 << 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment