Changeset 27756


Ignore:
Timestamp:
2011-07-24T16:40:35+02:00 (5 years ago)
Author:
nbd
Message:

ar71xx: autodetect rtl8366s/rtl8366rb on wzr-hp-g300nh

Location:
trunk/target/linux/ar71xx/files/arch/mips/ar71xx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig

    r27075 r27756  
    152152        select AR71XX_DEV_LEDS_GPIO 
    153153        select AR71XX_DEV_USB 
     154        select RTL8366_SMI 
    154155        default y 
    155156 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh.c

    r27754 r27756  
    235235}; 
    236236 
    237 static void __init wzrhpg30xnh_setup(bool hasrtl8366rb) 
     237static void __init wzrhpg30xnh_setup(void) 
    238238{ 
    239239        u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); 
    240240        u8 *mac = eeprom + WZRHPG300NH_MAC_OFFSET; 
     241        bool hasrtl8366rb = false; 
    241242 
    242243        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); 
    243244        ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1); 
     245 
     246        if (rtl8366_smi_detect(&wzrhpg300nh_rtl8366_data) == RTL8366_TYPE_RB) 
     247                hasrtl8366rb = true; 
    244248 
    245249        if (hasrtl8366rb) { 
     
    285289} 
    286290 
    287 static void __init wzrhpg300nh_setup(void) 
    288 { 
    289         wzrhpg30xnh_setup(false); 
    290 } 
    291  
    292 static void __init wzrhpg301nh_setup(void) 
    293 { 
    294         wzrhpg30xnh_setup(true); 
    295 } 
    296  
    297291MIPS_MACHINE(AR71XX_MACH_WZR_HP_G300NH, "WZR-HP-G300NH", 
    298              "Buffalo WZR-HP-G300NH", wzrhpg300nh_setup); 
     292             "Buffalo WZR-HP-G300NH", wzrhpg30xnh_setup); 
    299293 
    300294MIPS_MACHINE(AR71XX_MACH_WZR_HP_G301NH, "WZR-HP-G301NH", 
    301              "Buffalo WZR-HP-G301NH", wzrhpg301nh_setup); 
     295             "Buffalo WZR-HP-G301NH", wzrhpg30xnh_setup); 
Note: See TracChangeset for help on using the changeset viewer.