[PATCH RFC] Add cpufreq support
Arnd Bergmann
arnd at arndb.de
Fri Feb 5 14:24:35 PST 2016
On Friday 05 February 2016 17:58:38 Mason wrote:
> I'm throwing this out there to ask:
> Is this the right way to enable cpufreq on my platform?
> ---
> @@ -23,6 +24,11 @@ static void tango_l2c_write(unsigned long val, unsigned int reg)
> tango_set_l2_control(val);
> }
>
> +static void __init tango_init_late(void)
> +{
> + platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
> +}
> +
> static const char *const tango_dt_compat[] = { "sigma,tango4", NULL };
>
> DT_MACHINE_START(TANGO_DT, "Sigma Tango DT")
> @@ -30,4 +36,5 @@ DT_MACHINE_START(TANGO_DT, "Sigma Tango DT")
> .l2c_aux_mask = ~0,
> .l2c_write_sec = tango_l2c_write,
> .map_io = tango_map_io,
> + .init_late = tango_init_late,
> MACHINE_END
>
We no longer call platform_device_register_simple() from platform code, at least
for new platforms, and we should probably remove the code from the existing
platforms that still do it. I forget what the replacement was, but I'm not
going to take this version. Viresh should be able to help you do it the right
way.
Arnd
More information about the linux-arm-kernel
mailing list