summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-01-01 11:28:19 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-01-01 11:28:19 +0000
commit22e56266bfd18e9caa5fe53705f9a17fc69aaf76 (patch)
treeb8a6aa988dd7a0a4e4fadff6660628cd7870f9c5
parentce7bba04aa263cb2c99482188115e7442b54fdad (diff)
ar71xx: update mips multi-machine stuff
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18985 3c298f89-4303-0410-b956-a3cf2f4a3e73
-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
-rw-r--r--target/linux/ar71xx/patches-2.6.30/400-mips-multi-machine-update.patch127
-rw-r--r--target/linux/ar71xx/patches-2.6.31/400-mips-multi-machine-update.patch127
-rw-r--r--target/linux/ar71xx/patches-2.6.32/400-mips-multi-machine-update.patch127
29 files changed, 460 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 a7b702681..6aee4dc5c 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 1b0b06c7a..daf7dcf9f 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 e72574ac0..cd4746ba7 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 6052e37e5..5cee4c6ea 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 e3b6aabeb..d6f1fa75d 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 93a01fd77..7762b5cdc 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 49882051e..8dfa6405e 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 bc755022f..6af5dd4cd 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 0e5588852..88a3bd17b 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 0f70d9525..44bf38991 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 aad5d0af9..7cace674b 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 8b6f34e96..ab3d65be9 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 bb4cee677..c92cb00eb 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 9c6f65e93..79bb22713 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 ecedbb5a8..b2d33c0d7 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 10d00c41e..3bc063ae5 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 7fe5a1cbc..af83116a7 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 1a63b99d6..37151ab02 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 4220e61cd..14cde55d2 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 c07619c16..778e99d71 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 d20800ea5..a2669f17a 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 2caddf880..9c85235ea 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 a56326885..005828f32 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 34d770240..91907f4db 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 f522d1ff3..5b47d6bfe 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 7ea29ed8b..f23592223 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;
}
diff --git a/target/linux/ar71xx/patches-2.6.30/400-mips-multi-machine-update.patch b/target/linux/ar71xx/patches-2.6.30/400-mips-multi-machine-update.patch
new file mode 100644
index 000000000..62903c866
--- /dev/null
+++ b/target/linux/ar71xx/patches-2.6.30/400-mips-multi-machine-update.patch
@@ -0,0 +1,127 @@
+--- a/arch/mips/kernel/mips_machine.c
++++ b/arch/mips/kernel/mips_machine.c
+@@ -7,12 +7,13 @@
+ *
+ */
+ #include <linux/mm.h>
++#include <linux/string.h>
+
+ #include <asm/mips_machine.h>
+-#include <asm/bootinfo.h>
+
+ static struct list_head mips_machines __initdata =
+ LIST_HEAD_INIT(mips_machines);
++static char *mips_machid __initdata;
+
+ char *mips_machine_name = "Unknown";
+
+@@ -55,20 +56,64 @@ void __init mips_machine_set_name(char *
+ }
+ }
+
+-void __init mips_machine_setup(unsigned long machtype)
++void __init mips_machine_setup(void)
+ {
+ struct mips_machine *mach;
+
+- mach = mips_machine_find(machtype);
++ mach = mips_machine_find(mips_machtype);
+ if (!mach) {
+- printk(KERN_ALERT "MIPS: no machine registered for "
+- "machtype %lu\n", machtype);
++ printk(KERN_WARNING "MIPS: no machine registered for "
++ "machtype %lu\n", mips_machtype);
+ return;
+ }
+
+ mips_machine_set_name(mach->mach_name);
+- printk(KERN_INFO "MIPS: machine is %s\n", mips_machine_name);
++ printk(KERN_NOTICE "MIPS: machine is %s\n", mips_machine_name);
+
+ if (mach->mach_setup)
+ mach->mach_setup();
+ }
++
++int __init mips_machtype_setup(char *id)
++{
++ if (mips_machid == NULL)
++ mips_machid = id;
++
++ return 1;
++}
++
++__setup("machtype=", mips_machtype_setup);
++
++static int __init mips_machtype_init(void)
++{
++ struct list_head *this;
++ struct mips_machine *mach;
++
++ if (mips_machid == NULL)
++ return 0;
++
++ list_for_each(this, &mips_machines) {
++ mach = list_entry(this, struct mips_machine, list);
++ if (strncmp(mach->mach_id, mips_machid,
++ strlen(mips_machid)) == 0
++ ) {
++ mips_machtype = mach->mach_type;
++ return 0;
++ }
++ }
++
++ printk(KERN_WARNING
++ "MIPS: no machine found for id: '%s', registered machines:\n",
++ mips_machid);
++ printk(KERN_WARNING "%32s %s\n", "id", "name");
++
++ list_for_each(this, &mips_machines) {
++ mach = list_entry(this, struct mips_machine, list);
++ printk(KERN_WARNING "%32s %s\n",
++ mach->mach_id, mach->mach_name);
++ }
++
++ return 0;
++}
++
++core_initcall(mips_machtype_init);
+--- a/include/asm-mips/mips_machine.h
++++ b/include/asm-mips/mips_machine.h
+@@ -13,24 +13,32 @@
+ #include <linux/init.h>
+ #include <linux/list.h>
+
++#include <asm/bootinfo.h>
++
+ struct mips_machine {
+ unsigned long mach_type;
+- void (*mach_setup)(void);
++ char *mach_id;
+ char *mach_name;
++ void (*mach_setup)(void);
+ struct list_head list;
+ };
+
+ void mips_machine_register(struct mips_machine *) __init;
+-void mips_machine_setup(unsigned long machtype) __init;
++void mips_machine_setup(void) __init;
++int mips_machtype_setup(char *id) __init;
+ void mips_machine_set_name(char *name) __init;
+
+ extern char *mips_machine_name;
+
+-#define MIPS_MACHINE(_type, _name, _setup) \
+-static char machine_name_##_type[] __initdata = _name; \
+-static struct mips_machine machine_##_type __initdata = \
++#define MIPS_MACHINE(_type, _id, _name, _setup) \
++static char machine_name_##_type[] __initconst \
++ __aligned(1) = _name; \
++static char machine_id_##_type[] __initconst \
++ __aligned(1) = _id; \
++static struct mips_machine machine_##_type __initconst = \
+ { \
+ .mach_type = _type, \
++ .mach_id = machine_id_##_type, \
+ .mach_name = machine_name_##_type, \
+ .mach_setup = _setup, \
+ }; \
diff --git a/target/linux/ar71xx/patches-2.6.31/400-mips-multi-machine-update.patch b/target/linux/ar71xx/patches-2.6.31/400-mips-multi-machine-update.patch
new file mode 100644
index 000000000..62903c866
--- /dev/null
+++ b/target/linux/ar71xx/patches-2.6.31/400-mips-multi-machine-update.patch
@@ -0,0 +1,127 @@
+--- a/arch/mips/kernel/mips_machine.c
++++ b/arch/mips/kernel/mips_machine.c
+@@ -7,12 +7,13 @@
+ *
+ */
+ #include <linux/mm.h>
++#include <linux/string.h>
+
+ #include <asm/mips_machine.h>
+-#include <asm/bootinfo.h>
+
+ static struct list_head mips_machines __initdata =
+ LIST_HEAD_INIT(mips_machines);
++static char *mips_machid __initdata;
+
+ char *mips_machine_name = "Unknown";
+
+@@ -55,20 +56,64 @@ void __init mips_machine_set_name(char *
+ }
+ }
+
+-void __init mips_machine_setup(unsigned long machtype)
++void __init mips_machine_setup(void)
+ {
+ struct mips_machine *mach;
+
+- mach = mips_machine_find(machtype);
++ mach = mips_machine_find(mips_machtype);
+ if (!mach) {
+- printk(KERN_ALERT "MIPS: no machine registered for "
+- "machtype %lu\n", machtype);
++ printk(KERN_WARNING "MIPS: no machine registered for "
++ "machtype %lu\n", mips_machtype);
+ return;
+ }
+
+ mips_machine_set_name(mach->mach_name);
+- printk(KERN_INFO "MIPS: machine is %s\n", mips_machine_name);
++ printk(KERN_NOTICE "MIPS: machine is %s\n", mips_machine_name);
+
+ if (mach->mach_setup)
+ mach->mach_setup();
+ }
++
++int __init mips_machtype_setup(char *id)
++{
++ if (mips_machid == NULL)
++ mips_machid = id;
++
++ return 1;
++}
++
++__setup("machtype=", mips_machtype_setup);
++
++static int __init mips_machtype_init(void)
++{
++ struct list_head *this;
++ struct mips_machine *mach;
++
++ if (mips_machid == NULL)
++ return 0;
++
++ list_for_each(this, &mips_machines) {
++ mach = list_entry(this, struct mips_machine, list);
++ if (strncmp(mach->mach_id, mips_machid,
++ strlen(mips_machid)) == 0
++ ) {
++ mips_machtype = mach->mach_type;
++ return 0;
++ }
++ }
++
++ printk(KERN_WARNING
++ "MIPS: no machine found for id: '%s', registered machines:\n",
++ mips_machid);
++ printk(KERN_WARNING "%32s %s\n", "id", "name");
++
++ list_for_each(this, &mips_machines) {
++ mach = list_entry(this, struct mips_machine, list);
++ printk(KERN_WARNING "%32s %s\n",
++ mach->mach_id, mach->mach_name);
++ }
++
++ return 0;
++}
++
++core_initcall(mips_machtype_init);
+--- a/include/asm-mips/mips_machine.h
++++ b/include/asm-mips/mips_machine.h
+@@ -13,24 +13,32 @@
+ #include <linux/init.h>
+ #include <linux/list.h>
+
++#include <asm/bootinfo.h>
++
+ struct mips_machine {
+ unsigned long mach_type;
+- void (*mach_setup)(void);
++ char *mach_id;
+ char *mach_name;
++ void (*mach_setup)(void);
+ struct list_head list;
+ };
+
+ void mips_machine_register(struct mips_machine *) __init;
+-void mips_machine_setup(unsigned long machtype) __init;
++void mips_machine_setup(void) __init;
++int mips_machtype_setup(char *id) __init;
+ void mips_machine_set_name(char *name) __init;
+
+ extern char *mips_machine_name;
+
+-#define MIPS_MACHINE(_type, _name, _setup) \
+-static char machine_name_##_type[] __initdata = _name; \
+-static struct mips_machine machine_##_type __initdata = \
++#define MIPS_MACHINE(_type, _id, _name, _setup) \
++static char machine_name_##_type[] __initconst \
++ __aligned(1) = _name; \
++static char machine_id_##_type[] __initconst \
++ __aligned(1) = _id; \
++static struct mips_machine machine_##_type __initconst = \
+ { \
+ .mach_type = _type, \
++ .mach_id = machine_id_##_type, \
+ .mach_name = machine_name_##_type, \
+ .mach_setup = _setup, \
+ }; \
diff --git a/target/linux/ar71xx/patches-2.6.32/400-mips-multi-machine-update.patch b/target/linux/ar71xx/patches-2.6.32/400-mips-multi-machine-update.patch
new file mode 100644
index 000000000..62903c866
--- /dev/null
+++ b/target/linux/ar71xx/patches-2.6.32/400-mips-multi-machine-update.patch
@@ -0,0 +1,127 @@
+--- a/arch/mips/kernel/mips_machine.c
++++ b/arch/mips/kernel/mips_machine.c
+@@ -7,12 +7,13 @@
+ *
+ */
+ #include <linux/mm.h>
++#include <linux/string.h>
+
+ #include <asm/mips_machine.h>
+-#include <asm/bootinfo.h>
+
+ static struct list_head mips_machines __initdata =
+ LIST_HEAD_INIT(mips_machines);
++static char *mips_machid __initdata;
+
+ char *mips_machine_name = "Unknown";
+
+@@ -55,20 +56,64 @@ void __init mips_machine_set_name(char *
+ }
+ }
+
+-void __init mips_machine_setup(unsigned long machtype)
++void __init mips_machine_setup(void)
+ {
+ struct mips_machine *mach;
+
+- mach = mips_machine_find(machtype);
++ mach = mips_machine_find(mips_machtype);
+ if (!mach) {
+- printk(KERN_ALERT "MIPS: no machine registered for "
+- "machtype %lu\n", machtype);
++ printk(KERN_WARNING "MIPS: no machine registered for "
++ "machtype %lu\n", mips_machtype);
+ return;
+ }
+
+ mips_machine_set_name(mach->mach_name);
+- printk(KERN_INFO "MIPS: machine is %s\n", mips_machine_name);
++ printk(KERN_NOTICE "MIPS: machine is %s\n", mips_machine_name);
+
+ if (mach->mach_setup)
+ mach->mach_setup();
+ }
++
++int __init mips_machtype_setup(char *id)
++{
++ if (mips_machid == NULL)
++ mips_machid = id;
++
++ return 1;
++}
++
++__setup("machtype=", mips_machtype_setup);
++
++static int __init mips_machtype_init(void)
++{
++ struct list_head *this;
++ struct mips_machine *mach;
++
++ if (mips_machid == NULL)
++ return 0;
++
++ list_for_each(this, &mips_machines) {
++ mach = list_entry(this, struct mips_machine, list);
++ if (strncmp(mach->mach_id, mips_machid,
++ strlen(mips_machid)) == 0
++ ) {
++ mips_machtype = mach->mach_type;
++ return 0;
++ }
++ }
++
++ printk(KERN_WARNING
++ "MIPS: no machine found for id: '%s', registered machines:\n",
++ mips_machid);
++ printk(KERN_WARNING "%32s %s\n", "id", "name");
++
++ list_for_each(this, &mips_machines) {
++ mach = list_entry(this, struct mips_machine, list);
++ printk(KERN_WARNING "%32s %s\n",
++ mach->mach_id, mach->mach_name);
++ }
++
++ return 0;
++}
++
++core_initcall(mips_machtype_init);
+--- a/include/asm-mips/mips_machine.h
++++ b/include/asm-mips/mips_machine.h
+@@ -13,24 +13,32 @@
+ #include <linux/init.h>
+ #include <linux/list.h>
+
++#include <asm/bootinfo.h>
++
+ struct mips_machine {
+ unsigned long mach_type;
+- void (*mach_setup)(void);
++ char *mach_id;
+ char *mach_name;
++ void (*mach_setup)(void);
+ struct list_head list;
+ };
+
+ void mips_machine_register(struct mips_machine *) __init;
+-void mips_machine_setup(unsigned long machtype) __init;
++void mips_machine_setup(void) __init;
++int mips_machtype_setup(char *id) __init;
+ void mips_machine_set_name(char *name) __init;
+
+ extern char *mips_machine_name;
+
+-#define MIPS_MACHINE(_type, _name, _setup) \
+-static char machine_name_##_type[] __initdata = _name; \
+-static struct mips_machine machine_##_type __initdata = \
++#define MIPS_MACHINE(_type, _id, _name, _setup) \
++static char machine_name_##_type[] __initconst \
++ __aligned(1) = _name; \
++static char machine_id_##_type[] __initconst \
++ __aligned(1) = _id; \
++static struct mips_machine machine_##_type __initconst = \
+ { \
+ .mach_type = _type, \
++ .mach_id = machine_id_##_type, \
+ .mach_name = machine_name_##_type, \
+ .mach_setup = _setup, \
+ }; \