diff options
author | Niklas Cassel <niklas.cassel@axis.com> | 2016-12-07 17:20:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-08 21:07:10 +0300 |
commit | 50ca903afc2a4ccf7efd25744577fecb0ce6fb49 (patch) | |
tree | 080ebf7c45c46c58b134c341ae8bd6fa32e63f72 /drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c | |
parent | 89ab75bf7253271c0ca805931105a298bc22bfdf (diff) | |
download | linux-50ca903afc2a4ccf7efd25744577fecb0ce6fb49.tar.xz |
net: stmmac: simplify the common DMA init API
Use struct stmmac_dma_cfg *dma_cfg as an argument rather
than using all the struct members as individual arguments.
Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Acked-by: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c index 61f54c99a7de..e5664da382f3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c @@ -32,11 +32,12 @@ #include "dwmac100.h" #include "dwmac_dma.h" -static void dwmac100_dma_init(void __iomem *ioaddr, int pbl, int fb, int mb, - int aal, u32 dma_tx, u32 dma_rx, int atds) +static void dwmac100_dma_init(void __iomem *ioaddr, + struct stmmac_dma_cfg *dma_cfg, + u32 dma_tx, u32 dma_rx, int atds) { /* Enable Application Access by writing to DMA CSR0 */ - writel(DMA_BUS_MODE_DEFAULT | (pbl << DMA_BUS_MODE_PBL_SHIFT), + writel(DMA_BUS_MODE_DEFAULT | (dma_cfg->pbl << DMA_BUS_MODE_PBL_SHIFT), ioaddr + DMA_BUS_MODE); /* Mask interrupts by writing to CSR7 */ |