summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-01-01 11:28:19 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-01-01 11:28:19 +0000
commitf8b7b8ee41a6f89a709796a29b2ba4713ebbfb87 (patch)
tree88a47492d64df2e8d0e6aa68b66be77e028e08a0 /target/linux/ar71xx/files
parent1a32a435f42d7579d57f266766819cb0cdfd1705 (diff)
downloadmtk-20170518-f8b7b8ee41a6f89a709796a29b2ba4713ebbfb87.zip
mtk-20170518-f8b7b8ee41a6f89a709796a29b2ba4713ebbfb87.tar.gz
mtk-20170518-f8b7b8ee41a6f89a709796a29b2ba4713ebbfb87.tar.bz2
ar71xx: update mips multi-machine stuff
SVN-Revision: 18985
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/devices.c14
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-generic.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c21
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c22
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h3
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/prom.c144
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/setup.c6
26 files changed, 79 insertions, 183 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c
index a7b7026..6aee4dc 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c
@@ -545,3 +545,17 @@ void __init ar71xx_parse_mac_addr(char *mac_str)
printk(KERN_DEBUG "ar71xx: failed to parse mac address "
"\"%s\"\n", mac_str);
}
+
+static int __init ar71xx_ethaddr_setup(char *str)
+{
+ ar71xx_parse_mac_addr(str);
+ return 1;
+}
+__setup("ethaddr=", ar71xx_ethaddr_setup);
+
+static int __init ar71xx_kmac_setup(char *str)
+{
+ ar71xx_parse_mac_addr(str);
+ return 1;
+}
+__setup("kmac=", ar71xx_kmac_setup);
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 1b0b06c..daf7dcf 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c
@@ -138,4 +138,4 @@ static void __init ap81_setup(void)
ar913x_add_device_wmac(eeprom, NULL);
}
-MIPS_MACHINE(AR71XX_MACH_AP81, "Atheros AP81", ap81_setup);
+MIPS_MACHINE(AR71XX_MACH_AP81, "AP81", "Atheros AP81", ap81_setup);
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 e72574a..cd4746b 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
@@ -264,4 +264,4 @@ static void __init ap83_setup(void)
}
}
-MIPS_MACHINE(AR71XX_MACH_AP83, "Atheros AP83", ap83_setup);
+MIPS_MACHINE(AR71XX_MACH_AP83, "AP83", "Atheros AP83", ap83_setup);
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 6052e37..5cee4c6 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
@@ -98,4 +98,5 @@ static void __init aw_nr580_setup(void)
aw_nr580_gpio_buttons);
}
-MIPS_MACHINE(AR71XX_MACH_AW_NR580, "AzureWave AW-NR580", aw_nr580_setup);
+MIPS_MACHINE(AR71XX_MACH_AW_NR580, "AW-NR580", "AzureWave AW-NR580",
+ aw_nr580_setup);
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 e3b6aab..d6f1fa7 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
@@ -166,4 +166,5 @@ static void __init dir_615c1_setup(void)
ar913x_add_device_wmac(eeprom, wlan_mac);
}
-MIPS_MACHINE(AR71XX_MACH_DIR_615_C1, "D-Link DIR-615 rev. C1", dir_615c1_setup);
+MIPS_MACHINE(AR71XX_MACH_DIR_615_C1, "DIR-615-C1", "D-Link DIR-615 rev. C1",
+ dir_615c1_setup);
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 93a01fd..7762b5c 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
@@ -183,4 +183,5 @@ static void __init dir825b1_setup(void)
(u8 *) KSEG1ADDR(DIR825B1_MAC_LOCATION_1));
}
-MIPS_MACHINE(AR71XX_MACH_DIR_825_B1, "D-Link DIR-825 rev. B1", dir825b1_setup);
+MIPS_MACHINE(AR71XX_MACH_DIR_825_B1, "DIR-825-B1", "D-Link DIR-825 rev. B1",
+ dir825b1_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-generic.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-generic.c
index 4988205..8dfa640 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-generic.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-generic.c
@@ -19,4 +19,5 @@ static void __init ar71xx_generic_init(void)
/* Nothing to do */
}
-MIPS_MACHINE(AR71XX_MACH_GENERIC, "Generic AR71xx board", ar71xx_generic_init);
+MIPS_MACHINE(AR71XX_MACH_GENERIC, "Generic", "Generic AR71xx board",
+ ar71xx_generic_init);
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 bc75502..6af5dd4 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
@@ -159,4 +159,5 @@ static void __init mzk_w04nu_setup(void)
ar913x_add_device_wmac(eeprom, NULL);
}
-MIPS_MACHINE(AR71XX_MACH_MZK_W04NU, "Planex MZK-W04NU", mzk_w04nu_setup);
+MIPS_MACHINE(AR71XX_MACH_MZK_W04NU, "MZK-W04NU", "Planex MZK-W04NU",
+ mzk_w04nu_setup);
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 0e55888..88a3bd1 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
@@ -156,4 +156,5 @@ static void __init mzk_w300nh_setup(void)
ar913x_add_device_wmac(eeprom, NULL);
}
-MIPS_MACHINE(AR71XX_MACH_MZK_W300NH, "Planex MZK-W300NH", mzk_w300nh_setup);
+MIPS_MACHINE(AR71XX_MACH_MZK_W300NH, "MZK-W300NH", "Planex MZK-W300NH",
+ mzk_w300nh_setup);
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 0f70d95..44bf389 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c
@@ -69,4 +69,4 @@ static void __init pb42_init(void)
pb42_pci_init();
}
-MIPS_MACHINE(AR71XX_MACH_PB42, "Atheros PB42", pb42_init);
+MIPS_MACHINE(AR71XX_MACH_PB42, "PB42", "Atheros PB42", pb42_init);
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 aad5d0a..7cace67 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c
@@ -205,4 +205,4 @@ static void __init pb44_init(void)
pb44_gpio_buttons);
}
-MIPS_MACHINE(AR71XX_MACH_PB44, "Atheros PB44", pb44_init);
+MIPS_MACHINE(AR71XX_MACH_PB44, "PB44", "Atheros PB44", pb44_init);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c
index 8b6f34e..ab3d65b 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c
@@ -183,7 +183,8 @@ static void __init rb411_setup(void)
ar71xx_pci_init(ARRAY_SIZE(rb4xx_pci_irqs), rb4xx_pci_irqs);
}
-MIPS_MACHINE(AR71XX_MACH_RB_411, "MikroTik RouterBOARD 411/A/AH", rb411_setup);
+MIPS_MACHINE(AR71XX_MACH_RB_411, "411", "MikroTik RouterBOARD 411/A/AH",
+ rb411_setup);
static void __init rb411u_setup(void)
{
@@ -200,7 +201,8 @@ static void __init rb411u_setup(void)
ar71xx_add_device_usb();
}
-MIPS_MACHINE(AR71XX_MACH_RB_411U, "MikroTik RouterBOARD 411U", rb411u_setup);
+MIPS_MACHINE(AR71XX_MACH_RB_411U, "411U", "MikroTik RouterBOARD 411U",
+ rb411u_setup);
static void __init rb433_setup(void)
{
@@ -223,7 +225,8 @@ static void __init rb433_setup(void)
ar71xx_pci_init(ARRAY_SIZE(rb4xx_pci_irqs), rb4xx_pci_irqs);
}
-MIPS_MACHINE(AR71XX_MACH_RB_433, "MikroTik RouterBOARD 433/AH", rb433_setup);
+MIPS_MACHINE(AR71XX_MACH_RB_433, "433", "MikroTik RouterBOARD 433/AH",
+ rb433_setup);
static void __init rb433u_setup(void)
{
@@ -231,7 +234,8 @@ static void __init rb433u_setup(void)
ar71xx_add_device_usb();
}
-MIPS_MACHINE(AR71XX_MACH_RB_433U, "MikroTik RouterBOARD 433UAH", rb433u_setup);
+MIPS_MACHINE(AR71XX_MACH_RB_433U, "433U", "MikroTik RouterBOARD 433UAH",
+ rb433u_setup);
static void __init rb450_generic_setup(int gige)
{
@@ -257,14 +261,16 @@ static void __init rb450_setup(void)
rb450_generic_setup(0);
}
-MIPS_MACHINE(AR71XX_MACH_RB_450, "MikroTik RouterBOARD 450", rb450_setup);
+MIPS_MACHINE(AR71XX_MACH_RB_450, "450", "MikroTik RouterBOARD 450",
+ rb450_setup);
static void __init rb450g_setup(void)
{
rb450_generic_setup(1);
}
-MIPS_MACHINE(AR71XX_MACH_RB_450G, "MikroTik RouterBOARD 450G", rb450g_setup);
+MIPS_MACHINE(AR71XX_MACH_RB_450G, "450G", "MikroTik RouterBOARD 450G",
+ rb450g_setup);
static void __init rb493_setup(void)
{
@@ -287,4 +293,5 @@ static void __init rb493_setup(void)
ar71xx_pci_init(ARRAY_SIZE(rb4xx_pci_irqs), rb4xx_pci_irqs);
}
-MIPS_MACHINE(AR71XX_MACH_RB_493, "MikroTik RouterBOARD 493/AH", rb493_setup);
+MIPS_MACHINE(AR71XX_MACH_RB_493, "493", "MikroTik RouterBOARD 493/AH",
+ rb493_setup);
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 bb4cee6..c92cb00 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
@@ -142,4 +142,5 @@ static void __init tew_632brp_setup(void)
ar913x_add_device_wmac(eeprom, wlan_mac);
}
-MIPS_MACHINE(AR71XX_MACH_TEW_632BRP, "TRENDnet TEW-632BRP", tew_632brp_setup);
+MIPS_MACHINE(AR71XX_MACH_TEW_632BRP, "TEW-632BRP", "TRENDnet TEW-632BRP",
+ tew_632brp_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c
index 9c6f65e..79bb227 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c
@@ -133,4 +133,5 @@ static void __init tl_wr1043nd_setup(void)
ar913x_add_device_wmac(eeprom, NULL);
}
-MIPS_MACHINE(AR71XX_MACH_TL_WR1043ND, "TP-LINK TL-WR1043ND", tl_wr1043nd_setup);
+MIPS_MACHINE(AR71XX_MACH_TL_WR1043ND, "TL-WR1043ND", "TP-LINK TL-WR1043ND",
+ tl_wr1043nd_setup);
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 ecedbb5..b2d33c0 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
@@ -133,4 +133,5 @@ static void __init tl_wr741nd_setup(void)
ap91_pci_init(ee, NULL);
}
-MIPS_MACHINE(AR71XX_MACH_TL_WR741ND, "TP-LINK TL-WR741ND", tl_wr741nd_setup);
+MIPS_MACHINE(AR71XX_MACH_TL_WR741ND, "TL-WR741ND", "TP-LINK TL-WR741ND",
+ tl_wr741nd_setup);
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 10d00c4..3bc063a 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
@@ -140,5 +140,5 @@ static void __init tl_wr841n_v1_setup(void)
pb42_pci_init();
}
-MIPS_MACHINE(AR71XX_MACH_TL_WR841N_V1, "TP-LINK TL-WR841N v1",
+MIPS_MACHINE(AR71XX_MACH_TL_WR841N_V1, "TL-WR841N-v1.5", "TP-LINK TL-WR841N v1",
tl_wr841n_v1_setup);
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 7fe5a1c..af83116 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
@@ -136,4 +136,5 @@ static void __init tl_wr941nd_setup(void)
ar913x_add_device_wmac(eeprom, mac);
}
-MIPS_MACHINE(AR71XX_MACH_TL_WR941ND, "TP-LINK TL-WR941ND", tl_wr941nd_setup);
+MIPS_MACHINE(AR71XX_MACH_TL_WR941ND, "TL-WR941ND", "TP-LINK TL-WR941ND",
+ tl_wr941nd_setup);
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 1a63b99..37151ab 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
@@ -163,7 +163,11 @@ static void __init ubnt_rs_setup(void)
ubnt_rs_leds_gpio);
}
-MIPS_MACHINE(AR71XX_MACH_UBNT_RS, "Ubiquiti RouterStation", ubnt_rs_setup);
+MIPS_MACHINE(AR71XX_MACH_UBNT_RS, "UBNT-RS", "Ubiquiti RouterStation",
+ ubnt_rs_setup);
+
+MIPS_MACHINE(AR71XX_MACH_UBNT_AR71XX, "Ubiquiti AR71xx-based board",
+ "Ubiquiti RouterStation", ubnt_rs_setup);
static void __init ubnt_rspro_setup(void)
{
@@ -189,7 +193,7 @@ static void __init ubnt_rspro_setup(void)
ubnt_rs_leds_gpio);
}
-MIPS_MACHINE(AR71XX_MACH_UBNT_RSPRO, "Ubiquiti RouterStation Pro",
+MIPS_MACHINE(AR71XX_MACH_UBNT_RSPRO, "UBNT-RSPRO", "Ubiquiti RouterStation Pro",
ubnt_rspro_setup);
static void __init ubnt_lsx_setup(void)
@@ -197,7 +201,7 @@ static void __init ubnt_lsx_setup(void)
ubnt_generic_setup();
}
-MIPS_MACHINE(AR71XX_MACH_UBNT_LSX, "Ubiquiti LSX", ubnt_lsx_setup);
+MIPS_MACHINE(AR71XX_MACH_UBNT_LSX, "UBNT-LSX", "Ubiquiti LSX", ubnt_lsx_setup);
#define UBNT_LSSR71_PHY_MASK (1 << 1)
@@ -216,7 +220,8 @@ static void __init ubnt_lssr71_setup(void)
ubnt_ls_sr71_leds_gpio);
}
-MIPS_MACHINE(AR71XX_MACH_UBNT_LSSR71, "Ubiquiti LS-SR71", ubnt_lssr71_setup);
+MIPS_MACHINE(AR71XX_MACH_UBNT_LSSR71, "UBNT-LS-SR71", "Ubiquiti LS-SR71",
+ ubnt_lssr71_setup);
static void __init ubnt_m_setup(void)
{
@@ -255,8 +260,10 @@ static void __init ubnt_rocket_m_setup(void)
ar71xx_add_device_usb();
}
-MIPS_MACHINE(AR71XX_MACH_UBNT_BULLET_M, "Ubiquiti Bullet M", ubnt_m_setup);
-MIPS_MACHINE(AR71XX_MACH_UBNT_ROCKET_M, "Ubiquiti Rocket M", ubnt_rocket_m_setup);
+MIPS_MACHINE(AR71XX_MACH_UBNT_BULLET_M, "UBNT-BM", "Ubiquiti Bullet M",
+ ubnt_m_setup);
+MIPS_MACHINE(AR71XX_MACH_UBNT_ROCKET_M, "UBNT-RM", "Ubiquiti Rocket M",
+ ubnt_rocket_m_setup);
/* TODO detect the second ethernet port and use one
init function for all Ubiquiti MIMO series products */
@@ -275,4 +282,5 @@ static void __init ubnt_nano_m_setup(void)
ar71xx_add_device_eth(1);
}
-MIPS_MACHINE(AR71XX_MACH_UBNT_NANO_M, "Ubiquiti Nanostation M", ubnt_nano_m_setup);
+MIPS_MACHINE(AR71XX_MACH_UBNT_NANO_M, "UBNT-NM", "Ubiquiti Nanostation M",
+ ubnt_nano_m_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
index 4220e61..14cde55d 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
@@ -197,4 +197,5 @@ static void __init wndr3700_setup(void)
art + WNDR3700_WMAC1_MAC_OFFSET);
}
-MIPS_MACHINE(AR71XX_MACH_WNDR3700, "NETGEAR WNDR3700", wndr3700_setup);
+MIPS_MACHINE(AR71XX_MACH_WNDR3700, "WNDR3700", "NETGEAR WNDR3700",
+ wndr3700_setup);
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 c07619c..778e99d 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c
@@ -146,4 +146,4 @@ static void __init wnr2000_setup(void)
ar913x_add_device_wmac(eeprom, NULL);
}
-MIPS_MACHINE(AR71XX_MACH_WNR2000, "NETGEAR WNR2000", wnr2000_setup);
+MIPS_MACHINE(AR71XX_MACH_WNR2000, "WNR2000", "NETGEAR WNR2000", wnr2000_setup);
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 d20800e..a2669f1 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
@@ -96,4 +96,4 @@ static void __init wp543_setup(void)
wp543_gpio_buttons);
}
-MIPS_MACHINE(AR71XX_MACH_WP543, "Compex WP543", wp543_setup);
+MIPS_MACHINE(AR71XX_MACH_WP543, "WP543", "Compex WP543", wp543_setup);
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 2caddf8..9c85235 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c
@@ -154,4 +154,5 @@ static void __init wrt160nl_setup(void)
}
-MIPS_MACHINE(AR71XX_MACH_WRT160NL, "Linksys WRT160NL", wrt160nl_setup);
+MIPS_MACHINE(AR71XX_MACH_WRT160NL, "WRT160NL", "Linksys WRT160NL",
+ wrt160nl_setup);
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 a563268..005828f 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c
@@ -151,4 +151,4 @@ static void __init wrt400n_setup(void)
/* TODO: PCI support */
}
-MIPS_MACHINE(AR71XX_MACH_WRT400N, "Linksys WRT400N", wrt400n_setup);
+MIPS_MACHINE(AR71XX_MACH_WRT400N, "WRT400N", "Linksys WRT400N", wrt400n_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h b/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h
index 34d7702..91907f4 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h
@@ -40,6 +40,7 @@ enum ar71xx_mach_type {
AR71XX_MACH_UBNT_LSSR71, /* Ubiquiti LS-SR71 */
AR71XX_MACH_UBNT_LSX, /* Ubiquiti LSX */
AR71XX_MACH_UBNT_RS, /* Ubiquiti RouterStation */
+ AR71XX_MACH_UBNT_AR71XX, /* Ubiquiti AR71xx-based board */
AR71XX_MACH_UBNT_RSPRO, /* Ubiquiti RouterStation Pro */
AR71XX_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
AR71XX_MACH_UBNT_ROCKET_M, /* Ubiquiti Rocket M */
@@ -51,6 +52,4 @@ enum ar71xx_mach_type {
AR71XX_MACH_WRT400N, /* Linksys WRT400N */
};
-extern enum ar71xx_mach_type ar71xx_mach;
-
#endif /* _AR71XX_MACHTYPE_H */
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
index f522d1f..5b47d6b 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
@@ -20,148 +20,6 @@
#include <asm/mach-ar71xx/ar71xx.h>
-#include "machtype.h"
-#include "devices.h"
-
-struct board_rec {
- char *name;
- enum ar71xx_mach_type mach_type;
-};
-
-static struct board_rec boards[] __initdata = {
- {
- .name = "411",
- .mach_type = AR71XX_MACH_RB_411,
- }, {
- .name = "411U",
- .mach_type = AR71XX_MACH_RB_411U,
- }, {
- .name = "433",
- .mach_type = AR71XX_MACH_RB_433,
- }, {
- .name = "433U",
- .mach_type = AR71XX_MACH_RB_433U,
- }, {
- .name = "450",
- .mach_type = AR71XX_MACH_RB_450,
- }, {
- .name = "450G",
- .mach_type = AR71XX_MACH_RB_450G,
- }, {
- .name = "493",
- .mach_type = AR71XX_MACH_RB_493,
- }, {
- .name = "AP81",
- .mach_type = AR71XX_MACH_AP81,
- }, {
- .name = "AP83",
- .mach_type = AR71XX_MACH_AP83,
- }, {
- .name = "AW-NR580",
- .mach_type = AR71XX_MACH_AW_NR580,
- }, {
- .name = "DIR-825-B1",
- .mach_type = AR71XX_MACH_DIR_825_B1,
- }, {
- .name = "TEW-632BRP",
- .mach_type = AR71XX_MACH_TEW_632BRP,
- }, {
- .name = "DIR-615-C1",
- .mach_type = AR71XX_MACH_DIR_615_C1,
- }, {
- .name = "TL-WR741ND",
- .mach_type = AR71XX_MACH_TL_WR741ND,
- }, {
- .name = "TL-WR841N-v1.5",
- .mach_type = AR71XX_MACH_TL_WR841N_V1,
- }, {
- .name = "TL-WR941ND",
- .mach_type = AR71XX_MACH_TL_WR941ND,
- }, {
- .name = "TL-WR1043ND",
- .mach_type = AR71XX_MACH_TL_WR1043ND,
- }, {
- .name = "UBNT-RS",
- .mach_type = AR71XX_MACH_UBNT_RS,
- }, {
- .name = "UBNT-RSPRO",
- .mach_type = AR71XX_MACH_UBNT_RSPRO,
- }, {
- .name = "Ubiquiti AR71xx-based board",
- .mach_type = AR71XX_MACH_UBNT_RS,
- }, {
- .name = "UBNT-LS-SR71",
- .mach_type = AR71XX_MACH_UBNT_LSSR71,
- }, {
- .name = "UBNT-LSX",
- .mach_type = AR71XX_MACH_UBNT_LSX,
- }, {
- .name = "UBNT-BM",
- .mach_type = AR71XX_MACH_UBNT_BULLET_M,
- }, {
- .name = "UBNT-RM",
- .mach_type = AR71XX_MACH_UBNT_ROCKET_M,
- }, {
- .name = "UBNT-NM",
- .mach_type = AR71XX_MACH_UBNT_NANO_M,
- }, {
- .name = "WNDR3700",
- .mach_type = AR71XX_MACH_WNDR3700,
- }, {
- .name = "WNR2000",
- .mach_type = AR71XX_MACH_WNR2000,
- }, {
- .name = "WRT160NL",
- .mach_type = AR71XX_MACH_WRT160NL,
- }, {
- .name = "WP543",
- .mach_type = AR71XX_MACH_WP543,
- }, {
- .name = "WRT400N",
- .mach_type = AR71XX_MACH_WRT400N,
- }, {
- .name = "PB42",
- .mach_type = AR71XX_MACH_PB42,
- }, {
- .name = "PB44",
- .mach_type = AR71XX_MACH_PB44,
- }, {
- .name = "MZK-W300NH",
- .mach_type = AR71XX_MACH_MZK_W300NH,
- }, {
- .name = "MZK-W04NU",
- .mach_type = AR71XX_MACH_MZK_W04NU,
- }
-};
-
-static int __init ar71xx_board_setup(char *name)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(boards); i++)
- if (strcmp(name, boards[i].name) == 0) {
- ar71xx_mach = boards[i].mach_type;
- break;
- }
-
- return 1;
-}
-__setup("board=", ar71xx_board_setup);
-
-static int __init ar71xx_ethaddr_setup(char *str)
-{
- ar71xx_parse_mac_addr(str);
- return 1;
-}
-__setup("ethaddr=", ar71xx_ethaddr_setup);
-
-static int __init ar71xx_kmac_setup(char *str)
-{
- ar71xx_parse_mac_addr(str);
- return 1;
-}
-__setup("kmac=", ar71xx_kmac_setup);
-
static inline int is_valid_ram_addr(void *addr)
{
if (((u32) addr > KSEG0) &&
@@ -292,8 +150,6 @@ void __init prom_init(void)
(unsigned int)fw_arg2, (unsigned int)fw_arg3);
- ar71xx_mach = AR71XX_MACH_GENERIC;
-
if (ar71xx_prom_init_myloader())
return;
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/setup.c b/target/linux/ar71xx/files/arch/mips/ar71xx/setup.c
index 7ea29ed..f235922 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/setup.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/setup.c
@@ -32,8 +32,6 @@
#define AR91XX_BASE_FREQ 5000000
#define AR724X_BASE_FREQ 5000000
-enum ar71xx_mach_type ar71xx_mach;
-
u32 ar71xx_cpu_freq;
EXPORT_SYMBOL_GPL(ar71xx_cpu_freq);
@@ -276,6 +274,8 @@ void __init plat_time_init(void)
mips_hpt_frequency = ar71xx_cpu_freq / 2;
}
+__setup("board=", mips_machtype_setup);
+
static int __init ar71xx_machine_setup(void)
{
ar71xx_gpio_init();
@@ -283,7 +283,7 @@ static int __init ar71xx_machine_setup(void)
ar71xx_add_device_uart();
ar71xx_add_device_wdt();
- mips_machine_setup(ar71xx_mach);
+ mips_machine_setup();
return 0;
}