Changeset 28982


Ignore:
Timestamp:
2011-11-12T13:09:48+01:00 (6 years ago)
Author:
juhosg
Message:

ar71xx: add an id argument to ar71xx_add_device_mdio

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

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c

    r28978 r28982  
    170170} 
    171171 
    172 void __init ar71xx_add_device_mdio(u32 phy_mask) 
    173 { 
     172void __init ar71xx_add_device_mdio(unsigned int id, u32 phy_mask) 
     173{ 
     174        if (id > 0) { 
     175                printk(KERN_ERR "ar71xx: invalid MDIO id %u\n", id); 
     176                return; 
     177        } 
     178 
    174179        switch (ar71xx_soc) { 
    175180        case AR71XX_SOC_AR7240: 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/devices.h

    r22700 r28982  
    4242 
    4343extern struct platform_device ar71xx_mdio_device; 
    44 void ar71xx_add_device_mdio(u32 phy_mask) __init; 
     44void ar71xx_add_device_mdio(unsigned int id, u32 phy_mask) __init; 
    4545 
    4646void ar71xx_add_device_uart(void) __init; 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-all0258n.c

    r28615 r28982  
    135135        ar71xx_eth1_data.has_ar7240_switch = 1; 
    136136 
    137         ar71xx_add_device_mdio(0x0); 
     137        ar71xx_add_device_mdio(0, 0x0); 
    138138 
    139139        ar71xx_add_device_eth(0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap121.c

    r27067 r28982  
    201201        ar71xx_eth1_data.has_ar7240_switch = 1; 
    202202 
    203         ar71xx_add_device_mdio(0x0); 
     203        ar71xx_add_device_mdio(0, 0x0); 
    204204        ar71xx_add_device_eth(1); 
    205205        ar71xx_add_device_eth(0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c

    r26603 r28982  
    111111        u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); 
    112112 
    113         ar71xx_add_device_mdio(0x0); 
     113        ar71xx_add_device_mdio(0, 0x0); 
    114114 
    115115        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, eeprom, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c

    r26603 r28982  
    198198        u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); 
    199199 
    200         ar71xx_add_device_mdio(0xfffffffe); 
     200        ar71xx_add_device_mdio(0, 0xfffffffe); 
    201201 
    202202        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, eeprom, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap96.c

    r26603 r28982  
    143143        u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); 
    144144 
    145         ar71xx_add_device_mdio(~(AP96_WAN_PHYMASK | AP96_LAN_PHYMASK)); 
     145        ar71xx_add_device_mdio(0, ~(AP96_WAN_PHYMASK | AP96_LAN_PHYMASK)); 
    146146 
    147147        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, art, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c

    r26603 r28982  
    7979static void __init aw_nr580_setup(void) 
    8080{ 
    81         ar71xx_add_device_mdio(0x0); 
     81        ar71xx_add_device_mdio(0, 0x0); 
    8282 
    8383        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-600-a1.c

    r26603 r28982  
    149149        ar71xx_eth1_data.duplex = DUPLEX_FULL; 
    150150 
    151         ar71xx_add_device_mdio(0x0); 
     151        ar71xx_add_device_mdio(0, 0x0); 
    152152        ar71xx_add_device_eth(1); 
    153153        ar71xx_add_device_eth(0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c

    r27959 r28982  
    149149        } 
    150150 
    151         ar71xx_add_device_mdio(DIR_615C1_MDIO_MASK); 
     151        ar71xx_add_device_mdio(0, DIR_615C1_MDIO_MASK); 
    152152 
    153153        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c

    r28295 r28982  
    170170        dir825b1_read_ascii_mac(mac2, DIR825B1_MAC_LOCATION_1); 
    171171 
    172         ar71xx_add_device_mdio(0x0); 
     172        ar71xx_add_device_mdio(0, 0x0); 
    173173 
    174174        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 2); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c

    r26606 r28982  
    158158        u8 *boardconfig = (u8 *) KSEG1ADDR(EAP7660D_BOARDCONFIG); 
    159159 
    160         ar71xx_add_device_mdio(~EAP7660D_PHYMASK); 
     160        ar71xx_add_device_mdio(0, ~EAP7660D_PHYMASK); 
    161161 
    162162        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c

    r26862 r28982  
    7474        ar71xx_add_device_m25p80(NULL); 
    7575 
    76         ar71xx_add_device_mdio(~JA76PF_MDIO_PHYMASK); 
     76        ar71xx_add_device_mdio(0, ~JA76PF_MDIO_PHYMASK); 
    7777 
    7878        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-jwap003.c

    r26603 r28982  
    5454        ar71xx_add_device_m25p80(NULL); 
    5555 
    56         ar71xx_add_device_mdio(0x0); 
     56        ar71xx_add_device_mdio(0, 0x0); 
    5757 
    5858        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c

    r28703 r28982  
    135135        u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); 
    136136 
    137         ar71xx_add_device_mdio(MZK_W04NU_MDIO_MASK); 
     137        ar71xx_add_device_mdio(0, MZK_W04NU_MDIO_MASK); 
    138138 
    139139        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, eeprom, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c

    r28703 r28982  
    130130        u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); 
    131131 
    132         ar71xx_add_device_mdio(MZK_W300NH_MDIO_MASK); 
     132        ar71xx_add_device_mdio(0, MZK_W300NH_MDIO_MASK); 
    133133 
    134134        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, eeprom, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-om2p.c

    r28617 r28982  
    9494        ar71xx_add_device_m25p80(&om2p_flash_data); 
    9595 
    96         ar71xx_add_device_mdio(~OM2P_WAN_PHYMASK); 
     96        ar71xx_add_device_mdio(0, ~OM2P_WAN_PHYMASK); 
    9797 
    9898        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c

    r26603 r28982  
    5151        ar71xx_add_device_m25p80(NULL); 
    5252 
    53         ar71xx_add_device_mdio(~PB42_MDIO_PHYMASK); 
     53        ar71xx_add_device_mdio(0, ~PB42_MDIO_PHYMASK); 
    5454 
    5555        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c

    r26603 r28982  
    175175static void __init pb44_init(void) 
    176176{ 
    177         ar71xx_add_device_mdio(~PB44_MDIO_PHYMASK); 
     177        ar71xx_add_device_mdio(0, ~PB44_MDIO_PHYMASK); 
    178178 
    179179        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb92.c

    r26779 r28982  
    8787        ar71xx_add_device_m25p80(&pb92_flash_data); 
    8888 
    89         ar71xx_add_device_mdio(~BIT(0)); 
     89        ar71xx_add_device_mdio(0, ~BIT(0)); 
    9090        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); 
    9191        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c

    r28423 r28982  
    219219                                ARRAY_SIZE(rb4xx_microsd_info)); 
    220220 
    221         ar71xx_add_device_mdio(0xfffffffc); 
     221        ar71xx_add_device_mdio(0, 0xfffffffc); 
    222222 
    223223        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); 
     
    252252                                ARRAY_SIZE(rb4xx_microsd_info)); 
    253253 
    254         ar71xx_add_device_mdio(~RB433_MDIO_PHYMASK); 
     254        ar71xx_add_device_mdio(0, ~RB433_MDIO_PHYMASK); 
    255255 
    256256        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 1); 
     
    287287{ 
    288288        rb4xx_generic_setup(); 
    289         ar71xx_add_device_mdio(~RB450_MDIO_PHYMASK); 
     289        ar71xx_add_device_mdio(0, ~RB450_MDIO_PHYMASK); 
    290290 
    291291        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 1); 
     
    325325        rb4xx_generic_setup(); 
    326326 
    327         ar71xx_add_device_mdio(0x3fffff00); 
     327        ar71xx_add_device_mdio(0, 0x3fffff00); 
    328328 
    329329        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); 
     
    377377        platform_device_register(&rb4xx_nand_device); 
    378378 
    379         ar71xx_add_device_mdio(~RB493G_MDIO_PHYMASK); 
     379        ar71xx_add_device_mdio(0, ~RB493G_MDIO_PHYMASK); 
    380380 
    381381        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c

    r26394 r28982  
    133133        ar71xx_eth1_data.has_ar7240_switch = 1; 
    134134 
    135         ar71xx_add_device_mdio(0x0); 
     135        ar71xx_add_device_mdio(0, 0x0); 
    136136        ar71xx_add_device_eth(1); 
    137137        ar71xx_add_device_eth(0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c

    r27959 r28982  
    125125        } 
    126126 
    127         ar71xx_add_device_mdio(TEW_632BRP_MDIO_MASK); 
     127        ar71xx_add_device_mdio(0, TEW_632BRP_MDIO_MASK); 
    128128 
    129129        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3x20.c

    r28701 r28982  
    139139        ar71xx_eth1_data.duplex = DUPLEX_FULL; 
    140140 
    141         ar71xx_add_device_mdio(0x0); 
     141        ar71xx_add_device_mdio(0, 0x0); 
    142142        ar71xx_add_device_eth(1); 
    143143        ar71xx_add_device_eth(0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd-v2.c

    r28701 r28982  
    111111        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; 
    112112        ar71xx_eth0_data.phy_mask = 0x00001000; 
    113         ar71xx_add_device_mdio(0x0); 
     113        ar71xx_add_device_mdio(0, 0x0); 
    114114 
    115115        ar71xx_eth0_data.reset_bit = RESET_MODULE_GE0_MAC | 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c

    r28701 r28982  
    112112        ar71xx_eth1_data.has_ar7240_switch = 1; 
    113113 
    114         ar71xx_add_device_mdio(0x0); 
     114        ar71xx_add_device_mdio(0, 0x0); 
    115115        ar71xx_add_device_eth(1); 
    116116 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr703n.c

    r28701 r28982  
    112112        ar71xx_eth0_data.phy_mask = BIT(4); 
    113113 
    114         ar71xx_add_device_mdio(0x0); 
     114        ar71xx_add_device_mdio(0, 0x0); 
    115115        ar71xx_add_device_eth(0); 
    116116 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c

    r28706 r28982  
    146146        ar71xx_eth1_data.has_ar7240_switch = 1; 
    147147 
    148         ar71xx_add_device_mdio(0x0); 
     148        ar71xx_add_device_mdio(0, 0x0); 
    149149        ar71xx_add_device_eth(1); 
    150150        ar71xx_add_device_eth(0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c

    r28701 r28982  
    124124        ar71xx_eth1_data.duplex = DUPLEX_FULL; 
    125125 
    126         ar71xx_add_device_mdio(0x0); 
     126        ar71xx_add_device_mdio(0, 0x0); 
    127127        ar71xx_add_device_eth(1); 
    128128        ar71xx_add_device_eth(0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c

    r28981 r28982  
    119119        u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); 
    120120 
    121         ar71xx_add_device_mdio(0x0); 
     121        ar71xx_add_device_mdio(0, 0x0); 
    122122 
    123123        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c

    r28981 r28982  
    124124        u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); 
    125125 
    126         ar71xx_add_device_mdio(0x0); 
     126        ar71xx_add_device_mdio(0, 0x0); 
    127127 
    128128        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c

    r26924 r28982  
    153153        ubnt_generic_setup(); 
    154154 
    155         ar71xx_add_device_mdio(~(UBNT_RS_WAN_PHYMASK | UBNT_RS_LAN_PHYMASK)); 
     155        ar71xx_add_device_mdio(0, ~(UBNT_RS_WAN_PHYMASK | UBNT_RS_LAN_PHYMASK)); 
    156156 
    157157        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); 
     
    183183        ubnt_generic_setup(); 
    184184 
    185         ar71xx_add_device_mdio(~(UBNT_RSPRO_WAN_PHYMASK | 
     185        ar71xx_add_device_mdio(0, ~(UBNT_RSPRO_WAN_PHYMASK | 
    186186                                 UBNT_RSPRO_LAN_PHYMASK)); 
    187187 
     
    221221        ubnt_generic_setup(); 
    222222 
    223         ar71xx_add_device_mdio(~UBNT_LSSR71_PHY_MASK); 
     223        ar71xx_add_device_mdio(0, ~UBNT_LSSR71_PHY_MASK); 
    224224 
    225225        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); 
     
    246246        ar71xx_add_device_m25p80(NULL); 
    247247 
    248         ar71xx_add_device_mdio(~UBNT_M_WAN_PHYMASK); 
     248        ar71xx_add_device_mdio(0, ~UBNT_M_WAN_PHYMASK); 
    249249 
    250250        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 0); 
     
    314314        ar71xx_add_device_m25p80(NULL); 
    315315 
    316         ar71xx_add_device_mdio(~UBNT_M_WAN_PHYMASK); 
     316        ar71xx_add_device_mdio(0, ~UBNT_M_WAN_PHYMASK); 
    317317 
    318318        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-whr-hp-g300n.c

    r28805 r28982  
    160160        ar71xx_eth1_data.duplex = DUPLEX_FULL; 
    161161 
    162         ar71xx_add_device_mdio(0x0); 
     162        ar71xx_add_device_mdio(0, 0x0); 
    163163        ar71xx_add_device_eth(1); 
    164164        ar71xx_add_device_eth(0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c

    r26603 r28982  
    120120        u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); 
    121121 
    122         ar71xx_add_device_mdio(0x0); 
     122        ar71xx_add_device_mdio(0, 0x0); 
    123123 
    124124        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, eeprom, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c

    r26603 r28982  
    7878        ar71xx_add_device_m25p80(NULL); 
    7979 
    80         ar71xx_add_device_mdio(0xfffffff7); 
     80        ar71xx_add_device_mdio(0, 0xfffffff7); 
    8181 
    8282        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c

    r26603 r28982  
    128128        } 
    129129 
    130         ar71xx_add_device_mdio(0x0); 
     130        ar71xx_add_device_mdio(0, 0x0); 
    131131 
    132132        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c

    r26603 r28982  
    135135        u8 *mac = art + WRT400N_MAC_ADDR_OFFSET; 
    136136 
    137         ar71xx_add_device_mdio(0x0); 
     137        ar71xx_add_device_mdio(0, 0x0); 
    138138 
    139139        ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 1); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-ag300h.c

    r28702 r28982  
    195195        ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac2, 1); 
    196196 
    197         ar71xx_add_device_mdio(~(BIT(0) | BIT(4))); 
     197        ar71xx_add_device_mdio(0, ~(BIT(0) | BIT(4))); 
    198198 
    199199        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-zcn-1523h.c

    r27101 r28982  
    185185        ar71xx_eth1_data.duplex = DUPLEX_FULL; 
    186186 
    187         ar71xx_add_device_mdio(0x0); 
     187        ar71xx_add_device_mdio(0, 0x0); 
    188188        ar71xx_add_device_eth(0); 
    189189} 
Note: See TracChangeset for help on using the changeset viewer.