[U-Boot] [PATCH 3/6] davinci_emac: conditionally compile specific PHY support

Ilya Yanok yanok at emcraft.com
Thu Oct 6 01:36:43 CEST 2011


Signed-off-by: Ilya Yanok <yanok at emcraft.com>
---
 drivers/net/davinci_emac.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 7eb37c7..222a0d0 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -725,6 +725,7 @@ int davinci_emac_initialize(void)
 	phy_id |= tmp & 0x0000ffff;
 
 	switch (phy_id) {
+#ifdef PHY_KSZ8873
 	case PHY_KSZ8873:
 		sprintf(phy.name, "KSZ8873 @ 0x%02x", active_phy_addr);
 		phy.init = ksz8873_init_phy;
@@ -732,6 +733,8 @@ int davinci_emac_initialize(void)
 		phy.get_link_speed = ksz8873_get_link_speed;
 		phy.auto_negotiate = ksz8873_auto_negotiate;
 		break;
+#endif
+#ifdef PHY_LXT972
 		case PHY_LXT972:
 			sprintf(phy.name, "LXT972 @ 0x%02x", active_phy_addr);
 			phy.init = lxt972_init_phy;
@@ -739,6 +742,8 @@ int davinci_emac_initialize(void)
 			phy.get_link_speed = lxt972_get_link_speed;
 			phy.auto_negotiate = lxt972_auto_negotiate;
 			break;
+#endif
+#ifdef PHY_DP83848
 		case PHY_DP83848:
 			sprintf(phy.name, "DP83848 @ 0x%02x", active_phy_addr);
 			phy.init = dp83848_init_phy;
@@ -746,6 +751,8 @@ int davinci_emac_initialize(void)
 			phy.get_link_speed = dp83848_get_link_speed;
 			phy.auto_negotiate = dp83848_auto_negotiate;
 			break;
+#endif
+#ifdef PHY_ET1011C
 		case PHY_ET1011C:
 			sprintf(phy.name, "ET1011C @ 0x%02x", active_phy_addr);
 			phy.init = gen_init_phy;
@@ -753,6 +760,7 @@ int davinci_emac_initialize(void)
 			phy.get_link_speed = et1011c_get_link_speed;
 			phy.auto_negotiate = gen_auto_negotiate;
 			break;
+#endif
 		default:
 			sprintf(phy.name, "GENERIC @ 0x%02x", active_phy_addr);
 			phy.init = gen_init_phy;
-- 
1.7.6.2



More information about the U-Boot mailing list