mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
net: ethernet: stmmac: dwmac-rk: Add config option for dwmac-rk-tool
Add this config option to reduce memory usage, if it was not necessary. ./ksize.sh drivers/net/ethernet/stmicro/ before size: 131758 Bytes after size: 121861 Bytes save size: 9897 Bytes Signed-off-by: David Wu <david.wu@rock-chips.com> Change-Id: I96c88d5eb5109fc956a85b8685e1746d76545a87
This commit is contained in:
@@ -138,6 +138,16 @@ config DWMAC_ROCKCHIP
|
|||||||
This selects the Rockchip RK3288 SoC glue layer support for
|
This selects the Rockchip RK3288 SoC glue layer support for
|
||||||
the stmmac device driver.
|
the stmmac device driver.
|
||||||
|
|
||||||
|
config DWMAC_ROCKCHIP_TOOL
|
||||||
|
bool "Rockchip dwmac tool support"
|
||||||
|
depends on DWMAC_ROCKCHIP
|
||||||
|
default DWMAC_ROCKCHIP
|
||||||
|
help
|
||||||
|
Support for Ethernet functions on Rockchip SoCs.
|
||||||
|
|
||||||
|
This selects the features for Rockchip's Ethernet, include PHY loopback,
|
||||||
|
MAC loopback, and delayline scanning of RGMII mode.
|
||||||
|
|
||||||
config DWMAC_SOCFPGA
|
config DWMAC_SOCFPGA
|
||||||
tristate "SOCFPGA dwmac support"
|
tristate "SOCFPGA dwmac support"
|
||||||
default (ARCH_SOCFPGA || ARCH_STRATIX10)
|
default (ARCH_SOCFPGA || ARCH_STRATIX10)
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ obj-$(CONFIG_DWMAC_MESON) += dwmac-meson.o dwmac-meson8b.o
|
|||||||
obj-$(CONFIG_DWMAC_OXNAS) += dwmac-oxnas.o
|
obj-$(CONFIG_DWMAC_OXNAS) += dwmac-oxnas.o
|
||||||
obj-$(CONFIG_DWMAC_QCOM_ETHQOS) += dwmac-qcom-ethqos.o
|
obj-$(CONFIG_DWMAC_QCOM_ETHQOS) += dwmac-qcom-ethqos.o
|
||||||
obj-$(CONFIG_DWMAC_ROCKCHIP) += dwmac-rockchip.o
|
obj-$(CONFIG_DWMAC_ROCKCHIP) += dwmac-rockchip.o
|
||||||
dwmac-rockchip-objs := dwmac-rk.o dwmac-rk-tool.o
|
dwmac-rockchip-objs := dwmac-rk.o
|
||||||
|
dwmac-rockchip-$(CONFIG_DWMAC_ROCKCHIP_TOOL) += dwmac-rk-tool.o
|
||||||
obj-$(CONFIG_DWMAC_SOCFPGA) += dwmac-altr-socfpga.o
|
obj-$(CONFIG_DWMAC_SOCFPGA) += dwmac-altr-socfpga.o
|
||||||
obj-$(CONFIG_DWMAC_STI) += dwmac-sti.o
|
obj-$(CONFIG_DWMAC_STI) += dwmac-sti.o
|
||||||
obj-$(CONFIG_DWMAC_STM32) += dwmac-stm32.o
|
obj-$(CONFIG_DWMAC_STM32) += dwmac-stm32.o
|
||||||
|
|||||||
@@ -13,8 +13,20 @@ void dwmac_rk_set_rgmii_delayline(struct stmmac_priv *priv, int tx_delay, int rx
|
|||||||
void dwmac_rk_get_rgmii_delayline(struct stmmac_priv *priv, int *tx_delay, int *rx_delay);
|
void dwmac_rk_get_rgmii_delayline(struct stmmac_priv *priv, int *tx_delay, int *rx_delay);
|
||||||
int dwmac_rk_get_phy_interface(struct stmmac_priv *priv);
|
int dwmac_rk_get_phy_interface(struct stmmac_priv *priv);
|
||||||
|
|
||||||
|
#ifdef CONFIG_DWMAC_ROCKCHIP_TOOL
|
||||||
int dwmac_rk_create_loopback_sysfs(struct device *dev);
|
int dwmac_rk_create_loopback_sysfs(struct device *dev);
|
||||||
int dwmac_rk_remove_loopback_sysfs(struct device *device);
|
int dwmac_rk_remove_loopback_sysfs(struct device *device);
|
||||||
|
#else
|
||||||
|
static inline int dwmac_rk_create_loopback_sysfs(struct device *dev)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int dwmac_rk_remove_loopback_sysfs(struct device *device)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DWMAC_RK_AUTO_DELAYLINE
|
#ifdef CONFIG_DWMAC_RK_AUTO_DELAYLINE
|
||||||
int dwmac_rk_get_rgmii_delayline_from_vendor(struct stmmac_priv *priv);
|
int dwmac_rk_get_rgmii_delayline_from_vendor(struct stmmac_priv *priv);
|
||||||
|
|||||||
Reference in New Issue
Block a user