summaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch/mips
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-12-15 19:18:52 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-12-15 19:18:52 +0000
commitac13af2180227e8fa9fede9576b41ba08bf57d3d (patch)
tree7a8b4024920bfb683a6fa89e69ae743fecccfb6a /target/linux/ar71xx/files/arch/mips
parente749730b78ed9e5267f91bd2ce1786c4233870ef (diff)
[ar71xx] prepare for RouterStation support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13657 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips')
-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-routerstation.c37
3 files changed, 42 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
index 7e9b75c5d..d16fdb824 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
@@ -31,6 +31,10 @@ config AR71XX_MACH_TEW_632BRP
bool "TRENDnet TEW-632BRP support"
default y
+config AR71XX_MACH_ROUTERSTATION
+ bool "Ubiquiti RouterStation support"
+ default y
+
endmenu
endif
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
index 37a1ebfb4..f53dc9daf 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
@@ -14,5 +14,6 @@ obj-$(CONFIG_AR71XX_MACH_AP83) += mach-ap83.o
obj-$(CONFIG_AR71XX_MACH_AW_NR580) += mach-aw-nr580.o
obj-$(CONFIG_AR71XX_MACH_GENERIC) += mach-generic.o
obj-$(CONFIG_AR71XX_MACH_RB_4XX) += mach-rb-4xx.o
+obj-$(CONFIG_AR71XX_MACH_ROUTERSTATION) += mach-routerstation.o
obj-$(CONFIG_AR71XX_MACH_TEW_632BRP) += mach-tew-632brp.o
obj-$(CONFIG_AR71XX_MACH_WP543) += mach-wp543.o
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-routerstation.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-routerstation.c
new file mode 100644
index 000000000..a8de7117f
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-routerstation.c
@@ -0,0 +1,37 @@
+/*
+ * Ubiquiti RouterStation support
+ *
+ * Copyright (C) 2008 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2008 Imre Kaloz <kaloz@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/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 <asm/mach-ar71xx/platform.h>
+
+static struct spi_board_info routerstation_spi_info[] = {
+ {
+ .bus_num = 0,
+ .chip_select = 0,
+ .max_speed_hz = 25000000,
+ .modalias = "m25p80",
+ }
+};
+
+static void __init routerstation_setup(void)
+{
+ ar71xx_add_device_spi(NULL, routerstation_spi_info,
+ ARRAY_SIZE(routerstation_spi_info));
+}
+
+MIPS_MACHINE(AR71XX_MACH_ROUTERSTATION, "Ubiquiti RouterStation",
+ routerstation_setup);