From c809908d6a30b706fbf371b3e6b5dff3fc17df18 Mon Sep 17 00:00:00 2001 From: ganbold Date: Tue, 12 May 2015 08:53:54 +0000 Subject: [PATCH] Disable WPI in case of aml8726-m3. The aml8726-m3 SoC is identified as a Cortex A9-r2 rev 4 CPU and it hangs sometimes during the boot when WFI is used by the kernel. Differential Revision: https://reviews.freebsd.org/D2473 Submitted by: John Wehle Suggested by: ian@ --- sys/arm/amlogic/aml8726/aml8726_machdep.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/arm/amlogic/aml8726/aml8726_machdep.c b/sys/arm/amlogic/aml8726/aml8726_machdep.c index 4476c90bc17d..7f70004a54a9 100644 --- a/sys/arm/amlogic/aml8726/aml8726_machdep.c +++ b/sys/arm/amlogic/aml8726/aml8726_machdep.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -113,6 +114,19 @@ platform_gpio_init(void) */ aml8726_identify_soc(); + /* + * My aml8726-m3 development box which identifies the CPU as + * a Cortex A9-r2 rev 4 randomly locks up during boot when WFI + * is used. + */ + switch (aml8726_soc_hw_rev) { + case AML_SOC_HW_REV_M3: + cpufuncs.cf_sleep = (void *)cpufunc_nullop; + break; + default: + break; + } + /* * This FDT fixup should arguably be called through fdt_fixup_table, * however currently there's no mechanism to specify a fixup which