From 9285917d7b70cb9bcd0cd3e3dc0170339eafc701 Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Mon, 13 Sep 2021 14:40:58 +0800 Subject: [PATCH] net: stmmac: dwmac-rk: build depends on CPU config When build with rv1126_defconfig: before: text data bss dec hex filename 17063 144 0 17207 4337 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.o after: text data bss dec hex filename 7387 144 0 7531 1d6b drivers/net/ethernet/stmicro/stmmac/dwmac-rk.o Signed-off-by: Tao Huang Change-Id: I941f79357f686f5d35e727abea2fe26c4ea0dafa --- .../net/ethernet/stmicro/stmmac/dwmac-rk.c | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index bb0c0e44b5cb..a162375cb8af 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c @@ -2320,20 +2320,48 @@ static int rk_gmac_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(rk_gmac_pm_ops, rk_gmac_suspend, rk_gmac_resume); static const struct of_device_id rk_gmac_dwmac_match[] = { +#ifdef CONFIG_CPU_PX30 { .compatible = "rockchip,px30-gmac", .data = &px30_ops }, +#endif +#ifdef CONFIG_CPU_RK1808 { .compatible = "rockchip,rk1808-gmac", .data = &rk1808_ops }, +#endif +#ifdef CONFIG_CPU_RK312X { .compatible = "rockchip,rk3128-gmac", .data = &rk3128_ops }, +#endif +#ifdef CONFIG_CPU_RK322X { .compatible = "rockchip,rk3228-gmac", .data = &rk3228_ops }, +#endif +#ifdef CONFIG_CPU_RK3288 { .compatible = "rockchip,rk3288-gmac", .data = &rk3288_ops }, +#endif +#ifdef CONFIG_CPU_RK3308 { .compatible = "rockchip,rk3308-mac", .data = &rk3308_ops }, +#endif +#ifdef CONFIG_CPU_RK3328 { .compatible = "rockchip,rk3328-gmac", .data = &rk3328_ops }, +#endif +#ifdef CONFIG_CPU_RK3366 { .compatible = "rockchip,rk3366-gmac", .data = &rk3366_ops }, +#endif +#ifdef CONFIG_CPU_RK3368 { .compatible = "rockchip,rk3368-gmac", .data = &rk3368_ops }, +#endif +#ifdef CONFIG_CPU_RK3399 { .compatible = "rockchip,rk3399-gmac", .data = &rk3399_ops }, +#endif +#ifdef CONFIG_CPU_RK3568 { .compatible = "rockchip,rk3568-gmac", .data = &rk3568_ops }, +#endif +#ifdef CONFIG_CPU_RK3588 { .compatible = "rockchip,rk3588-gmac", .data = &rk3588_ops }, +#endif +#ifdef CONFIG_CPU_RV1108 { .compatible = "rockchip,rv1108-gmac", .data = &rv1108_ops }, +#endif +#ifdef CONFIG_CPU_RV1126 { .compatible = "rockchip,rv1126-gmac", .data = &rv1126_ops }, +#endif { } }; MODULE_DEVICE_TABLE(of, rk_gmac_dwmac_match);