aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-11-15 10:11:20 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-11-15 10:11:20 +0000
commit378b2712b732c91164b5baa5f2416e3e97ff24c7 (patch)
tree1c3516ce9fa30f655ed231c2350b773ce74def22 /target/linux
parent2681696e2f87b46151424b4ed0e845f39f773fa8 (diff)
downloadupstream-378b2712b732c91164b5baa5f2416e3e97ff24c7.tar.gz
upstream-378b2712b732c91164b5baa5f2416e3e97ff24c7.tar.bz2
upstream-378b2712b732c91164b5baa5f2416e3e97ff24c7.zip
ar71xx: Add kernel support for the WR842N/ND v2
Patch to add kernel support for the TP-LINK WR842N/ND v2 Signed-off-by: Martijn Zilverschoon <thefriedzombie@gmail.com> Patchwork: http://patchwork.openwrt.org/patch/4352/ [juhosg: refresh kernel patch] Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38813 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c22
-rw-r--r--target/linux/ar71xx/patches-3.10/634-MIPS-ath79-add-TL-WR842N-v2-support.patch10
2 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
index 6d2654b184..064a33fef2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
@@ -180,6 +180,28 @@ static void __init tl_wr841n_v8_setup(void)
MIPS_MACHINE(ATH79_MACH_TL_WR841N_V8, "TL-WR841N-v8", "TP-LINK TL-WR841N/ND v8",
tl_wr841n_v8_setup);
+
+static void __init tl_wr842n_v2_setup(void)
+{
+ tl_ap123_setup();
+
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio) - 1,
+ tl_wr841n_v8_leds_gpio);
+
+ ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
+ ARRAY_SIZE(tl_wr841n_v8_gpio_keys),
+ tl_wr841n_v8_gpio_keys);
+
+ gpio_request_one(TL_MR3420V2_GPIO_USB_POWER,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "USB power");
+
+ ath79_register_usb();
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WR842N_V2, "TL-WR842N-v2", "TP-LINK TL-WR842N/ND v2",
+ tl_wr842n_v2_setup);
+
static void __init tl_mr3420v2_setup(void)
{
tl_ap123_setup();
diff --git a/target/linux/ar71xx/patches-3.10/634-MIPS-ath79-add-TL-WR842N-v2-support.patch b/target/linux/ar71xx/patches-3.10/634-MIPS-ath79-add-TL-WR842N-v2-support.patch
new file mode 100644
index 0000000000..b4220ff080
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.10/634-MIPS-ath79-add-TL-WR842N-v2-support.patch
@@ -0,0 +1,10 @@
+--- a/arch/mips/ath79/machtypes.h
++++ b/arch/mips/ath79/machtypes.h
+@@ -115,6 +115,7 @@ enum ath79_mach_type {
+ ATH79_MACH_TL_WR841N_V1, /* TP-LINK TL-WR841N v1 */
+ ATH79_MACH_TL_WR841N_V7, /* TP-LINK TL-WR841N/ND v7 */
+ ATH79_MACH_TL_WR841N_V8, /* TP-LINK TL-WR841N/ND v8 */
++ ATH79_MACH_TL_WR842N_V2, /* TP-LINK TL-WR842N/ND v2 */
+ ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
+ ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
+ ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */