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.
This commit is contained in:
jhibbits 2017-06-14 04:16:37 +00:00
parent 2ec5f4d228
commit e733d0a915

View File

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