Ignore:
Timestamp:
2011-05-15T01:31:50+02:00 (6 years ago)
Author:
matteo
Message:

ar71xx: add link detection on Ubiquiti devices WAN port

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c

    r26889 r26891  
    236236             ubnt_lssr71_setup); 
    237237 
     238#define UBNT_M_WAN_PHYMASK      BIT(4) 
     239#define UBNT_M_LAN_PHYMASK      BIT(0) 
     240 
    238241static void __init ubnt_m_setup(void) 
    239242{ 
     
    244247        ar71xx_add_device_m25p80(NULL); 
    245248 
    246         ar71xx_add_device_mdio(~0); 
     249        ar71xx_add_device_mdio(~(UBNT_M_WAN_PHYMASK | UBNT_M_LAN_PHYMASK)); 
    247250 
    248251        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 0); 
    249252        ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac2, 0); 
    250         ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; 
     253        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; 
    251254        ar71xx_eth0_data.speed = SPEED_100; 
    252255        ar71xx_eth0_data.duplex = DUPLEX_FULL; 
     256        ar71xx_eth0_data.phy_mask = UBNT_M_WAN_PHYMASK; 
    253257 
    254258        ar71xx_add_device_eth(0); 
     
    311315        ar71xx_add_device_m25p80(NULL); 
    312316 
    313         ar71xx_add_device_mdio(~0); 
     317        ar71xx_add_device_mdio(~UBNT_M_WAN_PHYMASK); 
    314318 
    315319        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); 
    316         ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; 
     320        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; 
    317321        ar71xx_eth0_data.speed = SPEED_100; 
    318322        ar71xx_eth0_data.duplex = DUPLEX_FULL; 
     323        ar71xx_eth0_data.phy_mask = UBNT_M_WAN_PHYMASK; 
    319324 
    320325        ar71xx_add_device_eth(0); 
Note: See TracChangeset for help on using the changeset viewer.