From 1070a9141ca6b9ce3ba2d31fc7da64850da825e6 Mon Sep 17 00:00:00 2001 From: Marcin Wojtas Date: Wed, 9 Aug 2017 01:14:29 +0000 Subject: [PATCH] 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 --- sys/arm/mv/mv_machdep.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/arm/mv/mv_machdep.c b/sys/arm/mv/mv_machdep.c index 4de77cdfa4c..174394a7371 100644 --- a/sys/arm/mv/mv_machdep.c +++ b/sys/arm/mv/mv_machdep.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -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