aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-09-02 16:09:12 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-09-02 16:09:12 +0000
commit78700f5495238dcd38ecc52b072207b7ab608219 (patch)
treea421783a45692d5e05cd7e6e18ef032fa43eb52b /target/linux/ar71xx
parent92f58fd13c736f00a9e84a9145a26e110acca898 (diff)
downloadupstream-78700f5495238dcd38ecc52b072207b7ab608219.tar.gz
upstream-78700f5495238dcd38ecc52b072207b7ab608219.tar.bz2
upstream-78700f5495238dcd38ecc52b072207b7ab608219.zip
ar71xx: configure OBS4 line on TL-WR841N-v8/MR3420v2
It also fixes USB Power on MR3420v2. This time we took the information from the source of GPL: http://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg18970.html Confirmed and tested: https://dev.openwrt.org/ticket/13201#comment:41 Thanks to oguretsagressive for testing. Signed-off-by: Dmytro <dioptimizer@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37878 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c10
1 files changed, 8 insertions, 2 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 e376ae5a42..6d2654b184 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
@@ -132,8 +132,14 @@ static void __init tl_ap123_setup(void)
u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
- /* Disable JTAG, enabling GPIOs 0-4 */
- ath79_gpio_function_enable(AR934X_GPIO_FUNC_JTAG_DISABLE);
+ /* Disable JTAG, enabling GPIOs 0-3 */
+ /* Configure OBS4 line, for GPIO 4*/
+ ath79_gpio_function_setup(AR934X_GPIO_FUNC_JTAG_DISABLE,
+ AR934X_GPIO_FUNC_CLK_OBS4_EN);
+
+ /* config gpio4 as normal gpio function */
+ ath79_gpio_output_select(TL_MR3420V2_GPIO_USB_POWER,
+ AR934X_GPIO_OUT_GPIO);
ath79_register_m25p80(&tl_wr841n_v8_flash_data);