aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-02-12 19:48:27 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-02-12 19:48:27 +0000
commit6ac0029648805d24e307a7d036dcbfbb018ec7cb (patch)
tree42321d8d3a8566d1ca34c7a2071b3cea883714d8 /target
parent2f96b25e993e5411b1defa56a43c8ab9bb8e6dd6 (diff)
downloadmaster-187ad058-6ac0029648805d24e307a7d036dcbfbb018ec7cb.tar.gz
master-187ad058-6ac0029648805d24e307a7d036dcbfbb018ec7cb.tar.bz2
master-187ad058-6ac0029648805d24e307a7d036dcbfbb018ec7cb.zip
[ar71xx] add preliminary support for the Ubiquiti LS-SR71 board (thanks to Xianghua Xiao for the initial patch, and for testing)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14488 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/files-2.6.28/arch/mips/include/asm/mach-ar71xx/ar71xx.h1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c24
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/prom.c3
-rw-r--r--target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/ar71xx.h1
4 files changed, 27 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files-2.6.28/arch/mips/include/asm/mach-ar71xx/ar71xx.h b/target/linux/ar71xx/files-2.6.28/arch/mips/include/asm/mach-ar71xx/ar71xx.h
index a4e6ed3ecf..c0f3e7bc99 100644
--- a/target/linux/ar71xx/files-2.6.28/arch/mips/include/asm/mach-ar71xx/ar71xx.h
+++ b/target/linux/ar71xx/files-2.6.28/arch/mips/include/asm/mach-ar71xx/ar71xx.h
@@ -126,6 +126,7 @@ extern unsigned long ar71xx_mach_type;
#define AR71XX_MACH_PB42 12 /* Atheros PB42 */
#define AR71XX_MACH_MZK_W300NH 13 /* Planex MZK-W300NH */
#define AR71XX_MACH_MZK_W04NU 14 /* Planex MZK-W04NU */
+#define AR71XX_MACH_UBNT_LSSR71 15 /* Ubiquiti LS-SR71 */
/*
* PLL block
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 b23d4a973f..0cb4181c80 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
@@ -34,7 +34,7 @@ static struct spi_board_info ubnt_spi_info[] = {
}
};
-static struct ar71xx_pci_irq ubnt_rs_pci_irqs[] __initdata = {
+static struct ar71xx_pci_irq ubnt_pci_irqs[] __initdata = {
{
.slot = 0,
.pin = 1,
@@ -93,7 +93,7 @@ static void __init ubnt_rs_setup(void)
ar71xx_add_device_usb();
- ar71xx_pci_init(ARRAY_SIZE(ubnt_rs_pci_irqs), ubnt_rs_pci_irqs);
+ ar71xx_pci_init(ARRAY_SIZE(ubnt_pci_irqs), ubnt_pci_irqs);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ubnt_rs_leds_gpio),
ubnt_rs_leds_gpio);
@@ -109,6 +109,26 @@ static void __init ubnt_lsx_setup(void)
{
ar71xx_add_device_spi(NULL, ubnt_spi_info,
ARRAY_SIZE(ubnt_spi_info));
+
}
MIPS_MACHINE(AR71XX_MACH_UBNT_LSX, "Ubiquiti LSX", ubnt_lsx_setup);
+
+#define UBNT_LSSR71_PHY_MASK (1 << 1)
+
+static void __init ubnt_lssr71_setup(void)
+{
+ ar71xx_add_device_spi(NULL, ubnt_spi_info,
+ ARRAY_SIZE(ubnt_spi_info));
+
+ ar71xx_add_device_mdio(~UBNT_LSSR71_PHY_MASK);
+
+ ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+ ar71xx_eth0_data.phy_mask = UBNT_LSSR71_PHY_MASK;
+
+ ar71xx_add_device_eth(0);
+
+ ar71xx_pci_init(ARRAY_SIZE(ubnt_pci_irqs), ubnt_pci_irqs);
+}
+
+MIPS_MACHINE(AR71XX_MACH_UBNT_LSSR71, "Ubiquiti LS-SR71", ubnt_lssr71_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
index 03b03047e0..0116d0f5c5 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
@@ -56,6 +56,9 @@ static struct board_rec boards[] __initdata = {
.name = "UBNT-RS",
.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,
}, {
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 a4e6ed3ecf..c0f3e7bc99 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
@@ -126,6 +126,7 @@ extern unsigned long ar71xx_mach_type;
#define AR71XX_MACH_PB42 12 /* Atheros PB42 */
#define AR71XX_MACH_MZK_W300NH 13 /* Planex MZK-W300NH */
#define AR71XX_MACH_MZK_W04NU 14 /* Planex MZK-W04NU */
+#define AR71XX_MACH_UBNT_LSSR71 15 /* Ubiquiti LS-SR71 */
/*
* PLL block