Changeset 42548


Ignore:
Timestamp:
2014-09-15T12:19:01+02:00 (3 years ago)
Author:
blogic
Message:

ar71xx: refactor ubnt xw board setup

Signed-off-by: Alexander Couzens <lynxis@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/patches-3.10/616-MIPS-ath79-ubnt-xw.patch

    r41636 r42548  
    1 --- a/arch/mips/ath79/mach-ubnt-xm.c 
    2 +++ b/arch/mips/ath79/mach-ubnt-xm.c 
    3 @@ -332,3 +332,60 @@ static void __init ubnt_uap_pro_setup(vo 
     1Index: linux-3.10.49/arch/mips/ath79/mach-ubnt-xm.c 
     2=================================================================== 
     3--- linux-3.10.49.orig/arch/mips/ath79/mach-ubnt-xm.c   2014-08-15 22:55:37.890080659 +0200 
     4+++ linux-3.10.49/arch/mips/ath79/mach-ubnt-xm.c        2014-08-15 22:58:31.061570912 +0200 
     5@@ -332,3 +332,67 @@ 
    46 MIPS_MACHINE(ATH79_MACH_UBNT_UAP_PRO, "UAP-PRO", "Ubiquiti UniFi AP Pro", 
    57             ubnt_uap_pro_setup); 
     
    3032+}; 
    3133+ 
    32 +static void __init ubnt_nano_m_xw_setup(void) 
     34+static void __init ubnt_xw_init(void) 
    3335+{ 
    3436+       u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff0000); 
     
    4547+       ap91_pci_init(eeprom + UAP_PRO_PCI_CALDATA_OFFSET, NULL); 
    4648+ 
    47 +       ath79_register_mdio(0, ~(BIT(0) | BIT(1) | BIT(5))); 
    4849+ 
    4950+       ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_MII_GMAC0 | AR934X_ETH_CFG_MII_GMAC0_SLAVE); 
     
    5152+                      eeprom + UAP_PRO_MAC0_OFFSET, 0); 
    5253+ 
     54+       ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; 
     55+       ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; 
     56+} 
     57+ 
     58+static void __init ubnt_nano_m_xw_setup(void) 
     59+{ 
     60+       ubnt_xw_init(); 
     61+ 
    5362+       /* GMAC0 is connected to an AR8326 switch */ 
    54 +       ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; 
     63+       ath79_register_mdio(0, ~(BIT(0) | BIT(1) | BIT(5))); 
    5564+       ath79_eth0_data.phy_mask = (BIT(0) | BIT(1) | BIT(5)); 
    5665+       ath79_eth0_data.speed = SPEED_100; 
    5766+       ath79_eth0_data.duplex = DUPLEX_FULL; 
    58 +       ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; 
    5967+       ath79_register_eth(0); 
    6068+} 
     
    6270+MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW, "UBNT-NM-XW", "Ubiquiti Nanostation M XW", 
    6371+            ubnt_nano_m_xw_setup); 
     72+ 
    6473--- a/arch/mips/ath79/machtypes.h 
    6574+++ b/arch/mips/ath79/machtypes.h 
    66 @@ -124,6 +124,7 @@ enum ath79_mach_type { 
     75@@ -121,9 +121,10 @@ enum ath79_mach_type { 
     76        ATH79_MACH_TL_WR941ND,          /* TP-LINK TL-WR941ND */ 
     77        ATH79_MACH_UBNT_AIRROUTER,      /* Ubiquiti AirRouter */ 
     78        ATH79_MACH_UBNT_BULLET_M,       /* Ubiquiti Bullet M */ 
    6779        ATH79_MACH_UBNT_LSSR71,         /* Ubiquiti LS-SR71 */ 
    6880        ATH79_MACH_UBNT_LSX,            /* Ubiquiti LSX */ 
Note: See TracChangeset for help on using the changeset viewer.