diff mbox

[2/2] ARM: imx: Disable imx-cpufreq when cpufreq-cpu0 used

Message ID 1362934407-29030-3-git-send-email-mpa@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Markus Pargmann March 10, 2013, 4:53 p.m. UTC
cpufreq-cpu0 has DT support. So if imx27 or imx51 is booted with DT
support, it should not use the old imx-cpufreq driver. Instead the
operating-points should be defined in the appropriate DT files.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 arch/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Sascha Hauer March 10, 2013, 10:51 p.m. UTC | #1
On Sun, Mar 10, 2013 at 05:53:27PM +0100, Markus Pargmann wrote:
> cpufreq-cpu0 has DT support. So if imx27 or imx51 is booted with DT
> support, it should not use the old imx-cpufreq driver. Instead the
> operating-points should be defined in the appropriate DT files.
> 
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> ---
>  arch/arm/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 5b71469..1247fe5 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -2156,6 +2156,7 @@ source "drivers/cpufreq/Kconfig"
>  config CPU_FREQ_IMX
>  	tristate "CPUfreq driver for i.MX CPUs"
>  	depends on ARCH_MXC && CPU_FREQ
> +	depends on (!GENERIC_CPUFREQ_CPU0 || (!MACH_IMX51_DT && !MACH_IMX27_DT))

Does this driver work with multiplatform anyway? I mean it registers
a cpufreq driver without knowing that the kernel even runs on i.MX.
Maybe removing it is the better option?

Sascha

>  	select CPU_FREQ_TABLE
>  	help
>  	  This enables the CPUfreq driver for i.MX CPUs.
> -- 
> 1.8.1.5
> 
>
Shawn Guo March 11, 2013, 6:36 a.m. UTC | #2
On Sun, Mar 10, 2013 at 11:51:59PM +0100, Sascha Hauer wrote:
> On Sun, Mar 10, 2013 at 05:53:27PM +0100, Markus Pargmann wrote:
> > cpufreq-cpu0 has DT support. So if imx27 or imx51 is booted with DT
> > support, it should not use the old imx-cpufreq driver. Instead the
> > operating-points should be defined in the appropriate DT files.
> > 
> > Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> > ---
> >  arch/arm/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index 5b71469..1247fe5 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -2156,6 +2156,7 @@ source "drivers/cpufreq/Kconfig"
> >  config CPU_FREQ_IMX
> >  	tristate "CPUfreq driver for i.MX CPUs"
> >  	depends on ARCH_MXC && CPU_FREQ
> > +	depends on (!GENERIC_CPUFREQ_CPU0 || (!MACH_IMX51_DT && !MACH_IMX27_DT))
> 
> Does this driver work with multiplatform anyway? I mean it registers
> a cpufreq driver without knowing that the kernel even runs on i.MX.
> Maybe removing it is the better option?
> 
+1 on killing imx cpufreq driver.

Shawn
Markus Pargmann March 11, 2013, 6:44 p.m. UTC | #3
On Sun, Mar 10, 2013 at 11:51:59PM +0100, Sascha Hauer wrote:
> On Sun, Mar 10, 2013 at 05:53:27PM +0100, Markus Pargmann wrote:
> > cpufreq-cpu0 has DT support. So if imx27 or imx51 is booted with DT
> > support, it should not use the old imx-cpufreq driver. Instead the
> > operating-points should be defined in the appropriate DT files.
> > 
> > Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> > ---
> >  arch/arm/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index 5b71469..1247fe5 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -2156,6 +2156,7 @@ source "drivers/cpufreq/Kconfig"
> >  config CPU_FREQ_IMX
> >  	tristate "CPUfreq driver for i.MX CPUs"
> >  	depends on ARCH_MXC && CPU_FREQ
> > +	depends on (!GENERIC_CPUFREQ_CPU0 || (!MACH_IMX51_DT && !MACH_IMX27_DT))
> 
> Does this driver work with multiplatform anyway? I mean it registers
> a cpufreq driver without knowing that the kernel even runs on i.MX.
> Maybe removing it is the better option?

It works with multiplatform builds. imx-cpufreq has a global get_cpu_op
function pointer that is set by the board init code. If it is not set,
the driver fails with EINVAL.

But when using cpufreq-cpu0 and platform specific code that still sets
the get_cpu_op function both drivers could run. So I thought it's
better to remove imx-cpufreq when cpufreq-cpu0 is used.

And +1 for removing imx-cpufreq.

Regards,

Markus
diff mbox

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5b71469..1247fe5 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -2156,6 +2156,7 @@  source "drivers/cpufreq/Kconfig"
 config CPU_FREQ_IMX
 	tristate "CPUfreq driver for i.MX CPUs"
 	depends on ARCH_MXC && CPU_FREQ
+	depends on (!GENERIC_CPUFREQ_CPU0 || (!MACH_IMX51_DT && !MACH_IMX27_DT))
 	select CPU_FREQ_TABLE
 	help
 	  This enables the CPUfreq driver for i.MX CPUs.