Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Aug 2017 01:14:29 +0000 (UTC)
From:      Marcin Wojtas <mw@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r322290 - head/sys/arm/mv
Message-ID:  <201708090114.v791ETgk014052@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708090114.v791ETgk014052>