summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-12-02 21:17:31 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-12-02 21:17:31 +0000
commit19fdaabfac4b4601969300e9dd93898b36840a41 (patch)
tree6228071fb6d646448fafef09fda50b965c79f527 /target/linux/ar71xx/files
parent7cdec24a3320b3e3b11a9aa8dabc3b849bc1e8e5 (diff)
[ar71xx] update mips_machine stuff
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13488 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files')
-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.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-generic.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c8
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/platform.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/prom.c20
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/setup.c2
-rw-r--r--target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/ar71xx.h11
9 files changed, 32 insertions, 19 deletions
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 1ca847b4b7..23d245f9ff 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
@@ -58,4 +58,4 @@ static void __init ap83_setup(void)
}
-MIPS_MACHINE(MACH_AR71XX_AP83, "Atheros AP83", ap83_setup);
+MIPS_MACHINE(AR71XX_MACH_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 0e22bf5fec..d1e224429f 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
@@ -36,4 +36,4 @@ static void __init aw_nr580_setup(void)
ARRAY_SIZE(aw_nr580_spi_info));
}
-MIPS_MACHINE(MACH_AR71XX_AW_NR580, "AzureWave AW-NR580", aw_nr580_setup);
+MIPS_MACHINE(AR71XX_MACH_AW_NR580, "AzureWave AW-NR580", aw_nr580_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 55fc61c92e..e0664fdec5 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-generic.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-generic.c
@@ -66,4 +66,4 @@ static void __init ar71xx_generic_init(void)
ar71xx_generic_pci_irqs);
}
-MIPS_MACHINE(MACH_AR71XX_GENERIC, "Generic AR71xx board", ar71xx_generic_init);
+MIPS_MACHINE(AR71XX_MACH_GENERIC, "Generic AR71xx board", ar71xx_generic_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 956f95904e..864de882d8 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
@@ -173,7 +173,7 @@ static void __init rb411_setup(void)
ar71xx_pci_init(ARRAY_SIZE(rb4xx_pci_irqs), rb4xx_pci_irqs);
}
-MIPS_MACHINE(MACH_AR71XX_RB_411, "MikroTik RouterBOARD 411/A/AH", rb411_setup);
+MIPS_MACHINE(AR71XX_MACH_RB_411, "MikroTik RouterBOARD 411/A/AH", rb411_setup);
static void __init rb433_setup(void)
{
@@ -204,7 +204,7 @@ static void __init rb433_setup(void)
ar71xx_pci_init(ARRAY_SIZE(rb4xx_pci_irqs), rb4xx_pci_irqs);
}
-MIPS_MACHINE(MACH_AR71XX_RB_433, "MikroTik RouterBOARD 433/AH", rb433_setup);
+MIPS_MACHINE(AR71XX_MACH_RB_433, "MikroTik RouterBOARD 433/AH", rb433_setup);
static void __init rb450_setup(void)
{
@@ -233,7 +233,7 @@ static void __init rb450_setup(void)
platform_device_register(&rb4xx_nand_device);
}
-MIPS_MACHINE(MACH_AR71XX_RB_450, "MikroTik RouterBOARD 450", rb450_setup);
+MIPS_MACHINE(AR71XX_MACH_RB_450, "MikroTik RouterBOARD 450", rb450_setup);
static void __init rb493_setup(void)
{
@@ -264,5 +264,5 @@ static void __init rb493_setup(void)
ar71xx_pci_init(ARRAY_SIZE(rb4xx_pci_irqs), rb4xx_pci_irqs);
}
-MIPS_MACHINE(MACH_AR71XX_RB_493, "MikroTik RouterBOARD 493/AH", rb493_setup);
+MIPS_MACHINE(AR71XX_MACH_RB_493, "MikroTik RouterBOARD 493/AH", rb493_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 c1fe33e16a..52959017cb 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
@@ -114,4 +114,4 @@ static void __init wp543_setup(void)
wp543_gpio_buttons);
}
-MIPS_MACHINE(MACH_AR71XX_WP543, "Compex WP543", wp543_setup);
+MIPS_MACHINE(AR71XX_MACH_WP543, "Compex WP543", wp543_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c b/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c
index 09e6b2b78f..e41fcd646b 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c
@@ -569,7 +569,7 @@ static int __init ar71xx_machine_setup(void)
ar71xx_add_device_uart();
ar71xx_add_device_wdt();
- mips_machine_setup();
+ mips_machine_setup(ar71xx_mach_type);
return 0;
}
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
index ad6a3a49dd..c77d4186fc 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
@@ -33,22 +33,22 @@ static char **ar71xx_prom_envp __initdata;
static struct board_rec boards[] __initdata = {
{
.name = "411",
- .mach_type = MACH_AR71XX_RB_411,
+ .mach_type = AR71XX_MACH_RB_411,
}, {
.name = "433",
- .mach_type = MACH_AR71XX_RB_433,
+ .mach_type = AR71XX_MACH_RB_433,
}, {
.name = "450",
- .mach_type = MACH_AR71XX_RB_450,
+ .mach_type = AR71XX_MACH_RB_450,
}, {
.name = "493",
- .mach_type = MACH_AR71XX_RB_493,
+ .mach_type = AR71XX_MACH_RB_493,
}, {
.name = "AW-NR580",
- .mach_type = MACH_AR71XX_AW_NR580,
+ .mach_type = AR71XX_MACH_AW_NR580,
}, {
.name = "AP83",
- .mach_type = MACH_AR71XX_AP83,
+ .mach_type = AR71XX_MACH_AP83,
}
};
@@ -96,7 +96,7 @@ static __init unsigned long find_board_byname(char *name)
if (strcmp(name, boards[i].name) == 0)
return boards[i].mach_type;
- return MACH_AR71XX_GENERIC;
+ return AR71XX_MACH_GENERIC;
}
static int ar71xx_prom_init_myloader(void)
@@ -109,7 +109,7 @@ static int ar71xx_prom_init_myloader(void)
switch (mylo->did) {
case DEVID_COMPEX_WP543:
- mips_machtype = MACH_AR71XX_WP543;
+ ar71xx_mach_type = AR71XX_MACH_WP543;
break;
default:
printk(KERN_WARNING "prom: unknown device id: %x\n",
@@ -132,7 +132,7 @@ static void ar71xx_prom_init_generic(void)
if (!p)
p = ar71xx_prom_getargv("board");
if (p)
- mips_machtype = find_board_byname(p);
+ ar71xx_mach_type = find_board_byname(p);
p = ar71xx_prom_getenv("ethaddr");
if (!p)
@@ -148,7 +148,7 @@ void __init prom_init(void)
(unsigned int)fw_arg0, (unsigned int)fw_arg1,
(unsigned int)fw_arg2, (unsigned int)fw_arg3);
- mips_machtype = MACH_AR71XX_GENERIC;
+ ar71xx_mach_type = 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 a5d26e72c6..3fc67c33df 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/setup.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/setup.c
@@ -35,6 +35,8 @@
#define AR71XX_MEM_SIZE_MIN 0x0200000
#define AR71XX_MEM_SIZE_MAX 0x8000000
+unsigned long ar71xx_mach_type;
+
u32 ar71xx_cpu_freq;
EXPORT_SYMBOL_GPL(ar71xx_cpu_freq);
diff --git a/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/ar71xx.h b/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/ar71xx.h
index e9a69cd56b..78cf1ca244 100644
--- a/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/ar71xx.h
+++ b/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/ar71xx.h
@@ -103,6 +103,17 @@ enum ar71xx_soc_type {
extern enum ar71xx_soc_type ar71xx_soc;
+extern unsigned long ar71xx_mach_type;
+
+#define AR71XX_MACH_GENERIC 0
+#define AR71XX_MACH_WP543 1 /* Compex WP543 */
+#define AR71XX_MACH_RB_411 2 /* MikroTik RouterBOARD 411/411A/411AH */
+#define AR71XX_MACH_RB_433 3 /* MikroTik RouterBOARD 433/433AH */
+#define AR71XX_MACH_RB_450 4 /* MikroTik RouterBOARD 450 */
+#define AR71XX_MACH_RB_493 5 /* Mikrotik RouterBOARD 493/493AH */
+#define AR71XX_MACH_AW_NR580 6 /* AzureWave AW-NR580 */
+#define AR71XX_MACH_AP83 7 /* Atheros AP83 */
+
/*
* PLL block
*/