From f20b056795ca61a353c1614901311d3308ca70db Mon Sep 17 00:00:00 2001 From: juhosg Date: Sat, 12 Nov 2011 12:09:48 +0000 Subject: ar71xx: add an id argument to ar71xx_add_device_mdio git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28982 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/ar71xx/files/arch/mips/ar71xx/devices.c | 7 ++++++- target/linux/ar71xx/files/arch/mips/ar71xx/devices.h | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-all0258n.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap121.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap96.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-600-a1.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-jwap003.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-om2p.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb92.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c | 10 +++++----- target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3x20.c | 2 +- .../linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd-v2.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr703n.c | 2 +- .../linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c | 10 +++++----- target/linux/ar71xx/files/arch/mips/ar71xx/mach-whr-hp-g300n.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c | 2 +- .../linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-ag300h.c | 2 +- target/linux/ar71xx/files/arch/mips/ar71xx/mach-zcn-1523h.c | 2 +- 39 files changed, 52 insertions(+), 47 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c index 80668169a..fa22c0df8 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c @@ -169,8 +169,13 @@ static void ar71xx_set_pll(u32 cfg_reg, u32 pll_reg, u32 pll_val, u32 shift) iounmap(base); } -void __init ar71xx_add_device_mdio(u32 phy_mask) +void __init ar71xx_add_device_mdio(unsigned int id, u32 phy_mask) { + if (id > 0) { + printk(KERN_ERR "ar71xx: invalid MDIO id %u\n", id); + return; + } + switch (ar71xx_soc) { case AR71XX_SOC_AR7240: ar71xx_mdio_data.is_ar7240 = 1; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.h b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.h index 0a3255ff8..7a222c713 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.h +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.h @@ -41,7 +41,7 @@ extern struct platform_device ar71xx_eth1_device; void ar71xx_add_device_eth(unsigned int id) __init; extern struct platform_device ar71xx_mdio_device; -void ar71xx_add_device_mdio(u32 phy_mask) __init; +void ar71xx_add_device_mdio(unsigned int id, u32 phy_mask) __init; void ar71xx_add_device_uart(void) __init; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-all0258n.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-all0258n.c index 8b50a542c..b94d8ee82 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-all0258n.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-all0258n.c @@ -134,7 +134,7 @@ static void __init all0258n_setup(void) ar71xx_eth1_data.phy_mask = ALL0258N_SEC_PHYMASK; ar71xx_eth1_data.has_ar7240_switch = 1; - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_add_device_eth(0); ar71xx_add_device_eth(1); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap121.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap121.c index 81b5eb768..8766f06ac 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap121.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap121.c @@ -200,7 +200,7 @@ static void __init ap121_common_setup(void) ar71xx_eth1_data.duplex = DUPLEX_FULL; ar71xx_eth1_data.has_ar7240_switch = 1; - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_add_device_eth(1); ar71xx_add_device_eth(0); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c index 66c57ed30..802dbec0c 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c @@ -110,7 +110,7 @@ static void __init ap81_setup(void) { u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, eeprom, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c index bcd2faeb5..2eab99455 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c @@ -197,7 +197,7 @@ static void __init ap83_generic_setup(void) { u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); - ar71xx_add_device_mdio(0xfffffffe); + ar71xx_add_device_mdio(0, 0xfffffffe); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, eeprom, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap96.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap96.c index a43631ff2..5882af29f 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap96.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap96.c @@ -142,7 +142,7 @@ static void __init ap96_setup(void) { u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); - ar71xx_add_device_mdio(~(AP96_WAN_PHYMASK | AP96_LAN_PHYMASK)); + ar71xx_add_device_mdio(0, ~(AP96_WAN_PHYMASK | AP96_LAN_PHYMASK)); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, art, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c index 96cae5534..e99536c91 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c @@ -78,7 +78,7 @@ static struct gpio_keys_button aw_nr580_gpio_keys[] __initdata = { static void __init aw_nr580_setup(void) { - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; ar71xx_eth0_data.speed = SPEED_100; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-600-a1.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-600-a1.c index 34f77dde3..e503c583e 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-600-a1.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-600-a1.c @@ -148,7 +148,7 @@ static void __init dir_600_a1_setup(void) ar71xx_eth1_data.speed = SPEED_1000; ar71xx_eth1_data.duplex = DUPLEX_FULL; - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_add_device_eth(1); ar71xx_add_device_eth(0); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c index fa1f8b9ef..fcadc6f06 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c @@ -148,7 +148,7 @@ static void __init dir_615c1_setup(void) wlan_mac = mac; } - ar71xx_add_device_mdio(DIR_615C1_MDIO_MASK); + ar71xx_add_device_mdio(0, DIR_615C1_MDIO_MASK); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; ar71xx_eth0_data.phy_mask = DIR_615C1_LAN_PHYMASK; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c index 2393e60b1..fe672ff46 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c @@ -169,7 +169,7 @@ static void __init dir825b1_setup(void) dir825b1_read_ascii_mac(mac1, DIR825B1_MAC_LOCATION_0); dir825b1_read_ascii_mac(mac2, DIR825B1_MAC_LOCATION_1); - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 2); ar71xx_eth0_data.mii_bus_dev = &dir825b1_rtl8366s_device.dev; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c index 69e22f39a..230bf78ed 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c @@ -157,7 +157,7 @@ static void __init eap7660d_setup(void) { u8 *boardconfig = (u8 *) KSEG1ADDR(EAP7660D_BOARDCONFIG); - ar71xx_add_device_mdio(~EAP7660D_PHYMASK); + ar71xx_add_device_mdio(0, ~EAP7660D_PHYMASK); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, boardconfig + EAP7660D_GBIC_MAC_OFFSET, 0); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c index c646a27a2..0e21fdb58 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c @@ -73,7 +73,7 @@ static void __init ja76pf_init(void) { ar71xx_add_device_m25p80(NULL); - ar71xx_add_device_mdio(~JA76PF_MDIO_PHYMASK); + ar71xx_add_device_mdio(0, ~JA76PF_MDIO_PHYMASK); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ar71xx_eth0_data.phy_mask = JA76PF_LAN_PHYMASK; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-jwap003.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-jwap003.c index f7215a133..d64203187 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-jwap003.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-jwap003.c @@ -53,7 +53,7 @@ static void __init jwap003_init(void) { ar71xx_add_device_m25p80(NULL); - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; ar71xx_eth0_data.phy_mask = JWAP003_WAN_PHYMASK; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c index 4954d396a..dbb408cbb 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c @@ -134,7 +134,7 @@ static void __init mzk_w04nu_setup(void) { u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); - ar71xx_add_device_mdio(MZK_W04NU_MDIO_MASK); + ar71xx_add_device_mdio(0, MZK_W04NU_MDIO_MASK); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, eeprom, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c index c3f2c5330..98b3f0092 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c @@ -129,7 +129,7 @@ static void __init mzk_w300nh_setup(void) { u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); - ar71xx_add_device_mdio(MZK_W300NH_MDIO_MASK); + ar71xx_add_device_mdio(0, MZK_W300NH_MDIO_MASK); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, eeprom, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-om2p.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-om2p.c index 926e01041..848fbe2b1 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-om2p.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-om2p.c @@ -93,7 +93,7 @@ static void __init om2p_setup(void) ar71xx_add_device_m25p80(&om2p_flash_data); - ar71xx_add_device_mdio(~OM2P_WAN_PHYMASK); + ar71xx_add_device_mdio(0, ~OM2P_WAN_PHYMASK); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 0); ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac2, 0); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c index 118a54e99..b3858545f 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c @@ -50,7 +50,7 @@ static void __init pb42_init(void) { ar71xx_add_device_m25p80(NULL); - ar71xx_add_device_mdio(~PB42_MDIO_PHYMASK); + ar71xx_add_device_mdio(0, ~PB42_MDIO_PHYMASK); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c index 59802d4b8..a66be1858 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c @@ -174,7 +174,7 @@ static struct platform_device pb44_spi_device = { static void __init pb44_init(void) { - ar71xx_add_device_mdio(~PB44_MDIO_PHYMASK); + ar71xx_add_device_mdio(0, ~PB44_MDIO_PHYMASK); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb92.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb92.c index e598ebc53..4c5d3ab4a 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb92.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb92.c @@ -86,7 +86,7 @@ static void __init pb92_init(void) ar71xx_add_device_m25p80(&pb92_flash_data); - ar71xx_add_device_mdio(~BIT(0)); + ar71xx_add_device_mdio(0, ~BIT(0)); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ar71xx_eth0_data.speed = SPEED_1000; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c index 88e29c080..1b9f96bce 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c @@ -218,7 +218,7 @@ static void __init rb411_setup(void) spi_register_board_info(rb4xx_microsd_info, ARRAY_SIZE(rb4xx_microsd_info)); - ar71xx_add_device_mdio(0xfffffffc); + ar71xx_add_device_mdio(0, 0xfffffffc); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; @@ -251,7 +251,7 @@ static void __init rb433_setup(void) spi_register_board_info(rb4xx_microsd_info, ARRAY_SIZE(rb4xx_microsd_info)); - ar71xx_add_device_mdio(~RB433_MDIO_PHYMASK); + ar71xx_add_device_mdio(0, ~RB433_MDIO_PHYMASK); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 1); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; @@ -286,7 +286,7 @@ MIPS_MACHINE(AR71XX_MACH_RB_433U, "433U", "MikroTik RouterBOARD 433UAH", static void __init rb450_generic_setup(int gige) { rb4xx_generic_setup(); - ar71xx_add_device_mdio(~RB450_MDIO_PHYMASK); + ar71xx_add_device_mdio(0, ~RB450_MDIO_PHYMASK); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 1); ar71xx_eth0_data.phy_if_mode = (gige) ? @@ -324,7 +324,7 @@ static void __init rb493_setup(void) { rb4xx_generic_setup(); - ar71xx_add_device_mdio(0x3fffff00); + ar71xx_add_device_mdio(0, 0x3fffff00); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; @@ -376,7 +376,7 @@ static void __init rb493g_setup(void) platform_device_register(&rb4xx_spi_device); platform_device_register(&rb4xx_nand_device); - ar71xx_add_device_mdio(~RB493G_MDIO_PHYMASK); + ar71xx_add_device_mdio(0, ~RB493G_MDIO_PHYMASK); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c index 547ad12d3..877567730 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c @@ -132,7 +132,7 @@ static void __init rb750_setup(void) ar71xx_eth1_data.duplex = DUPLEX_FULL; ar71xx_eth1_data.has_ar7240_switch = 1; - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_add_device_eth(1); ar71xx_add_device_eth(0); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c index 7ddb9c8e2..b7f9cb683 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c @@ -124,7 +124,7 @@ static void __init tew_632brp_setup(void) wlan_mac = mac; } - ar71xx_add_device_mdio(TEW_632BRP_MDIO_MASK); + ar71xx_add_device_mdio(0, TEW_632BRP_MDIO_MASK); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; ar71xx_eth0_data.phy_mask = TEW_632BRP_LAN_PHYMASK; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3x20.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3x20.c index e73fec9a0..b4dbbb653 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3x20.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3x20.c @@ -138,7 +138,7 @@ static void __init tl_mr3x20_setup(void) ar71xx_eth1_data.speed = SPEED_1000; ar71xx_eth1_data.duplex = DUPLEX_FULL; - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_add_device_eth(1); ar71xx_add_device_eth(0); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd-v2.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd-v2.c index 198e0bfd1..ab5d18716 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd-v2.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd-v2.c @@ -110,7 +110,7 @@ static void __init tl_wa901nd_v2_setup(void) ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; ar71xx_eth0_data.phy_mask = 0x00001000; - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_eth0_data.reset_bit = RESET_MODULE_GE0_MAC | RESET_MODULE_GE0_PHY; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c index ef30e6403..5d2d2fd9b 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c @@ -111,7 +111,7 @@ static void __init tl_wa901nd_setup(void) ar71xx_eth1_data.duplex = DUPLEX_FULL; ar71xx_eth1_data.has_ar7240_switch = 1; - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_add_device_eth(1); ar71xx_add_device_m25p80(&tl_wa901nd_flash_data); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr703n.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr703n.c index 656e7493a..54733dbd3 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr703n.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr703n.c @@ -111,7 +111,7 @@ static void __init tl_wr703n_setup(void) ar71xx_eth0_data.duplex = DUPLEX_FULL; ar71xx_eth0_data.phy_mask = BIT(4); - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_add_device_eth(0); ar9xxx_add_device_wmac(ee, mac); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c index 7e920ccd0..e987afd53 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c @@ -145,7 +145,7 @@ static void __init tl_wr741ndv4_setup(void) ar71xx_eth1_data.duplex = DUPLEX_FULL; ar71xx_eth1_data.has_ar7240_switch = 1; - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_add_device_eth(1); ar71xx_add_device_eth(0); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c index 76db88d64..28e1fe932 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c @@ -123,7 +123,7 @@ static void __init tl_wr741nd_setup(void) ar71xx_eth1_data.speed = SPEED_1000; ar71xx_eth1_data.duplex = DUPLEX_FULL; - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_add_device_eth(1); ar71xx_add_device_eth(0); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c index 4646ada1a..c5135ecdc 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c @@ -118,7 +118,7 @@ static void __init tl_wr841n_v1_setup(void) { u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c index 2a4b4539a..2815b7d66 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c @@ -123,7 +123,7 @@ static void __init tl_wr941nd_setup(void) u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c index 56af69dcc..37ce37630 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c @@ -152,7 +152,7 @@ static void __init ubnt_rs_setup(void) { ubnt_generic_setup(); - ar71xx_add_device_mdio(~(UBNT_RS_WAN_PHYMASK | UBNT_RS_LAN_PHYMASK)); + ar71xx_add_device_mdio(0, ~(UBNT_RS_WAN_PHYMASK | UBNT_RS_LAN_PHYMASK)); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; @@ -182,7 +182,7 @@ static void __init ubnt_rspro_setup(void) { ubnt_generic_setup(); - ar71xx_add_device_mdio(~(UBNT_RSPRO_WAN_PHYMASK | + ar71xx_add_device_mdio(0, ~(UBNT_RSPRO_WAN_PHYMASK | UBNT_RSPRO_LAN_PHYMASK)); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); @@ -220,7 +220,7 @@ static void __init ubnt_lssr71_setup(void) { ubnt_generic_setup(); - ar71xx_add_device_mdio(~UBNT_LSSR71_PHY_MASK); + ar71xx_add_device_mdio(0, ~UBNT_LSSR71_PHY_MASK); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; @@ -245,7 +245,7 @@ static void __init ubnt_m_setup(void) ar71xx_add_device_m25p80(NULL); - ar71xx_add_device_mdio(~UBNT_M_WAN_PHYMASK); + ar71xx_add_device_mdio(0, ~UBNT_M_WAN_PHYMASK); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 0); ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac2, 0); @@ -313,7 +313,7 @@ static void __init ubnt_unifi_setup(void) ar71xx_add_device_m25p80(NULL); - ar71xx_add_device_mdio(~UBNT_M_WAN_PHYMASK); + ar71xx_add_device_mdio(0, ~UBNT_M_WAN_PHYMASK); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-whr-hp-g300n.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-whr-hp-g300n.c index 54a01d819..6e2113d6f 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-whr-hp-g300n.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-whr-hp-g300n.c @@ -159,7 +159,7 @@ static void __init whrhpg300n_setup(void) ar71xx_eth1_data.speed = SPEED_1000; ar71xx_eth1_data.duplex = DUPLEX_FULL; - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_add_device_eth(1); ar71xx_add_device_eth(0); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c index 1da20fafc..37477eb22 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c @@ -119,7 +119,7 @@ static void __init wnr2000_setup(void) { u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000); - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, eeprom, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c index d85f13e55..6a6ec1ced 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c @@ -77,7 +77,7 @@ static void __init wp543_setup(void) { ar71xx_add_device_m25p80(NULL); - ar71xx_add_device_mdio(0xfffffff7); + ar71xx_add_device_mdio(0, 0xfffffff7); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c index 799f9f796..674550ed0 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c @@ -127,7 +127,7 @@ static void __init wrt160nl_setup(void) ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1); } - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; ar71xx_eth0_data.phy_mask = 0x01; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c index fd0e5de0e..8bd82b983 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c @@ -134,7 +134,7 @@ static void __init wrt400n_setup(void) u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); u8 *mac = art + WRT400N_MAC_ADDR_OFFSET; - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 1); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-ag300h.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-ag300h.c index ac0b9bfc0..c85657d7d 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-ag300h.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-ag300h.c @@ -194,7 +194,7 @@ static void __init wzrhpag300h_setup(void) ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 0); ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac2, 1); - ar71xx_add_device_mdio(~(BIT(0) | BIT(4))); + ar71xx_add_device_mdio(0, ~(BIT(0) | BIT(4))); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ar71xx_eth0_data.speed = SPEED_1000; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-zcn-1523h.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-zcn-1523h.c index 915340bf5..e2c247960 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-zcn-1523h.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-zcn-1523h.c @@ -184,7 +184,7 @@ static void __init zcn_1523h_generic_setup(void) ar71xx_eth1_data.speed = SPEED_1000; ar71xx_eth1_data.duplex = DUPLEX_FULL; - ar71xx_add_device_mdio(0x0); + ar71xx_add_device_mdio(0, 0x0); ar71xx_add_device_eth(0); } -- cgit v1.2.3