From b9cde0a8be876c680cc549daa6246256864473fb Mon Sep 17 00:00:00 2001 From: Giuseppe CAVALLARO Date: Sun, 13 May 2012 22:18:42 +0000 Subject: stmmac: add mixed burst for DMA In mixed burst (MB) mode, the AHB master always initiates the bursts with fixed-size when the DMA requests transfers of size less than or equal to 16 beats. This patch adds the MB support and the flag that can be passed from the platform to select it. MB mode can also give some benefits in terms of performances on some platforms. v2: fixed Coding Style Signed-off-by: Giuseppe Cavallaro Signed-off-by: David S. Miller --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c') diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index a9699ae49ad..d1d08401887 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -925,6 +925,7 @@ static void stmmac_check_ether_addr(struct stmmac_priv *priv) static int stmmac_init_dma_engine(struct stmmac_priv *priv) { int pbl = DEFAULT_DMA_PBL, fixed_burst = 0, burst_len = 0; + int mixed_burst = 0; /* Some DMA parameters can be passed from the platform; * in case of these are not passed we keep a default @@ -932,10 +933,11 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv) if (priv->plat->dma_cfg) { pbl = priv->plat->dma_cfg->pbl; fixed_burst = priv->plat->dma_cfg->fixed_burst; + mixed_burst = priv->plat->dma_cfg->mixed_burst; burst_len = priv->plat->dma_cfg->burst_len; } - return priv->hw->dma->init(priv->ioaddr, pbl, fixed_burst, + return priv->hw->dma->init(priv->ioaddr, pbl, fixed_burst, mixed_burst, burst_len, priv->dma_tx_phy, priv->dma_rx_phy); } -- cgit v1.2.3