From: John Crispin Date: Thu, 3 Apr 2008 21:40:40 +0000 (+0000) Subject: fix reboot on ar5315 X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=e6757f8098ab60a5164732b41e321d5e85c32307 fix reboot on ar5315 SVN-Revision: 10729 --- diff --git a/target/linux/atheros/files/arch/mips/atheros/ar5315/board.c b/target/linux/atheros/files/arch/mips/atheros/ar5315/board.c index 6d46c85a1e..28df6587c9 100644 --- a/target/linux/atheros/files/arch/mips/atheros/ar5315/board.c +++ b/target/linux/atheros/files/arch/mips/atheros/ar5315/board.c @@ -28,6 +28,7 @@ #include #include #include +#include static int is_5315 = 0; @@ -265,18 +266,13 @@ static void ar5315_restart(char *command) { unsigned int reg; for(;;) { - /* reset the system */ sysRegWrite(AR5315_COLD_RESET,AR5317_RESET_SYSTEM); /* * Cold reset does not work on the AR2315/6, use the GPIO reset bits a workaround. */ - - reg = sysRegRead(AR5315_GPIO_DO); - reg &= ~(1 << AR5315_RESET_GPIO); - sysRegWrite(AR5315_GPIO_DO, reg); - (void)sysRegRead(AR5315_GPIO_DO); /* flush write to hardware */ + gpio_direction_output(AR5315_RESET_GPIO, 0); } }