phy: rockchip: inno-usb2: build depends on CPU config

When build with rv1106_defconfig, and enable the following
configs manually:

CONFIG_EXTCON=y
CONFIG_USB_SUPPORT=y
CONFIG_PHY_ROCKCHIP_INNO_USB2=y

size drivers/phy/rockchip/phy-rockchip-inno-usb2.o

before:
   text    data     bss     dec     hex filename
   65118     204       4   65326    ff2e drivers/phy/rockchip/phy-rockchip-inno-usb2.o

after:
   text    data     bss     dec     hex filename
   13780     204       4   13988    36a4 drivers/phy/rockchip/phy-rockchip-inno-usb2.o

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ia8900c17800a4ae9ae04e91f46d71986eda242c0
This commit is contained in:
William Wu
2022-03-10 19:19:47 +08:00
committed by Tao Huang
parent ead9f87f94
commit 1e5e39bebf

View File

@@ -3566,19 +3566,45 @@ static const struct rockchip_usb2phy_cfg rv1108_phy_cfgs[] = {
};
static const struct of_device_id rockchip_usb2phy_dt_match[] = {
#ifdef CONFIG_CPU_PX30
{ .compatible = "rockchip,px30-usb2phy", .data = &rk3328_phy_cfgs },
#endif
#ifdef CONFIG_CPU_RK1808
{ .compatible = "rockchip,rk1808-usb2phy", .data = &rk1808_phy_cfgs },
#endif
#ifdef CONFIG_CPU_RK312X
{ .compatible = "rockchip,rk3128-usb2phy", .data = &rk312x_phy_cfgs },
#endif
#ifdef CONFIG_CPU_RK322X
{ .compatible = "rockchip,rk3228-usb2phy", .data = &rk3228_phy_cfgs },
#endif
#ifdef CONFIG_CPU_RK3308
{ .compatible = "rockchip,rk3308-usb2phy", .data = &rk3308_phy_cfgs },
#endif
#ifdef CONFIG_CPU_RK3328
{ .compatible = "rockchip,rk3328-usb2phy", .data = &rk3328_phy_cfgs },
#endif
#ifdef CONFIG_CPU_RK3366
{ .compatible = "rockchip,rk3366-usb2phy", .data = &rk3366_phy_cfgs },
#endif
#ifdef CONFIG_CPU_RK3368
{ .compatible = "rockchip,rk3368-usb2phy", .data = &rk3368_phy_cfgs },
#endif
#ifdef CONFIG_CPU_RK3399
{ .compatible = "rockchip,rk3399-usb2phy", .data = &rk3399_phy_cfgs },
#endif
#ifdef CONFIG_CPU_RK3568
{ .compatible = "rockchip,rk3568-usb2phy", .data = &rk3568_phy_cfgs },
#endif
#ifdef CONFIG_CPU_RK3588
{ .compatible = "rockchip,rk3588-usb2phy", .data = &rk3588_phy_cfgs },
#endif
#ifdef CONFIG_CPU_RV1106
{ .compatible = "rockchip,rv1106-usb2phy", .data = &rv1106_phy_cfgs },
#endif
#ifdef CONFIG_CPU_RV1108
{ .compatible = "rockchip,rv1108-usb2phy", .data = &rv1108_phy_cfgs },
#endif
{}
};
MODULE_DEVICE_TABLE(of, rockchip_usb2phy_dt_match);