[PATCH v8 7/7] powerpc/85xx: add support to JOG feature using cpufreq interface

Kumar Gala galak at kernel.crashing.org
Wed Aug 1 00:21:46 EST 2012


On Jul 20, 2012, at 7:42 AM, Zhao Chenhui wrote:

> Some 85xx silicons like MPC8536 and P1022 have a JOG feature, which provides
> a dynamic mechanism to lower or raise the CPU core clock at runtime.
> 
> This patch adds the support to change CPU frequency using the standard
> cpufreq interface. The ratio CORE to CCB can be 1:1(except MPC8536), 3:2,
> 2:1, 5:2, 3:1, 7:2 and 4:1.
> 
> Two CPU cores on P1022 must not in the low power state during the frequency
> transition. The driver uses a atomic counter to meet the requirement.
> 
> The jog mode frequency transition process on the MPC8536 is similar to
> the deep sleep process. The driver need save the CPU state and restore
> it after CPU warm reset.
> 
> Note:
> * The I/O peripherals such as PCIe and eTSEC may lose packets during
>   the jog mode frequency transition.
> * The driver doesn't support MPC8536 Rev 1.0 due to a JOG erratum.
>   Subsequent revisions of MPC8536 have corrected the erratum.
> 
> Signed-off-by: Dave Liu <daveliu at freescale.com>
> Signed-off-by: Li Yang <leoli at freescale.com>
> Signed-off-by: Jerry Huang <Chang-Ming.Huang at freescale.com>
> Signed-off-by: Zhao Chenhui <chenhui.zhao at freescale.com>
> CC: Scott Wood <scottwood at freescale.com>
> ---
> arch/powerpc/platforms/85xx/Makefile      |    1 +
> arch/powerpc/platforms/85xx/cpufreq-jog.c |  388 +++++++++++++++++++++++++++++
> arch/powerpc/platforms/Kconfig            |   11 +
> arch/powerpc/sysdev/fsl_pmc.c             |    3 +
> arch/powerpc/sysdev/fsl_soc.h             |    2 +
> include/linux/cpu.h                       |    4 +
> 6 files changed, 409 insertions(+), 0 deletions(-)
> create mode 100644 arch/powerpc/platforms/85xx/cpufreq-jog.c

[snip]

> diff --git a/include/linux/cpu.h b/include/linux/cpu.h
> index 2e9b9eb..c1ba260 100644
> --- a/include/linux/cpu.h
> +++ b/include/linux/cpu.h
> @@ -145,6 +145,8 @@ void notify_cpu_starting(unsigned int cpu);
> extern void cpu_maps_update_begin(void);
> extern void cpu_maps_update_done(void);
> 
> +extern void cpu_hotplug_disable_before_freeze(void);
> +extern void cpu_hotplug_enable_after_thaw(void);
> #else	/* CONFIG_SMP */
> 
> #define cpu_notifier(fn, pri)	do { (void)(fn); } while (0)
> @@ -166,6 +168,8 @@ static inline void cpu_maps_update_done(void)
> {
> }
> 
> +static inline void cpu_hotplug_disable_before_freeze(void)	{}
> +static inline void cpu_hotplug_enable_after_thaw(void)	{}
> #endif /* CONFIG_SMP */
> extern struct bus_type cpu_subsys;

Can you pull this change into a separate patch.  I want an ACK by Rafael J. Wysocki on it.

- k


More information about the Linuxppc-dev mailing list