aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-12-19 20:16:13 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-20 20:48:49 -0500
commitb04138b335203b79ffe1b14750fa245a4dab7191 (patch)
tree34b919de0a5f3ab927dda225a84cc624ab624741 /arch
parent656a7c2b1210deddf76444ecc76e058c0404ce80 (diff)
b44: use fixed PHY device if we do not find any
The ADM6996L switch and some Broadcom switches with two MII interfaces like the BCM5325F connected to two MACs on the SoC, used on some routers do not return a valid value when reading the PHY id register and Linux thinks there is no PHY at all, but that is wrong. This patch registers a fixed phy in the arch code and then searches it when there is no other phy in the Ethernet driver code. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/bcm47xx/setup.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c
index 1f30571968e7..9057728ac56b 100644
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
@@ -28,6 +28,9 @@
28 28
29#include <linux/export.h> 29#include <linux/export.h>
30#include <linux/types.h> 30#include <linux/types.h>
31#include <linux/ethtool.h>
32#include <linux/phy.h>
33#include <linux/phy_fixed.h>
31#include <linux/ssb/ssb.h> 34#include <linux/ssb/ssb.h>
32#include <linux/ssb/ssb_embedded.h> 35#include <linux/ssb/ssb_embedded.h>
33#include <linux/bcma/bcma_soc.h> 36#include <linux/bcma/bcma_soc.h>
@@ -225,6 +228,12 @@ void __init plat_mem_setup(void)
225 bcm47xx_board_detect(); 228 bcm47xx_board_detect();
226} 229}
227 230
231static struct fixed_phy_status bcm47xx_fixed_phy_status __initdata = {
232 .link = 1,
233 .speed = SPEED_100,
234 .duplex = DUPLEX_FULL,
235};
236
228static int __init bcm47xx_register_bus_complete(void) 237static int __init bcm47xx_register_bus_complete(void)
229{ 238{
230 switch (bcm47xx_bus_type) { 239 switch (bcm47xx_bus_type) {
@@ -239,6 +248,7 @@ static int __init bcm47xx_register_bus_complete(void)
239 break; 248 break;
240#endif 249#endif
241 } 250 }
251 fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status);
242 return 0; 252 return 0;
243} 253}
244device_initcall(bcm47xx_register_bus_complete); 254device_initcall(bcm47xx_register_bus_complete);