diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2011-12-21 07:58:19 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-22 00:44:34 +0400 |
commit | bfab27a146ed4d722c6d399f844f955f29cd2b81 (patch) | |
tree | e433b5c075920229274a3229e0f06b8c6a2d19b2 /drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | |
parent | 225d9b89c937633dfeec502741a174fe0bab5b9f (diff) | |
download | linux-bfab27a146ed4d722c6d399f844f955f29cd2b81.tar.xz |
stmmac: add the experimental PCI support
This patch adds the PCI support (as EXPERIMENTAL)
this has been also tested on XLINX XC2V3000 FF1152AMT0221
D1215994A VIRTEX FPGA board.
To support the PCI bus the main part has been reworked
and both the platform and the PCI specific parts have
been moved into different files.
Signed-off-by: Rayagond Kokatanur <rayagond@vayavyalabs.com>
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/dwmac_lib.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c index e25093510b0c..f20aa12931d0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c @@ -238,6 +238,19 @@ void stmmac_set_mac_addr(void __iomem *ioaddr, u8 addr[6], writel(data, ioaddr + low); } +/* Enable disable MAC RX/TX */ +void stmmac_set_mac(void __iomem *ioaddr, bool enable) +{ + u32 value = readl(ioaddr + MAC_CTRL_REG); + + if (enable) + value |= MAC_RNABLE_RX | MAC_ENABLE_TX; + else + value &= ~(MAC_ENABLE_TX | MAC_RNABLE_RX); + + writel(value, ioaddr + MAC_CTRL_REG); +} + void stmmac_get_mac_addr(void __iomem *ioaddr, unsigned char *addr, unsigned int high, unsigned int low) { |