summaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-11-14 07:38:09 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-11-14 07:38:09 +0000
commit1937a07a4eb49882849e922624caaa8af3dc7c47 (patch)
treecf48da5eef10dd834fbb9e6ca3dee346655d9478 /target/linux/ar71xx/files
parent2b0cd69920820acb059961d1dc8e0f7ba1977b49 (diff)
ar71xx: remove hardwired interface parameters from mach-* files
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29103 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-all0258n.c6
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap121.c14
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-600-a1.c14
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-om2p.c10
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c14
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3x20.c13
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c5
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr703n.c5
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c10
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c14
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c16
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-whr-hp-g300n.c13
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-zcn-1523h.c14
13 files changed, 20 insertions, 128 deletions
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 b94d8ee82..18d0a93a9 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-all0258n.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-all0258n.c
@@ -31,7 +31,6 @@
#define ALL0258N_KEYS_DEBOUNCE_INTERVAL (3 * ALL0258N_KEYS_POLL_INTERVAL)
/* showed up in the original firmware's bootlog */
-#define ALL0258N_LAN_PHYMASK BIT(4)
#define ALL0258N_SEC_PHYMASK BIT(3)
/*
@@ -127,12 +126,7 @@ static void __init all0258n_setup(void)
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 0);
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.phy_mask = ALL0258N_LAN_PHYMASK;
-
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
ar71xx_eth1_data.phy_mask = ALL0258N_SEC_PHYMASK;
- ar71xx_eth1_data.has_ar7240_switch = 1;
ar71xx_add_device_mdio(0, 0x0);
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 8766f06ac..d14996f59 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap121.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap121.c
@@ -188,20 +188,12 @@ static void __init ap121_common_setup(void)
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, art + AP121_MAC0_OFFSET, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, art + AP121_MAC1_OFFSET, 0);
- /* WAN port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
+ ar71xx_add_device_mdio(0, 0x0);
/* LAN ports */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
- ar71xx_eth1_data.has_ar7240_switch = 1;
-
- ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
+
+ /* WAN port */
ar71xx_add_device_eth(0);
ar9xxx_add_device_wmac(art + AP121_CALDATA_OFFSET,
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 e503c583e..ba833e8f7 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
@@ -133,23 +133,15 @@ static void __init dir_600_a1_setup(void)
ARRAY_SIZE(dir_600_a1_gpio_keys),
dir_600_a1_gpio_keys);
- ar71xx_eth1_data.has_ar7240_switch = 1;
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
- /* WAN port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
+ ar71xx_add_device_mdio(0, 0x0);
/* LAN ports */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
-
- ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
+
+ /* WAN port */
ar71xx_add_device_eth(0);
ap91_pci_init(ee, mac);
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 848fbe2b1..e43ad745c 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-om2p.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-om2p.c
@@ -98,16 +98,6 @@ static void __init om2p_setup(void)
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac2, 0);
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = OM2P_WAN_PHYMASK;
-
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
- ar71xx_eth1_data.has_ar7240_switch = 1;
-
ar71xx_add_device_eth(0);
ar71xx_add_device_eth(1);
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 877567730..ea1f089c2 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb750.c
@@ -120,20 +120,12 @@ static void __init rb750_setup(void)
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, ar71xx_mac_base, 1);
- /* WAN port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
+ ar71xx_add_device_mdio(0, 0x0);
/* LAN ports */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
- ar71xx_eth1_data.has_ar7240_switch = 1;
-
- ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
+
+ /* WAN port */
ar71xx_add_device_eth(0);
platform_device_register(&rb750_leds_device);
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 b4dbbb653..ee1a4b6a1 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
@@ -123,23 +123,14 @@ static void __init tl_mr3x20_setup(void)
ARRAY_SIZE(tl_mr3x20_gpio_keys),
tl_mr3x20_gpio_keys);
- ar71xx_eth1_data.has_ar7240_switch = 1;
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
- /* WAN port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
+ ar71xx_add_device_mdio(0, 0x0);
/* LAN ports */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
-
- ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
+ /* WAN port */
ar71xx_add_device_eth(0);
ar71xx_add_device_usb();
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 5d2d2fd9b..ebe7ab5c7 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
@@ -106,11 +106,6 @@ static void __init tl_wa901nd_setup(void)
* however we have a single LAN port only.
*/
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 0);
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
- ar71xx_eth1_data.has_ar7240_switch = 1;
-
ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
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 54733dbd3..6ddd33b41 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
@@ -106,11 +106,6 @@ static void __init tl_wr703n_setup(void)
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
-
ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(0);
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 e987afd53..076000860 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
@@ -135,16 +135,6 @@ static void __init tl_wr741ndv4_setup(void)
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
-
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
- ar71xx_eth1_data.has_ar7240_switch = 1;
-
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 28e1fe932..60e6d24c8 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
@@ -108,23 +108,15 @@ static void __init tl_wr741nd_setup(void)
ARRAY_SIZE(tl_wr741nd_gpio_keys),
tl_wr741nd_gpio_keys);
- ar71xx_eth1_data.has_ar7240_switch = 1;
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
- /* WAN port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
+ ar71xx_add_device_mdio(0, 0x0);
/* LAN ports */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
-
- ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
+
+ /* WAN port */
ar71xx_add_device_eth(0);
ap91_pci_setup_wmac_led_pin(1);
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 37ce37630..06ce2126e 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
@@ -249,11 +249,6 @@ static void __init ubnt_m_setup(void)
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac2, 0);
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = UBNT_M_WAN_PHYMASK;
-
ar71xx_add_device_eth(0);
ap91_pci_init(ee, NULL);
@@ -282,12 +277,6 @@ MIPS_MACHINE(AR71XX_MACH_UBNT_ROCKET_M, "UBNT-RM", "Ubiquiti Rocket M",
static void __init ubnt_nano_m_setup(void)
{
ubnt_m_setup();
-
- ar71xx_eth1_data.has_ar7240_switch = 1;
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
-
ar71xx_add_device_eth(1);
}
@@ -316,11 +305,6 @@ static void __init ubnt_unifi_setup(void)
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;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = UBNT_M_WAN_PHYMASK;
-
ar71xx_add_device_eth(0);
ap91_pci_init(ee, NULL);
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 6e2113d6f..ccc36507d 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
@@ -144,23 +144,14 @@ static void __init whrhpg300n_setup(void)
ARRAY_SIZE(whrhpg300n_gpio_keys),
whrhpg300n_gpio_keys);
- ar71xx_eth1_data.has_ar7240_switch = 1;
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
- /* WAN port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
+ ar71xx_add_device_mdio(0, 0x0);
/* LAN ports */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
-
- ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
+ /* WAN port */
ar71xx_add_device_eth(0);
ap91_pci_setup_wmac_led_pin(1);
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 e2c247960..7828b37f5 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
@@ -174,17 +174,9 @@ static void __init zcn_1523h_generic_setup(void)
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
- /* LAN1 port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
-
- /* LAN2 port */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
-
ar71xx_add_device_mdio(0, 0x0);
+
+ /* LAN1 port */
ar71xx_add_device_eth(0);
}
@@ -207,6 +199,8 @@ static void __init zcn_1523h_5_setup(void)
ar71xx_add_device_leds_gpio(1, ARRAY_SIZE(zcn_1523h_5_leds_gpio),
zcn_1523h_5_leds_gpio);
+
+ /* LAN2 port */
ar71xx_add_device_eth(1);
}