aboutsummaryrefslogtreecommitdiff
path: root/sys/mips
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2021-04-19 05:48:13 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2021-05-22 22:53:00 +0000
commit114f4b17d5b60a5d53ca98f08cc7e8d78c6984de (patch)
tree8e5be7fcc405e2671771371865a959f8eca4defe /sys/mips
parent03b0505b8fe848f33f2f38fe89dd5538908c847e (diff)
downloadsrc-114f4b17d5b60a5d53ca98f08cc7e8d78c6984de.tar.gz
src-114f4b17d5b60a5d53ca98f08cc7e8d78c6984de.zip
[ar71xx] During reset, don't spin, just keep trying
I've seen this fail from time to time and just hang during reset. Instead of it just hanging, just poke it again. I've not seen it fail in hundreds of test resets now. Tested: * AR9344 AP/STA configuration
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/atheros/ar71xx_machdep.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/mips/atheros/ar71xx_machdep.c b/sys/mips/atheros/ar71xx_machdep.c
index 2bb6d5845d16..72beec972de2 100644
--- a/sys/mips/atheros/ar71xx_machdep.c
+++ b/sys/mips/atheros/ar71xx_machdep.c
@@ -80,10 +80,13 @@ platform_cpu_init()
void
platform_reset(void)
{
- ar71xx_device_stop(RST_RESET_FULL_CHIP);
- /* Wait for reset */
- while(1)
- ;
+ while(1) {
+ printf("%s: resetting via AHB FULL_CHIP register...\n", __func__);
+ ar71xx_device_start(RST_RESET_FULL_CHIP);
+ DELAY(100 * 1000);
+ ar71xx_device_stop(RST_RESET_FULL_CHIP);
+ DELAY(1000 * 1000);
+ }
}
/*