Patchwork [U-Boot,04/14] davinci_emac: conditionally compile specific PHY support

login
register
mail settings
Submitter Ilya Yanok
Date Nov. 1, 2011, 11:15 p.m.
Message ID <1320189368-9763-5-git-send-email-yanok@emcraft.com>
Download mbox | patch
Permalink /patch/123166/
State Superseded
Delegated to: Sandeep Paulraj
Headers show

Comments

Ilya Yanok - Nov. 1, 2011, 11:15 p.m.
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 drivers/net/davinci_emac.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

Patch

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index b2a6076..0e9fbc2 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -790,6 +790,7 @@  int davinci_emac_initialize(void)
 		phy_id |= tmp & 0x0000ffff;
 
 		switch (phy_id) {
+#ifdef PHY_KSZ8873
 		case PHY_KSZ8873:
 			sprintf(phy[i].name, "KSZ8873 @ 0x%02x",
 						active_phy_addr[i]);
@@ -798,6 +799,8 @@  int davinci_emac_initialize(void)
 			phy[i].get_link_speed = ksz8873_get_link_speed;
 			phy[i].auto_negotiate = ksz8873_auto_negotiate;
 			break;
+#endif
+#ifdef PHY_LXT972
 		case PHY_LXT972:
 			sprintf(phy[i].name, "LXT972 @ 0x%02x",
 						active_phy_addr[i]);
@@ -806,6 +809,8 @@  int davinci_emac_initialize(void)
 			phy[i].get_link_speed = lxt972_get_link_speed;
 			phy[i].auto_negotiate = lxt972_auto_negotiate;
 			break;
+#endif
+#ifdef PHY_DP83848
 		case PHY_DP83848:
 			sprintf(phy[i].name, "DP83848 @ 0x%02x",
 						active_phy_addr[i]);
@@ -814,6 +819,8 @@  int davinci_emac_initialize(void)
 			phy[i].get_link_speed = dp83848_get_link_speed;
 			phy[i].auto_negotiate = dp83848_auto_negotiate;
 			break;
+#endif
+#ifdef PHY_ET1011C
 		case PHY_ET1011C:
 			sprintf(phy[i].name, "ET1011C @ 0x%02x",
 						active_phy_addr[i]);
@@ -822,6 +829,7 @@  int davinci_emac_initialize(void)
 			phy[i].get_link_speed = et1011c_get_link_speed;
 			phy[i].auto_negotiate = gen_auto_negotiate;
 			break;
+#endif
 		default:
 			sprintf(phy[i].name, "GENERIC @ 0x%02x",
 						active_phy_addr[i]);