diff options
-rw-r--r-- | drivers/net/fec.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index ba6db36c12a3..5f9c2c1a9d40 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
@@ -67,6 +67,10 @@ | |||
67 | #define FEC_MAX_PORTS 1 | 67 | #define FEC_MAX_PORTS 1 |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | #if defined(CONFIG_FADS) || defined(CONFIG_RPXCLASSIC) || defined(CONFIG_M5272) | ||
71 | #define HAVE_mii_link_interrupt | ||
72 | #endif | ||
73 | |||
70 | /* | 74 | /* |
71 | * Define the fixed address of the FEC hardware. | 75 | * Define the fixed address of the FEC hardware. |
72 | */ | 76 | */ |
@@ -1222,7 +1226,7 @@ static phy_info_t const * const phy_info[] = { | |||
1222 | }; | 1226 | }; |
1223 | 1227 | ||
1224 | /* ------------------------------------------------------------------------- */ | 1228 | /* ------------------------------------------------------------------------- */ |
1225 | #if !defined(CONFIG_M532x) | 1229 | #ifdef HAVE_mii_link_interrupt |
1226 | #ifdef CONFIG_RPXCLASSIC | 1230 | #ifdef CONFIG_RPXCLASSIC |
1227 | static void | 1231 | static void |
1228 | mii_link_interrupt(void *dev_id); | 1232 | mii_link_interrupt(void *dev_id); |
@@ -2096,6 +2100,7 @@ mii_discover_phy(uint mii_reg, struct net_device *dev) | |||
2096 | 2100 | ||
2097 | /* This interrupt occurs when the PHY detects a link change. | 2101 | /* This interrupt occurs when the PHY detects a link change. |
2098 | */ | 2102 | */ |
2103 | #ifdef HAVE_mii_link_interrupt | ||
2099 | #ifdef CONFIG_RPXCLASSIC | 2104 | #ifdef CONFIG_RPXCLASSIC |
2100 | static void | 2105 | static void |
2101 | mii_link_interrupt(void *dev_id) | 2106 | mii_link_interrupt(void *dev_id) |
@@ -2118,6 +2123,7 @@ mii_link_interrupt(int irq, void * dev_id) | |||
2118 | 2123 | ||
2119 | return IRQ_HANDLED; | 2124 | return IRQ_HANDLED; |
2120 | } | 2125 | } |
2126 | #endif | ||
2121 | 2127 | ||
2122 | static int | 2128 | static int |
2123 | fec_enet_open(struct net_device *dev) | 2129 | fec_enet_open(struct net_device *dev) |
@@ -2596,7 +2602,7 @@ fec_stop(struct net_device *dev) | |||
2596 | static int __init fec_enet_module_init(void) | 2602 | static int __init fec_enet_module_init(void) |
2597 | { | 2603 | { |
2598 | struct net_device *dev; | 2604 | struct net_device *dev; |
2599 | int i, j, err; | 2605 | int i, err; |
2600 | DECLARE_MAC_BUF(mac); | 2606 | DECLARE_MAC_BUF(mac); |
2601 | 2607 | ||
2602 | printk("FEC ENET Version 0.2\n"); | 2608 | printk("FEC ENET Version 0.2\n"); |