* [U-Boot] [PATCH v3] net: configure DWMAC DMA by default AXI burst length
@ 2015-01-29 5:37 Sonic Zhang
2015-01-29 18:20 ` Joe Hershberger
2015-03-06 15:43 ` [U-Boot] [U-Boot, " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Sonic Zhang @ 2015-01-29 5:37 UTC (permalink / raw)
To: u-boot
From: Sonic Zhang <sonic.zhang@analog.com>
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>
---
drivers/net/designware.c | 4 ++++
drivers/net/designware.h | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 9ded895..51eff85 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -256,6 +256,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",
diff --git a/drivers/net/designware.h b/drivers/net/designware.h
index ce51102..49d900c 100644
--- a/drivers/net/designware.h
+++ b/drivers/net/designware.h
@@ -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 */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v3] net: configure DWMAC DMA by default AXI burst length
2015-01-29 5:37 [U-Boot] [PATCH v3] net: configure DWMAC DMA by default AXI burst length Sonic Zhang
@ 2015-01-29 18:20 ` Joe Hershberger
2015-03-06 15:43 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Joe Hershberger @ 2015-01-29 18:20 UTC (permalink / raw)
To: u-boot
On Wed, Jan 28, 2015 at 11:37 PM, Sonic Zhang <sonic.adi@gmail.com> wrote:
>
> From: Sonic Zhang <sonic.zhang@analog.com>
>
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [U-Boot, v3] net: configure DWMAC DMA by default AXI burst length
2015-01-29 5:37 [U-Boot] [PATCH v3] net: configure DWMAC DMA by default AXI burst length Sonic Zhang
2015-01-29 18:20 ` Joe Hershberger
@ 2015-03-06 15:43 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2015-03-06 15:43 UTC (permalink / raw)
To: u-boot
On Thu, Jan 29, 2015 at 01:37:31PM +0800, Sonic Zhang wrote:
> From: Sonic Zhang <sonic.zhang@analog.com>
>
> 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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/495cc82d/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-06 15:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-29 5:37 [U-Boot] [PATCH v3] net: configure DWMAC DMA by default AXI burst length Sonic Zhang
2015-01-29 18:20 ` Joe Hershberger
2015-03-06 15:43 ` [U-Boot] [U-Boot, " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).