]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
net: configure DWMAC DMA by default AXI burst length
authorSonic Zhang <sonic.zhang@analog.com>
Thu, 29 Jan 2015 05:37:31 +0000 (13:37 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 12:18:43 +0000 (14:18 +0200)
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 <sonic.zhang@analog.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/designware.c
drivers/net/designware.h

index c03e935e2fb7df54771bf6222b7ce816c53209b3..7469e59d49fb8fd3a2f36774bccf6084f32d4fbc 100644 (file)
@@ -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",
index ce51102052eafad7e2b8fdb764f3cf91b33c5d2e..49d900cb3f98a684d794d98e45b86a4ed8b26874 100644 (file)
@@ -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 */