aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-05-20 08:23:48 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-05-20 08:23:48 +0000
commit7807c1a29f67fe551ccea7194f7e8ac096ed23ea (patch)
tree8cbca56e3aea3ebf5a9174c5c349c91424ca8634 /target
parent1322e2721a14fe2db8513ff4c3eebc3d44196c7e (diff)
downloadupstream-7807c1a29f67fe551ccea7194f7e8ac096ed23ea.tar.gz
upstream-7807c1a29f67fe551ccea7194f7e8ac096ed23ea.tar.bz2
upstream-7807c1a29f67fe551ccea7194f7e8ac096ed23ea.zip
add experimental support for the Atheros PB44 board
SVN-Revision: 15928
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/ar71xx.sh3
-rw-r--r--target/linux/ar71xx/config-2.6.281
-rw-r--r--target/linux/ar71xx/config-2.6.291
-rw-r--r--target/linux/ar71xx/config-2.6.301
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig4
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/Makefile1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c79
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/prom.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h1
9 files changed, 94 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index fb0ff27462..ba69e7d5ca 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -25,6 +25,9 @@ ar71xx_board_name() {
*PB42)
name="pb42"
;;
+ *PB44)
+ name="pb44"
+ ;;
*RB-411)
name="rb-411"
;;
diff --git a/target/linux/ar71xx/config-2.6.28 b/target/linux/ar71xx/config-2.6.28
index 77157111a3..28cae671f4 100644
--- a/target/linux/ar71xx/config-2.6.28
+++ b/target/linux/ar71xx/config-2.6.28
@@ -13,6 +13,7 @@ CONFIG_AR71XX_MACH_GENERIC=y
CONFIG_AR71XX_MACH_MZK_W04NU=y
CONFIG_AR71XX_MACH_MZK_W300NH=y
CONFIG_AR71XX_MACH_PB42=y
+CONFIG_AR71XX_MACH_PB44=y
CONFIG_AR71XX_MACH_RB_4XX=y
CONFIG_AR71XX_MACH_TEW_632BRP=y
CONFIG_AR71XX_MACH_TL_WR941ND=y
diff --git a/target/linux/ar71xx/config-2.6.29 b/target/linux/ar71xx/config-2.6.29
index 7936b1baca..497fff65f3 100644
--- a/target/linux/ar71xx/config-2.6.29
+++ b/target/linux/ar71xx/config-2.6.29
@@ -12,6 +12,7 @@ CONFIG_AR71XX_MACH_GENERIC=y
CONFIG_AR71XX_MACH_MZK_W04NU=y
CONFIG_AR71XX_MACH_MZK_W300NH=y
CONFIG_AR71XX_MACH_PB42=y
+CONFIG_AR71XX_MACH_PB44=y
CONFIG_AR71XX_MACH_RB_4XX=y
CONFIG_AR71XX_MACH_TEW_632BRP=y
CONFIG_AR71XX_MACH_TL_WR941ND=y
diff --git a/target/linux/ar71xx/config-2.6.30 b/target/linux/ar71xx/config-2.6.30
index 6b3f05f621..81e4e4be40 100644
--- a/target/linux/ar71xx/config-2.6.30
+++ b/target/linux/ar71xx/config-2.6.30
@@ -12,6 +12,7 @@ CONFIG_AR71XX_MACH_GENERIC=y
CONFIG_AR71XX_MACH_MZK_W04NU=y
CONFIG_AR71XX_MACH_MZK_W300NH=y
CONFIG_AR71XX_MACH_PB42=y
+CONFIG_AR71XX_MACH_PB44=y
CONFIG_AR71XX_MACH_RB_4XX=y
CONFIG_AR71XX_MACH_TEW_632BRP=y
CONFIG_AR71XX_MACH_TL_WR941ND=y
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
index de68695308..d5bffdc9b4 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
@@ -18,6 +18,10 @@ config AR71XX_MACH_PB42
bool "Atheros PB42 board support"
default y
+config AR71XX_MACH_PB44
+ bool "Atheros PB44 board support"
+ default y
+
config AR71XX_MACH_AW_NR580
bool "AzureWave AW-NR580 board support"
default y
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
index 39510988c1..a70cc2b24b 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
@@ -17,6 +17,7 @@ obj-$(CONFIG_AR71XX_MACH_GENERIC) += mach-generic.o
obj-$(CONFIG_AR71XX_MACH_MZK_W04NU) += mach-mzk-w04nu.o
obj-$(CONFIG_AR71XX_MACH_MZK_W300NH) += mach-mzk-w300nh.o
obj-$(CONFIG_AR71XX_MACH_PB42) += mach-pb42.o
+obj-$(CONFIG_AR71XX_MACH_PB44) += mach-pb44.o
obj-$(CONFIG_AR71XX_MACH_RB_4XX) += mach-rb-4xx.o
obj-$(CONFIG_AR71XX_MACH_TEW_632BRP) += mach-tew-632brp.o
obj-$(CONFIG_AR71XX_MACH_TL_WR941ND) += mach-tl-wr941nd.o
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c
new file mode 100644
index 0000000000..f6d7a2e0a5
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c
@@ -0,0 +1,79 @@
+/*
+ * Atheros PB44 board support
+ *
+ * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/bitops.h>
+#include <linux/input.h>
+#include <linux/platform_device.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/flash.h>
+
+#include <asm/mips_machine.h>
+#include <asm/mach-ar71xx/ar71xx.h>
+#include <asm/mach-ar71xx/pci.h>
+
+#include "devices.h"
+
+static struct spi_board_info pb44_spi_info[] = {
+ {
+ .bus_num = 0,
+ .chip_select = 0,
+ .max_speed_hz = 25000000,
+ .modalias = "m25p80",
+ }
+};
+
+static struct ar71xx_pci_irq pb44_pci_irqs[] __initdata = {
+ {
+ .slot = 0,
+ .pin = 1,
+ .irq = AR71XX_PCI_IRQ_DEV0,
+ }, {
+ .slot = 1,
+ .pin = 1,
+ .irq = AR71XX_PCI_IRQ_DEV1,
+ }, {
+ .slot = 2,
+ .pin = 1,
+ .irq = AR71XX_PCI_IRQ_DEV2,
+ }
+};
+
+#define PB44_WAN_PHYMASK BIT(1)
+#define PB44_LAN_PHYMASK 0
+#define PB44_MDIO_PHYMASK (PB44_LAN_PHYMASK | PB44_WAN_PHYMASK)
+
+static void __init pb44_init(void)
+{
+ ar71xx_add_device_spi(NULL, pb44_spi_info,
+ ARRAY_SIZE(pb44_spi_info));
+
+ ar71xx_add_device_mdio(~PB44_MDIO_PHYMASK);
+
+ ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+ ar71xx_eth0_data.phy_mask = PB44_WAN_PHYMASK;
+
+ ar71xx_add_device_eth(0);
+
+ ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+ ar71xx_eth1_data.phy_mask = PB44_WAN_PHYMASK;
+ ar71xx_eth1_data.speed = SPEED_1000;
+ ar71xx_eth1_data.duplex = DUPLEX_FULL;
+
+ ar71xx_add_device_eth(1);
+
+ ar71xx_add_device_usb();
+
+ ar71xx_pci_init(ARRAY_SIZE(pb44_pci_irqs), pb44_pci_irqs);
+
+ /* TODO: GPIO LEDs & buttons */
+}
+
+MIPS_MACHINE(AR71XX_MACH_PB44, "Atheros PB44", pb44_init);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
index aea7a245a4..9117e30636 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
@@ -84,6 +84,9 @@ static struct board_rec boards[] __initdata = {
.name = "PB42",
.mach_type = AR71XX_MACH_PB42,
}, {
+ .name = "PB44",
+ .mach_type = AR71XX_MACH_PB44,
+ }, {
.name = "MZK-W300NH",
.mach_type = AR71XX_MACH_MZK_W300NH,
}, {
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 be2f0deb20..9bf08433c3 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
@@ -131,6 +131,7 @@ extern unsigned long ar71xx_mach_type;
#define AR71XX_MACH_UBNT_RSPRO 17 /* Ubiquiti RouterStation Pro */
#define AR71XX_MACH_AP81 18 /* Atheros AP81 */
#define AR71XX_MACH_WRT400N 19 /* Linksys WRT400N */
+#define AR71XX_MACH_PB44 20 /* Atheros PB44 */
/*
* PLL block