summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authormw <mw@FreeBSD.org>2017-08-09 01:14:29 +0000
committerLuiz Souza <luiz@netgate.com>2017-09-06 11:57:33 -0500
commite8f068c0a331ce850ac0228d5ecd193b392e9692 (patch)
tree61ca162fbd4e445b28621025ad1d8956dfa0c3fc /sys/arm
parent14980a1893e5f1ae021dc903cdc911576371dfeb (diff)
downloadFreeBSD-src-e8f068c0a331ce850ac0228d5ecd193b392e9692.zip
FreeBSD-src-e8f068c0a331ce850ac0228d5ecd193b392e9692.tar.gz
Dynamically configure timers' base frequency for Armada 38x
Instead of using 'clock-frequency' device tree property for global/twd mpcore timers of Armada 38x SoCs, set it in platform_late_init stage with arm_tmr_change_frequency() function. Reviewed by: cognet (mentor) Approved by: cognet (mentor) Obtained from: Semihalf Differential Revision: https://reviews.freebsd.org/D11881 (cherry picked from commit d29c07b06f869c7abafdfbe70cb31d8903ccd1d7)
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/mv/mv_machdep.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/arm/mv/mv_machdep.c b/sys/arm/mv/mv_machdep.c
index 4de77cd..174394a 100644
--- a/sys/arm/mv/mv_machdep.c
+++ b/sys/arm/mv/mv_machdep.c
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm.h>
#include <vm/pmap.h>
+#include <arm/arm/mpcore_timervar.h>
#include <arm/arm/nexusvar.h>
#include <machine/bus.h>
@@ -294,6 +295,9 @@ platform_late_init(void)
#endif
#if defined(SOC_MV_ARMADA38X)
+ /* Configure timers' base frequency */
+ arm_tmr_change_frequency(get_cpu_freq() / 2);
+
/*
* Workaround for Marvell Armada38X family HW issue
* between Cortex-A9 CPUs and on-chip devices that may
OpenPOWER on IntegriCloud