ARM: mx35: add cpufreq support
Subsystems (3)
PATCH 1/1 ARM: mx35: add cpufreq support
This patch adds the mx35 to the supported cpu-families of the "CPUfreq driver for i.MX CPUs".
--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/Makefile | 2 +- arch/arm/mach-imx/clock-imx35.c | 67 +++++++++++++++++++++++++++++++++----- arch/arm/mach-imx/cpu_op-mx35.c | 27 +++++++++++++++ arch/arm/mach-imx/cpu_op-mx35.h | 7 ++++ 5 files changed, 94 insertions(+), 10 deletions(-) create mode 100644 arch/arm/mach-imx/cpu_op-mx35.c create mode 100644 arch/arm/mach-imx/cpu_op-mx35.h
arch/arm/mach-imx/Kconfig +1 -0
@@ -73,6 +73,7 @@ config SOC_IMX35 select HAVE_EPIT select MXC_AVIC select SMP_ON_UP if SMP + select ARCH_HAS_CPUFREQ config SOC_IMX5 select CPU_V7
arch/arm/mach-imx/Makefile +1 -1
@@ -7,7 +7,7 @@ obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o obj-$(CONFIG_SOC_IMX27) += clock-imx27.o mm-imx27.o ehci-imx27.o obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o pm-imx3.o -obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clock-imx35.o ehci-imx35.o pm-imx3.o +obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clock-imx35.o ehci-imx35.o pm-imx3.o cpu_op-mx35.o obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clock-mx51-mx53.o ehci-imx5.o pm-imx5.o cpu_op-mx51.o
arch/arm/mach-imx/clock-imx35.c +58 -9
106 lines not on this page · raw message
arch/arm/mach-imx/cpu_op-mx35.c new file +27 -0
@@ -0,0 +1,27 @@ +/* +* Copyright (C) 2012 PHYTEC Messtechnik GmbH +* +* Licensed under the GPLv2 or (at your option) any later version. +*/ + +#include <linux/bug.h> +#include <linux/types.h> +#include <mach/hardware.h> +#include <linux/kernel.h> + +static struct cpu_op mx35_cpu_op[] = { + { + .cpu_rate =133000000 ,}, + { + .cpu_rate =266000000 ,}, + { + .cpu_rate =399000000 ,}, + { + .cpu_rate =532000000 ,}, +}; + +struct cpu_op *mx35_get_cpu_op (int *op) +{ + *op =ARRAY_SIZE (mx35_cpu_op); +return mx35_cpu_op; +}
arch/arm/mach-imx/cpu_op-mx35.h new file +7 -0
@@ -0,0 +1,7 @@ +/* +* Copyright (C) 2012 PHYTEC Messtechnik GmbH +* +* Licensed under the GPLv2 or (at your option) any later version. +*/ + +extern struct cpu_op *mx35_get_cpu_op (int *op);
Signature · 1 line
1.7.2.5
Sascha Hauer
maintainerQuoted 2 lines · Christoph Fritz
This patch adds the mx35 to the supported cpu-families of the "CPUfreq driver for i.MX CPUs".
I'm afraid this has to wait another cycle since you are patching a file that is scheduled to be replaced with common clock framework support.
This patch contains several #ifdefs which I think can all be removed.
Sascha
Signature · 4 lines
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 |
Hi Sascha,
Quoted 6 lines · Sascha Hauer
Quoted 2 lines · Christoph Fritz
This patch adds the mx35 to the supported cpu-families of the "CPUfreq driver for i.MX CPUs".
I'm afraid this has to wait another cycle since you are patching a file that is scheduled to be replaced with common clock framework support.
Has this "scheduled replacement" somewhere (e.g. calendar) been marked? So that I can check in the future before editing "scheduled files".
Thanks,
-- Christoph
Sascha Hauer
maintainerQuoted 7 lines · Christoph Fritz
Hi Sascha,
Quoted 4 lines · Sascha Hauer
Quoted 2 lines · Christoph Fritz
This patch adds the mx35 to the supported cpu-families of the "CPUfreq driver for i.MX CPUs".
Quoted 6 lines
Quoted 2 lines
I'm afraid this has to wait another cycle since you are patching a file that is scheduled to be replaced with common clock framework support.
Has this "scheduled replacement" somewhere (e.g. calendar) been marked? So that I can check in the future before editing "scheduled files".
The clock framework conversion has been a hot topic for quite a while now, but there hasn't been an official note about it outside the list. I can understand that the occasional linux arm kernel reader is not aware of it, but we currently have nothing in place to anounce such things. (Other than feature-removal.txt which seems not very suitable since no feature is removed, only updated)
Sascha
Signature · 4 lines
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 |
Quoted 15 lines · Sascha Hauer
Quoted 7 lines · Christoph Fritz
Hi Sascha,
Quoted 4 lines · Sascha Hauer
Quoted 2 lines · Christoph Fritz
This patch adds the mx35 to the supported cpu-families of the "CPUfreq driver for i.MX CPUs".
Quoted 6 lines
Quoted 2 lines
I'm afraid this has to wait another cycle since you are patching a file that is scheduled to be replaced with common clock framework support.
Has this "scheduled replacement" somewhere (e.g. calendar) been marked? So that I can check in the future before editing "scheduled files".
Quoted 6 lines
The clock framework conversion has been a hot topic for quite a while now, but there hasn't been an official note about it outside the list. I can understand that the occasional linux arm kernel reader is not aware of it, but we currently have nothing in place to anounce such things. (Other than feature-removal.txt which seems not very suitable since no feature is removed, only updated)
Is there already a version I can rebase the patch?
On your repo at git://git.pengutronix.de/git/imx/linux-2.6.git I can't find the new clock framework or even a work-in-progress version.
Thanks,
-- Christoph
Sascha Hauer
maintainerQuoted 23 lines · Christoph Fritz
Quoted 15 lines · Sascha Hauer
Quoted 7 lines · Christoph Fritz
Hi Sascha,
Quoted 4 lines · Sascha Hauer
Quoted 2 lines · Christoph Fritz
This patch adds the mx35 to the supported cpu-families of the "CPUfreq driver for i.MX CPUs".
Quoted 6 lines
Quoted 2 lines
I'm afraid this has to wait another cycle since you are patching a file that is scheduled to be replaced with common clock framework support.
Has this "scheduled replacement" somewhere (e.g. calendar) been marked? So that I can check in the future before editing "scheduled files".
Quoted 6 lines
The clock framework conversion has been a hot topic for quite a while now, but there hasn't been an official note about it outside the list. I can understand that the occasional linux arm kernel reader is not aware of it, but we currently have nothing in place to anounce such things. (Other than feature-removal.txt which seems not very suitable since no feature is removed, only updated)
Quoted 4 lines
Is there already a version I can rebase the patch?
On your repo at
git://git.pengutronix.de/git/imx/linux-2.6.gitI can't find the new clock framework or even a work-in-progress version.
They are in linux-next now.
Sascha
Signature · 4 lines
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 |
Quoted 8 lines · Sascha Hauer
Quoted 4 lines · Christoph Fritz
Is there already a version I can rebase the patch?
On your repo at
git://git.pengutronix.de/git/imx/linux-2.6.gitI can't find the new clock framework or even a work-in-progress version.They are in linux-next now.
Great, I'll rebase over this weekend.
Thanks,
Christoph
Quoted 9 lines · Christoph Fritz
Quoted 8 lines · Sascha Hauer
Quoted 4 lines · Christoph Fritz
Is there already a version I can rebase the patch?
On your repo at
git://git.pengutronix.de/git/imx/linux-2.6.gitI can't find the new clock framework or even a work-in-progress version.They are in linux-next now.
There changed a lot of stuff: Where should I register the function to set/get the cpu frequency?
To get an idea of how it should be done, I looked at imx51: Is there cpufreq-support still implemented/working? I can see the arch/arm/mach-imx/cpu_op-mx51.c but not its correlating clk_cpu_set_rate function in arch/arm/mach-imx/clk-imx51-imx53.c.
Thanks,
-- Christoph
Quoted 11 lines · Christoph Fritz
Quoted 9 lines · Christoph Fritz
Quoted 8 lines · Sascha Hauer
Quoted 4 lines · Christoph Fritz
Is there already a version I can rebase the patch?
On your repo at
git://git.pengutronix.de/git/imx/linux-2.6.gitI can't find the new clock framework or even a work-in-progress version.They are in linux-next now.
Quoted 7 lines
There changed a lot of stuff: Where should I register the function to set/get the cpu frequency?
To get an idea of how it should be done, I looked at imx51: Is there cpufreq-support still implemented/working? I can see the
arch/arm/mach-imx/cpu_op-mx51.cbut not its correlatingclk_cpu_set_ratefunction inarch/arm/mach-imx/clk-imx51-imx53.c.
*ping*
Thanks,
-- Christoph
Sascha Hauer
maintainerQuoted 14 lines · Christoph Fritz
Quoted 9 lines · Christoph Fritz
Quoted 8 lines · Sascha Hauer
Quoted 4 lines · Christoph Fritz
Is there already a version I can rebase the patch?
On your repo at
git://git.pengutronix.de/git/imx/linux-2.6.gitI can't find the new clock framework or even a work-in-progress version.They are in linux-next now.
There changed a lot of stuff: Where should I register the function to set/get the cpu frequency?
Quoted 6 lines
To get an idea of how it should be done, I looked at imx51: Is there cpufreq-support still implemented/working? I can see the
arch/arm/mach-imx/cpu_op-mx51.cbut not its correlatingclk_cpu_set_ratefunction inarch/arm/mach-imx/clk-imx51-imx53.c.From what I see there must be a clkdev registered for the cpu clock.
Seems this got lost during conversion to the generic clock framework.
in arch/arm/plat-mxc/cpufreq.c:
cpu_clk = clk_get(NULL, "cpu_clk");
should be:
cpu_clk = clk_get(NULL, "cpu");
I don't know if that's enough though.
Sascha
Signature · 4 lines
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 |
PATCH 1/1 ARM: mx35: add cpufreq support
In reply to Christoph FritzHi Christoph,
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
On your repo at
git://git.pengutronix.de/git/imx/linux-2.6.gitI can't find the new clock framework or even a work-in-progress version.They are in linux-next now.
Great, I'll rebase over this weekend.
If you like, please CC me on your next version and I'll try test it.
Cheers,
Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120518/3d27e15b/attachment-0001.html>