svn commit: r322290 - head/sys/arm/mv

Marcin Wojtas mw at FreeBSD.org
Wed Aug 9 01:14:30 UTC 2017


Author: mw
Date: Wed Aug  9 01:14:29 2017
New Revision: 322290
URL: https://svnweb.freebsd.org/changeset/base/322290

Log:
  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

Modified:
  head/sys/arm/mv/mv_machdep.c

Modified: head/sys/arm/mv/mv_machdep.c
==============================================================================
--- head/sys/arm/mv/mv_machdep.c	Wed Aug  9 01:06:40 2017	(r322289)
+++ head/sys/arm/mv/mv_machdep.c	Wed Aug  9 01:14:29 2017	(r322290)
@@ -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


More information about the svn-src-head mailing list