svn commit: r256973 - head/sys/powerpc/booke

Nathan Whitehorn nwhitehorn at FreeBSD.org
Wed Oct 23 14:29:00 UTC 2013


Author: nwhitehorn
Date: Wed Oct 23 14:28:59 2013
New Revision: 256973
URL: http://svnweb.freebsd.org/changeset/base/256973

Log:
  If the device tree directly contains the timebase frequency, use it. This
  property is required by ePAPR, but maintain the fallback to bus-frequency
  for compatibility.
  
  MFC after:	2 weeks

Modified:
  head/sys/powerpc/booke/platform_bare.c

Modified: head/sys/powerpc/booke/platform_bare.c
==============================================================================
--- head/sys/powerpc/booke/platform_bare.c	Wed Oct 23 14:28:42 2013	(r256972)
+++ head/sys/powerpc/booke/platform_bare.c	Wed Oct 23 14:28:59 2013	(r256973)
@@ -188,6 +188,10 @@ bare_timebase_freq(platform_t plat, stru
 	if ((child = OF_child(cpus)) == 0)
 		goto out;
 
+	if (OF_getprop(child, "timebase-frequency", (void *)&ticks,
+	    sizeof(ticks)) == sizeof(ticks))
+		goto out;
+
 	freq = 0;
 	if (OF_getprop(child, "bus-frequency", (void *)&freq,
 	    sizeof(freq)) <= 0)


More information about the svn-src-all mailing list