Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jun 2017 04:16:37 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r319935 - head/sys/powerpc/mpc85xx
Message-ID:  <201706140416.v5E4GbT1065901@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Wed Jun 14 04:16:37 2017
New Revision: 319935
URL: https://svnweb.freebsd.org/changeset/base/319935

Log:
  Use mpc85xx_get_platform_clock() instead of rolling our own.
  
  Now that we have a single source for the platform clock, we don't need to
  roll our own in every user.

Modified:
  head/sys/powerpc/mpc85xx/fsl_diu.c

Modified: head/sys/powerpc/mpc85xx/fsl_diu.c
==============================================================================
--- head/sys/powerpc/mpc85xx/fsl_diu.c	Wed Jun 14 03:55:11 2017	(r319934)
+++ head/sys/powerpc/mpc85xx/fsl_diu.c	Wed Jun 14 04:16:37 2017	(r319935)
@@ -225,11 +225,9 @@ diu_set_pxclk(device_t dev, unsigned int freq)
 	unsigned long bus_freq;
 	uint32_t pxclk_set;
 	uint32_t clkdvd;
-	int res;
 
 	node = ofw_bus_get_node(device_get_parent(dev));
-	if ((res = OF_getencprop(node, "bus-frequency",
-	    (pcell_t *)&bus_freq, sizeof(bus_freq)) <= 0)) {
+	if ((bus_freq = mpc85xx_get_platform_clock()) <= 0) {
 		device_printf(dev, "Unable to get bus frequency\n");
 		return (ENXIO);
 	}



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