linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: imx: kconfig changes for cpufreq-cpu0
@ 2013-03-10 16:53 Markus Pargmann
  2013-03-10 16:53 ` [PATCH 1/2] ARM: imx27, imx5: Add kconfig selects " Markus Pargmann
  2013-03-10 16:53 ` [PATCH 2/2] ARM: imx: Disable imx-cpufreq when cpufreq-cpu0 used Markus Pargmann
  0 siblings, 2 replies; 6+ messages in thread
From: Markus Pargmann @ 2013-03-10 16:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

the generic cpufreq-cpu0 cpufreq driver can be used by imx27
and imx5 with DT. At the moment there are some missing kconfig
selects. This patch adds them and removes imx-cpufreq if
imx27 or imx5 are compiled with cpufreq-cpu0 and DT support.

Regards,

Markus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] ARM: imx27, imx5: Add kconfig selects for cpufreq-cpu0
  2013-03-10 16:53 [PATCH 0/2] ARM: imx: kconfig changes for cpufreq-cpu0 Markus Pargmann
@ 2013-03-10 16:53 ` Markus Pargmann
  2013-03-10 16:53 ` [PATCH 2/2] ARM: imx: Disable imx-cpufreq when cpufreq-cpu0 used Markus Pargmann
  1 sibling, 0 replies; 6+ messages in thread
From: Markus Pargmann @ 2013-03-10 16:53 UTC (permalink / raw)
  To: linux-arm-kernel

There are some config options not selected by imx27 and imx5 that are
necessary to use the cpufreq-cpu0 driver.

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

diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 4c9c6f9..4144fdc 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -128,6 +128,8 @@ config SOC_IMX25
 
 config SOC_IMX27
 	bool
+	select ARCH_HAS_CPUFREQ
+	select ARCH_HAS_OPP
 	select COMMON_CLK
 	select CPU_ARM926T
 	select IMX_HAVE_IOMUX_V1
@@ -155,6 +157,7 @@ config SOC_IMX35
 config SOC_IMX5
 	bool
 	select ARCH_HAS_CPUFREQ
+	select ARCH_HAS_OPP
 	select ARCH_MX5
 	select ARCH_MXC_IOMUX_V3
 	select COMMON_CLK
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] ARM: imx: Disable imx-cpufreq when cpufreq-cpu0 used
  2013-03-10 16:53 [PATCH 0/2] ARM: imx: kconfig changes for cpufreq-cpu0 Markus Pargmann
  2013-03-10 16:53 ` [PATCH 1/2] ARM: imx27, imx5: Add kconfig selects " Markus Pargmann
@ 2013-03-10 16:53 ` Markus Pargmann
  2013-03-10 22:51   ` Sascha Hauer
  1 sibling, 1 reply; 6+ messages in thread
From: Markus Pargmann @ 2013-03-10 16:53 UTC (permalink / raw)
  To: linux-arm-kernel

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))
 	select CPU_FREQ_TABLE
 	help
 	  This enables the CPUfreq driver for i.MX CPUs.
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] ARM: imx: Disable imx-cpufreq when cpufreq-cpu0 used
  2013-03-10 16:53 ` [PATCH 2/2] ARM: imx: Disable imx-cpufreq when cpufreq-cpu0 used Markus Pargmann
@ 2013-03-10 22:51   ` Sascha Hauer
  2013-03-11  6:36     ` Shawn Guo
  2013-03-11 18:44     ` Markus Pargmann
  0 siblings, 2 replies; 6+ messages in thread
From: Sascha Hauer @ 2013-03-10 22:51 UTC (permalink / raw)
  To: linux-arm-kernel

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
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] ARM: imx: Disable imx-cpufreq when cpufreq-cpu0 used
  2013-03-10 22:51   ` Sascha Hauer
@ 2013-03-11  6:36     ` Shawn Guo
  2013-03-11 18:44     ` Markus Pargmann
  1 sibling, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2013-03-11  6:36 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] ARM: imx: Disable imx-cpufreq when cpufreq-cpu0 used
  2013-03-10 22:51   ` Sascha Hauer
  2013-03-11  6:36     ` Shawn Guo
@ 2013-03-11 18:44     ` Markus Pargmann
  1 sibling, 0 replies; 6+ messages in thread
From: Markus Pargmann @ 2013-03-11 18:44 UTC (permalink / raw)
  To: linux-arm-kernel

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

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-03-11 18:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-10 16:53 [PATCH 0/2] ARM: imx: kconfig changes for cpufreq-cpu0 Markus Pargmann
2013-03-10 16:53 ` [PATCH 1/2] ARM: imx27, imx5: Add kconfig selects " Markus Pargmann
2013-03-10 16:53 ` [PATCH 2/2] ARM: imx: Disable imx-cpufreq when cpufreq-cpu0 used Markus Pargmann
2013-03-10 22:51   ` Sascha Hauer
2013-03-11  6:36     ` Shawn Guo
2013-03-11 18:44     ` Markus Pargmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).