Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152837859
D2473.id5260.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D2473.id5260.diff
View Options
Index: sys/arm/amlogic/aml8726/aml8726_machdep.c
===================================================================
--- sys/arm/amlogic/aml8726/aml8726_machdep.c
+++ sys/arm/amlogic/aml8726/aml8726_machdep.c
@@ -38,6 +38,7 @@
#include <vm/pmap.h>
#include <machine/bus.h>
+#include <machine/cpufunc.h>
#include <machine/devmap.h>
#include <machine/machdep.h>
#include <machine/platform.h>
@@ -114,6 +115,19 @@
aml8726_identify_soc();
/*
+ * My aml8726-m3 development box identifies the CPU as a
+ * Cortex A9-r2 rev 4 and randomly locks up during boot
+ * when WFI is used.
+ */
+ switch (aml8726_soc_hw_rev) {
+ case AML_SOC_HW_REV_M3:
+ cpu_do_powersave = 0;
+ 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
* should always be invoked.
Index: sys/arm/include/cpufunc.h
===================================================================
--- sys/arm/include/cpufunc.h
+++ sys/arm/include/cpufunc.h
@@ -174,6 +174,7 @@
extern struct cpu_functions cpufuncs;
extern u_int cputype;
+extern int cpu_do_powersave;
#define cpu_ident() cpufuncs.cf_id()
#define cpu_cpwait() cpufuncs.cf_cpwait()
@@ -260,7 +261,10 @@
#define cpu_flush_brnchtgt_C() cpufuncs.cf_flush_brnchtgt_C()
#define cpu_flush_brnchtgt_E(e) cpufuncs.cf_flush_brnchtgt_E(e)
-#define cpu_sleep(m) cpufuncs.cf_sleep(m)
+#define cpu_sleep(m) do { \
+ if (cpu_do_powersave) \
+ cpufuncs.cf_sleep(m); \
+} while(0)
#define cpu_dataabt_fixup(a) cpufuncs.cf_dataabt_fixup(a)
#define cpu_prefetchabt_fixup(a) cpufuncs.cf_prefetchabt_fixup(a)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 18, 10:36 AM (4 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31714154
Default Alt Text
D2473.id5260.diff (1 KB)
Attached To
Mode
D2473: Patch to disable WFI on aml8726-m3
Attached
Detach File
Event Timeline
Log In to Comment