From 3c804fef82a53c7acc9a54d78fe362b6bb8fde81 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Wed, 14 Jun 2017 04:16:37 +0000 Subject: [PATCH] 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. --- sys/powerpc/mpc85xx/fsl_diu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/powerpc/mpc85xx/fsl_diu.c b/sys/powerpc/mpc85xx/fsl_diu.c index 2fffaae69a45..5019b209d1f3 100644 --- a/sys/powerpc/mpc85xx/fsl_diu.c +++ b/sys/powerpc/mpc85xx/fsl_diu.c @@ -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); }