Skip to content

Commit

Permalink
net: configure DWMAC DMA by default AXI burst length
Browse files Browse the repository at this point in the history
Board can define its own AXI burst length to improve DWMAC DMA performance.

v2-changes:
- Avoid write burst len register when the Macro is not defined.

v3-changes:
- Add axi_bus register member to struct eth_dma_regs.

Signed-off-by: Sonic Zhang <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
  • Loading branch information
sonicz authored and trini committed Mar 5, 2015
1 parent a32ab4d commit 2ddaf13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions drivers/net/designware.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis)

writel(readl(&dma_p->opmode) | RXSTART | TXSTART, &dma_p->opmode);

#ifdef CONFIG_DW_AXI_BURST_LEN
writel((CONFIG_DW_AXI_BURST_LEN & 0x1FF >> 1), &dma_p->axibus);
#endif

/* Start up the PHY */
if (phy_startup(priv->phydev)) {
printf("Could not initialize PHY %s\n",
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/designware.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ struct eth_dma_regs {
u32 status; /* 0x14 */
u32 opmode; /* 0x18 */
u32 intenable; /* 0x1c */
u8 reserved[40];
u32 reserved1[2];
u32 axibus; /* 0x28 */
u32 reserved2[7];
u32 currhosttxdesc; /* 0x48 */
u32 currhostrxdesc; /* 0x4c */
u32 currhosttxbuffaddr; /* 0x50 */
Expand Down

0 comments on commit 2ddaf13

Please sign in to comment.