27c27
< __FBSDID("$FreeBSD: head/sys/powerpc/ofw/ofw_cpu.c 227843 2011-11-22 21:28:20Z marius $");
---
> __FBSDID("$FreeBSD: head/sys/powerpc/ofw/ofw_cpu.c 252115 2013-06-23 14:20:54Z jhibbits $");
135a136,140
> struct ofw_cpu_softc {
> struct pcpu *sc_cpu_pcpu;
> uint32_t sc_nominal_mhz;
> };
>
177a183,191
> struct ofw_cpu_softc *sc;
> uint32_t cell;
>
> sc = device_get_softc(dev);
> OF_getprop(ofw_bus_get_node(dev), "reg", &cell, sizeof(cell));
> sc->sc_cpu_pcpu = pcpu_find(cell);
> OF_getprop(ofw_bus_get_node(dev), "clock-frequency", &cell, sizeof(cell));
> sc->sc_nominal_mhz = cell / 1000000; /* convert to MHz */
>
185c199
< uint32_t cell;
---
> struct ofw_cpu_softc *sc;
186a201,202
> sc = device_get_softc(dev);
>
189,190c205
< OF_getprop(ofw_bus_get_node(dev), "reg", &cell, sizeof(cell));
< *result = (uintptr_t)(pcpu_find(cell));
---
> *result = (uintptr_t)sc->sc_cpu_pcpu;
193,197c208
< cell = 0;
< OF_getprop(ofw_bus_get_node(dev), "clock-frequency",
< &cell, sizeof(cell));
< cell /= 1000000; /* convert to MHz */
< *result = (uintptr_t)(cell);
---
> *result = (uintptr_t)sc->sc_nominal_mhz;
< __FBSDID("$FreeBSD: head/sys/powerpc/ofw/ofw_cpu.c 227843 2011-11-22 21:28:20Z marius $");
---
> __FBSDID("$FreeBSD: head/sys/powerpc/ofw/ofw_cpu.c 252115 2013-06-23 14:20:54Z jhibbits $");
135a136,140
> struct ofw_cpu_softc {
> struct pcpu *sc_cpu_pcpu;
> uint32_t sc_nominal_mhz;
> };
>
177a183,191
> struct ofw_cpu_softc *sc;
> uint32_t cell;
>
> sc = device_get_softc(dev);
> OF_getprop(ofw_bus_get_node(dev), "reg", &cell, sizeof(cell));
> sc->sc_cpu_pcpu = pcpu_find(cell);
> OF_getprop(ofw_bus_get_node(dev), "clock-frequency", &cell, sizeof(cell));
> sc->sc_nominal_mhz = cell / 1000000; /* convert to MHz */
>
185c199
< uint32_t cell;
---
> struct ofw_cpu_softc *sc;
186a201,202
> sc = device_get_softc(dev);
>
189,190c205
< OF_getprop(ofw_bus_get_node(dev), "reg", &cell, sizeof(cell));
< *result = (uintptr_t)(pcpu_find(cell));
---
> *result = (uintptr_t)sc->sc_cpu_pcpu;
193,197c208
< cell = 0;
< OF_getprop(ofw_bus_get_node(dev), "clock-frequency",
< &cell, sizeof(cell));
< cell /= 1000000; /* convert to MHz */
< *result = (uintptr_t)(cell);
---
> *result = (uintptr_t)sc->sc_nominal_mhz;