mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
net: ethernet: stmmac: Add uio support for stmmac
Currently only supports single channel, and the network card name needs to be eth0 and eth1. Signed-off-by: David Wu <david.wu@rock-chips.com> Change-Id: I19975b10e2ed12931edc2e8bd50c003416a1109c
This commit is contained in:
@@ -25,6 +25,13 @@ config STMMAC_SELFTESTS
|
||||
feature if you are facing problems with your HW and submit the test
|
||||
results to the netdev Mailing List.
|
||||
|
||||
config STMMAC_UIO
|
||||
tristate "STMMAC_UIO ethernet controller"
|
||||
default n
|
||||
select UIO
|
||||
help
|
||||
Say M here if you want to use the stmmac_uio.ko for DPDK.
|
||||
|
||||
config STMMAC_ETHTOOL
|
||||
bool "Ethtool feature for STMMAC"
|
||||
default STMMAC_ETH if !ROCKCHIP_MINI_KERNEL
|
||||
|
||||
@@ -27,6 +27,7 @@ obj-$(CONFIG_DWMAC_QCOM_ETHQOS) += dwmac-qcom-ethqos.o
|
||||
obj-$(CONFIG_DWMAC_ROCKCHIP) += dwmac-rockchip.o
|
||||
dwmac-rockchip-objs := dwmac-rk.o
|
||||
dwmac-rockchip-$(CONFIG_DWMAC_ROCKCHIP_TOOL) += dwmac-rk-tool.o
|
||||
obj-$(CONFIG_STMMAC_UIO) += stmmac_uio.o
|
||||
obj-$(CONFIG_DWMAC_SOCFPGA) += dwmac-altr-socfpga.o
|
||||
obj-$(CONFIG_DWMAC_STI) += dwmac-sti.o
|
||||
obj-$(CONFIG_DWMAC_STM32) += dwmac-stm32.o
|
||||
|
||||
@@ -48,10 +48,18 @@
|
||||
*/
|
||||
#define DMA_MIN_TX_SIZE 64
|
||||
#define DMA_MAX_TX_SIZE 1024
|
||||
#if IS_ENABLED(CONFIG_STMMAC_UIO)
|
||||
#define DMA_DEFAULT_TX_SIZE 1024
|
||||
#else
|
||||
#define DMA_DEFAULT_TX_SIZE 512
|
||||
#endif
|
||||
#define DMA_MIN_RX_SIZE 64
|
||||
#define DMA_MAX_RX_SIZE 1024
|
||||
#if IS_ENABLED(CONFIG_STMMAC_UIO)
|
||||
#define DMA_DEFAULT_RX_SIZE 1024
|
||||
#else
|
||||
#define DMA_DEFAULT_RX_SIZE 512
|
||||
#endif
|
||||
#define STMMAC_GET_ENTRY(x, size) ((x + 1) & (size - 1))
|
||||
|
||||
#undef FRAME_FILTER_DEBUG
|
||||
|
||||
@@ -396,6 +396,7 @@ int stmmac_mdio_reset(struct mii_bus *bus)
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(stmmac_mdio_reset);
|
||||
|
||||
/**
|
||||
* stmmac_mdio_register
|
||||
|
||||
1050
drivers/net/ethernet/stmicro/stmmac/stmmac_uio.c
Normal file
1050
drivers/net/ethernet/stmicro/stmmac/stmmac_uio.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user