diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2011-09-01 21:51:41 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-09-15 15:40:01 -0400 |
commit | e7434821411b5fc24ab23e55cb11ea793248cb6b (patch) | |
tree | d6ea9d683e56916c5d9a7f59cafc4866deb07655 /drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c | |
parent | stmmac: rework the code to get the Synopsys ID (v3) (diff) | |
download | linux-dev-e7434821411b5fc24ab23e55cb11ea793248cb6b.tar.xz linux-dev-e7434821411b5fc24ab23e55cb11ea793248cb6b.zip |
stmmac: add HW DMA feature register (v3)
New GMAC chips have an extra register to indicate
the presence of the optional features/functions of
the DMA core.
This patch adds this support and all the HW cap
are exported via debugfs.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c index a89384c07513..da66ac511c4c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c @@ -132,6 +132,11 @@ static void dwmac1000_dump_dma_regs(void __iomem *ioaddr) } } +static unsigned int dwmac1000_get_hw_feature(void __iomem *ioaddr) +{ + return readl(ioaddr + DMA_HW_FEATURE); +} + const struct stmmac_dma_ops dwmac1000_dma_ops = { .init = dwmac1000_dma_init, .dump_regs = dwmac1000_dump_dma_regs, @@ -144,4 +149,5 @@ const struct stmmac_dma_ops dwmac1000_dma_ops = { .start_rx = dwmac_dma_start_rx, .stop_rx = dwmac_dma_stop_rx, .dma_interrupt = dwmac_dma_interrupt, + .get_hw_feature = dwmac1000_get_hw_feature, }; |