svn commit: r319935 - head/sys/powerpc/mpc85xx

Justin Hibbits jhibbits at FreeBSD.org
Wed Jun 14 04:16:38 UTC 2017


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);
 	}


More information about the svn-src-all mailing list