Message ID | 20180830194356.14059-4-digetx@gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | CPUFREQ OPP's and Tegra30 support by tegra20-cpufreq driver | expand |
On 30/08/2018 20:43, Dmitry Osipenko wrote: > Tegra20-cpufreq driver require a platform device in order to be loaded, > instantiate a simple platform device for the driver during of the machines > late initialization. Driver now supports Tegra30 SoC's, hence create the > device on Tegra30 machines. > > Signed-off-by: Dmitry Osipenko <digetx@gmail.com> > --- > arch/arm/mach-tegra/tegra.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c > index 67d8ae60ac67..b559e22eab76 100644 > --- a/arch/arm/mach-tegra/tegra.c > +++ b/arch/arm/mach-tegra/tegra.c > @@ -111,6 +111,10 @@ static void __init tegra_dt_init_late(void) > if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && > of_machine_is_compatible("nvidia,tegra20")) > platform_device_register_simple("tegra20-cpufreq", -1, NULL, 0); > + > + if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && > + of_machine_is_compatible("nvidia,tegra30")) > + platform_device_register_simple("tegra20-cpufreq", -1, NULL, 0); > } > > static const char * const tegra_dt_board_compat[] = { Not sure why you would do this if now the driver only works with DT. Am I missing something? Cheers Jon
On 17/10/2018 09:49, Jon Hunter wrote: > > On 30/08/2018 20:43, Dmitry Osipenko wrote: >> Tegra20-cpufreq driver require a platform device in order to be loaded, >> instantiate a simple platform device for the driver during of the machines >> late initialization. Driver now supports Tegra30 SoC's, hence create the >> device on Tegra30 machines. >> >> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> >> --- >> arch/arm/mach-tegra/tegra.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c >> index 67d8ae60ac67..b559e22eab76 100644 >> --- a/arch/arm/mach-tegra/tegra.c >> +++ b/arch/arm/mach-tegra/tegra.c >> @@ -111,6 +111,10 @@ static void __init tegra_dt_init_late(void) >> if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && >> of_machine_is_compatible("nvidia,tegra20")) >> platform_device_register_simple("tegra20-cpufreq", -1, NULL, 0); >> + >> + if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && >> + of_machine_is_compatible("nvidia,tegra30")) >> + platform_device_register_simple("tegra20-cpufreq", -1, NULL, 0); >> } >> >> static const char * const tegra_dt_board_compat[] = { > > Not sure why you would do this if now the driver only works with DT. Am > I missing something? Actually, not sure why we just don't move this into the actual driver itself like we have for tegra124. Cheers Jon
On 10/17/18 12:54 PM, Jon Hunter wrote: > > On 17/10/2018 09:49, Jon Hunter wrote: >> >> On 30/08/2018 20:43, Dmitry Osipenko wrote: >>> Tegra20-cpufreq driver require a platform device in order to be loaded, >>> instantiate a simple platform device for the driver during of the machines >>> late initialization. Driver now supports Tegra30 SoC's, hence create the >>> device on Tegra30 machines. >>> >>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> >>> --- >>> arch/arm/mach-tegra/tegra.c | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c >>> index 67d8ae60ac67..b559e22eab76 100644 >>> --- a/arch/arm/mach-tegra/tegra.c >>> +++ b/arch/arm/mach-tegra/tegra.c >>> @@ -111,6 +111,10 @@ static void __init tegra_dt_init_late(void) >>> if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && >>> of_machine_is_compatible("nvidia,tegra20")) >>> platform_device_register_simple("tegra20-cpufreq", -1, NULL, 0); >>> + >>> + if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && >>> + of_machine_is_compatible("nvidia,tegra30")) >>> + platform_device_register_simple("tegra20-cpufreq", -1, NULL, 0); >>> } >>> >>> static const char * const tegra_dt_board_compat[] = { >> >> Not sure why you would do this if now the driver only works with DT. Am >> I missing something? > > Actually, not sure why we just don't move this into the actual driver > itself like we have for tegra124. Tegra124 has specific HW for the CPUFreq, T20/30 do not. Hence on T20/30 CPUFreq control is implemented purely in software and there is no real HW device for the driver.
diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index 67d8ae60ac67..b559e22eab76 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c @@ -111,6 +111,10 @@ static void __init tegra_dt_init_late(void) if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && of_machine_is_compatible("nvidia,tegra20")) platform_device_register_simple("tegra20-cpufreq", -1, NULL, 0); + + if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && + of_machine_is_compatible("nvidia,tegra30")) + platform_device_register_simple("tegra20-cpufreq", -1, NULL, 0); } static const char * const tegra_dt_board_compat[] = {
Tegra20-cpufreq driver require a platform device in order to be loaded, instantiate a simple platform device for the driver during of the machines late initialization. Driver now supports Tegra30 SoC's, hence create the device on Tegra30 machines. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> --- arch/arm/mach-tegra/tegra.c | 4 ++++ 1 file changed, 4 insertions(+)