diff options
| -rw-r--r-- | drivers/net/ethernet/ti/Makefile | 3 | ||||
| -rw-r--r-- | drivers/net/ethernet/ti/am65-cpsw-nuss.h | 16 |
2 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/Makefile b/drivers/net/ethernet/ti/Makefile index 58a22d3c4676..24cce9c34a04 100644 --- a/drivers/net/ethernet/ti/Makefile +++ b/drivers/net/ethernet/ti/Makefile @@ -25,7 +25,8 @@ obj-$(CONFIG_TI_KEYSTONE_NETCP_ETHSS) += keystone_netcp_ethss.o keystone_netcp_ethss-y := netcp_ethss.o netcp_sgmii.o netcp_xgbepcsr.o cpsw_ale.o obj-$(CONFIG_TI_K3_AM65_CPSW_NUSS) += ti-am65-cpsw-nuss.o -ti-am65-cpsw-nuss-y := am65-cpsw-nuss.o cpsw_sl.o am65-cpsw-ethtool.o cpsw_ale.o k3-cppi-desc-pool.o am65-cpsw-qos.o am65-debugfs.o +ti-am65-cpsw-nuss-y := am65-cpsw-nuss.o cpsw_sl.o am65-cpsw-ethtool.o cpsw_ale.o k3-cppi-desc-pool.o am65-cpsw-qos.o +ti-am65-cpsw-nuss-$(CONFIG_DEBUG_FS) += am65-debugfs.o ti-am65-cpsw-nuss-$(CONFIG_TI_K3_AM65_CPSW_SWITCHDEV) += am65-cpsw-switchdev.o obj-$(CONFIG_TI_K3_AM65_CPTS) += am65-cpts.o diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.h b/drivers/net/ethernet/ti/am65-cpsw-nuss.h index edb9c1df9d21..1874bbc37b70 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.h +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.h @@ -201,8 +201,24 @@ int am65_cpsw_nuss_update_tx_chns(struct am65_cpsw_common *common, int num_tx); bool am65_cpsw_port_dev_check(const struct net_device *dev); +#if IS_ENABLED(CONFIG_DEBUG_FS) int am65_cpsw_nuss_register_port_debugfs(struct am65_cpsw_port *port); int am65_cpsw_nuss_register_debugfs(struct am65_cpsw_common *common); void am65_cpsw_nuss_unregister_debugfs(struct am65_cpsw_common *common); +#else +static inline int am65_cpsw_nuss_register_port_debugfs(struct am65_cpsw_port *port) +{ + return 0; +} + +static inline int am65_cpsw_nuss_register_debugfs(struct am65_cpsw_common *common) +{ + return 0; +} + +static inline void am65_cpsw_nuss_unregister_debugfs(struct am65_cpsw_common *common) +{ +} +#endif #endif /* AM65_CPSW_NUSS_H_ */ |
