aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-07-09 19:46:41 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-07-09 19:46:41 +0000
commitc6c7d428397d9ca3f747dde6bacc8df805ab0767 (patch)
tree22cc1ddeb54e264d7ce1d3cef4851a9741e5ffa1 /target/linux/ar71xx
parentdd78050f8f16d416dd0c80dd4a9f165b9465af86 (diff)
downloadupstream-c6c7d428397d9ca3f747dde6bacc8df805ab0767.tar.gz
upstream-c6c7d428397d9ca3f747dde6bacc8df805ab0767.tar.bz2
upstream-c6c7d428397d9ca3f747dde6bacc8df805ab0767.zip
[ar71xx] add board setup code for the RB-450G/RB-433UAH boards
* based on a patch from http://forum.openwrt.org/viewtopic.php?pid=91127#p91127 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16754 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c24
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/prom.c6
-rw-r--r--target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h2
3 files changed, 30 insertions, 2 deletions
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 bed6799b7b..647a9320df 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
@@ -206,7 +206,15 @@ static void __init rb433_setup(void)
MIPS_MACHINE(AR71XX_MACH_RB_433, "MikroTik RouterBOARD 433/AH", rb433_setup);
-static void __init rb450_setup(void)
+static void __init rb433u_setup(void)
+{
+ rb433_setup();
+ ar71xx_add_device_usb();
+}
+
+MIPS_MACHINE(AR71XX_MACH_RB_433U, "MikroTik RouterBOARD 433UAH", rb433u_setup);
+
+static void __init rb450_generic_setup(int gige)
{
rb4xx_generic_setup();
rb4xx_add_device_spi();
@@ -215,7 +223,7 @@ static void __init rb450_setup(void)
ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
ar71xx_eth0_data.phy_mask = 0x0000000f;
- ar71xx_eth0_data.speed = SPEED_100;
+ ar71xx_eth0_data.speed = (gige) ? SPEED_1000 : SPEED_100;
ar71xx_eth0_data.duplex = DUPLEX_FULL;
ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
@@ -225,8 +233,20 @@ static void __init rb450_setup(void)
ar71xx_add_device_eth(0);
}
+static void __init rb450_setup(void)
+{
+ rb450_generic_setup(0);
+}
+
MIPS_MACHINE(AR71XX_MACH_RB_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);
+
static void __init rb493_setup(void)
{
rb4xx_generic_setup();
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
index 58db51a01c..eee55edffb 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
@@ -39,9 +39,15 @@ static struct board_rec boards[] __initdata = {
.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,
}, {
diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
index 2a16257d78..1ba20fa385 100644
--- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
+++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h
@@ -124,7 +124,9 @@ enum ar71xx_mach_type {
AR71XX_MACH_AW_NR580, /* AzureWave AW-NR580 */
AR71XX_MACH_RB_411, /* MikroTik RouterBOARD 411/411A/411AH */
AR71XX_MACH_RB_433, /* MikroTik RouterBOARD 433/433AH */
+ AR71XX_MACH_RB_433U, /* MikroTik RouterBOARD 433UAH */
AR71XX_MACH_RB_450, /* MikroTik RouterBOARD 450 */
+ AR71XX_MACH_RB_450G, /* MikroTik RouterBOARD 450G */
AR71XX_MACH_RB_493, /* Mikrotik RouterBOARD 493/493AH */
AR71XX_MACH_PB42, /* Atheros PB42 */
AR71XX_MACH_PB44, /* Atheros PB44 */