[PATCH v3 1/5] powerpc/dts: add mcke-gpios for PM feature

2016-08-02 Thread Chenhui Zhao
Signed-off-by: Chenhui Zhao <chenhui.z...@nxp.com> --- Documentation/devicetree/bindings/soc/fsl/rcpm.txt | 13 + arch/powerpc/boot/dts/fsl/t1040si-post.dtsi| 3 +++ 2 files changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/fsl/rcpm.

[PATCH v3 5/5] powerpc/pm: save and restore registers during deep sleep

2016-08-02 Thread Chenhui Zhao
Some CCSR registers will lost during deep sleep. Therefore, should save them before entering deep sleep, and restore them when resuming from deep sleep. Signed-off-by: Tang Yuantian <yuantian.t...@nxp.com> Signed-off-by: Chenhui Zhao <chenhui.z...@nxp.com> --- arch/powerpc/include/

[PATCH v3 3/5] powerpc: pm: add EPU FSM configuration for deep sleep

2016-08-02 Thread Chenhui Zhao
precedure. This patch configure the EPU FSM preparing for deep sleep. Signed-off-by: Chenhui Zhao <chenhui.z...@nxp.com> --- arch/powerpc/platforms/85xx/Makefile| 2 +- arch/powerpc/platforms/85xx/sleep_fsm.c | 267 arch/powerpc/platforms/85xx/sleep_fsm.h

[PATCH v3 1/5] powerpc/dts: add mcke-gpios for PM feature

2016-08-02 Thread Chenhui Zhao
Signed-off-by: Chenhui Zhao <chenhui.z...@nxp.com> --- Documentation/devicetree/bindings/soc/fsl/rcpm.txt | 13 + arch/powerpc/boot/dts/fsl/t1040si-post.dtsi| 3 +++ 2 files changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/fsl/rcpm.

[PATCH v3 4/5] powerpc/pm: support deep sleep feature on T104x

2016-08-02 Thread Chenhui Zhao
access. This piece of code and related TLBs are prefetched in advance. Due to the different initialization code between 32-bit and 64-bit, they have separate resume entry and precedure. The feature supports 32-bit and 64-bit kernel mode. Signed-off-by: Chenhui Zhao <chenhui.z...@nxp.com> ---

[PATCH v3 2/5] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM

2016-08-02 Thread Chenhui Zhao
off-by: Chenhui Zhao <chenhui.z...@nxp.com> --- arch/powerpc/Kconfig | 3 +- arch/powerpc/include/asm/fsl_pm.h | 2 +- arch/powerpc/platforms/85xx/Kconfig| 5 +++ arch/powerpc/platforms/85xx/Makefile | 1 + arch/powerpc/platforms/85xx/qoriq_

[PATCH v3 0/5] powerpc/pm: QorIQ deep sleep

2016-08-02 Thread Chenhui Zhao
http://patchwork.ozlabs.org/patch/502548/ [4/4] powerpc: pm: support deep sleep feature on T104x http://patchwork.ozlabs.org/patch/502550/ Chenhui Zhao (5): powerpc/dts: add mcke-gpios for PM feature powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM powerpc: pm: add EPU FSM

Re: [PATCH v2 0/5] powerpc/pm: QorIQ deep sleep

2016-04-26 Thread Chenhui Zhao
Any comment? Thanks, Chenhui From: Chenhui Zhao <chenhui.z...@nxp.com> Sent: Friday, April 15, 2016 7:13 PM To: linuxppc-dev@lists.ozlabs.org; o...@buserror.net Cc: Zhengxiong Jin; Chenhui Zhao Subject: [PATCH v2 0/5] powerpc/pm: QorIQ deep

Re: [PATCH v2 3/5] powerpc/dts: add a compatible string to gpio0

2016-04-20 Thread Chenhui Zhao
Thank you for your comment. I'll change it according to the GPIO binding document. Thanks, Chenhui From: Yang-Leo Li Sent: Saturday, April 16, 2016 12:47 AM To: Chenhui Zhao; linuxppc-dev@lists.ozlabs.org; o...@buserror.net Cc: Chenhui Zhao; Zhengxiong

[PATCH v2 1/5] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM

2016-04-15 Thread Chenhui Zhao
off-by: Chenhui Zhao <chenhui.z...@nxp.com> --- arch/powerpc/Kconfig | 3 +- arch/powerpc/include/asm/fsl_pm.h | 2 +- arch/powerpc/platforms/85xx/Kconfig| 5 +++ arch/powerpc/platforms/85xx/Makefile | 1 + arch/powerpc/platforms/85xx/qoriq_

[PATCH v2 4/5] powerpc/pm: support deep sleep feature on T104x

2016-04-15 Thread Chenhui Zhao
access. This piece of code and related TLBs are prefetched in advance. Due to the different initialization code between 32-bit and 64-bit, they have separate resume entry and precedure. The feature supports 32-bit and 64-bit kernel mode. Signed-off-by: Chenhui Zhao <chenhui.z...@nxp.com> ---

[PATCH v2 5/5] powerpc/pm: save and restore registers during deep sleep

2016-04-15 Thread Chenhui Zhao
Some CCSR registers will lost during deep sleep. Therefore, should save them before entering deep sleep, and restore them when resuming from deep sleep. Signed-off-by: Tang Yuantian <yuantian.t...@nxp.com> Signed-off-by: Chenhui Zhao <chenhui.z...@nxp.com> --- arch/powerpc/include/

[PATCH v2 0/5] powerpc/pm: QorIQ deep sleep

2016-04-15 Thread Chenhui Zhao
on T104x http://patchwork.ozlabs.org/patch/502550/ Chenhui Zhao (5): powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM powerpc: pm: add EPU FSM configuration for deep sleep powerpc/dts: add a compatible string to gpio0 powerpc/pm: support deep sleep feature on T104x powerpc/pm

[PATCH v2 2/5] powerpc: pm: add EPU FSM configuration for deep sleep

2016-04-15 Thread Chenhui Zhao
precedure. This patch configure the EPU FSM preparing for deep sleep. Signed-off-by: Chenhui Zhao <chenhui.z...@nxp.com> --- arch/powerpc/platforms/85xx/Makefile| 2 +- arch/powerpc/platforms/85xx/sleep_fsm.c | 267 arch/powerpc/platforms/85xx/sleep_fsm.h

[PATCH] powerpc/dts: fix rcpm compatible string

2016-04-15 Thread Chenhui Zhao
For T1040, T1042, T1023, and T1024, they should use the compatible string "fsl,qoriq-rcpm-2.1". Signed-off-by: Chenhui Zhao <chenhui.z...@nxp.com> --- arch/powerpc/boot/dts/fsl/t1023si-post.dtsi | 2 +- arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 2 +- 2 files changed, 2

[PATCH v2 3/5] powerpc/dts: add a compatible string to gpio0

2016-04-15 Thread Chenhui Zhao
All gpio nodes used the same compatible string "fsl,qoriq-gpio". To identify the node corresponding to the GPIO1 pins, add a compatible string "fsl,qoriq-gpio-1". Signed-off-by: Chenhui Zhao <chenhui.z...@nxp.com> --- arch/powerpc/boot/dts/fsl/qoriq-gpio-0.dtsi

[PATCH v4 1/6] powerpc/mm: any thread in one core can be the first to setup TLB1

2015-12-23 Thread Chenhui Zhao
On e6500, in the case of cpu hotplug, either thread in one core may be the first thread initilzing the TLB1. The subsequent threads must not setup it again. The code is derived from the comment of Scott Wood. Signed-off-by: Chenhui Zhao <chenhui.z...@freescale.com> --- Changes for v4: *

Re: [PATCH v3 1/6] powerpc/mm: any thread in one core can be the first to setup TLB1

2015-12-03 Thread Chenhui Zhao
On Wed, Dec 2, 2015 at 8:12 PM, Denis Kirjanov <k...@linux-powerpc.org> wrote: On 11/20/15, Chenhui Zhao <chenhui.z...@freescale.com> wrote: On e6500, in the case of cpu hotplug, either thread in one core may be the first thread initilzing the TLB1. The subsequent threads mu

Re: [PATCH v3 1/6] powerpc/mm: any thread in one core can be the first to setup TLB1

2015-12-02 Thread Chenhui Zhao
Hi Scott, Any comment on these pathes? Thanks, Chenhui On Fri, Nov 20, 2015 at 5:13 PM, Chenhui Zhao <chenhui.z...@freescale.com> wrote: On e6500, in the case of cpu hotplug, either thread in one core may be the first thread initilzing the TLB1. The subsequent threads must not

[PATCH v3 4/6] powerpc/mpc85xx: refactor the PM operations

2015-11-20 Thread Chenhui Zhao
Freescale CoreNet-based and Non-CoreNet-based platforms require different PM operations. This patch extracted existing PM operations on Non-CoreNet-based platforms to a new file which can accommodate both platforms. In this way, PM operation codes are clearer structurally. Signed-off-by: Chenhui

[PATCH v3 2/6] powerpc/cache: add cache flush operation for various e500

2015-11-20 Thread Chenhui Zhao
caches inside the current cpu. Signed-off-by: Chenhui Zhao <chenhui.z...@freescale.com> Signed-off-by: Tang Yuantian <yuantian.t...@feescale.com> --- Changes for v3: * remove unnecessary ifdef arch/powerpc/include/asm/cacheflush.h | 2 - arch/powerpc/include/asm/cputable.h

[PATCH v3 3/6] powerpc/rcpm: add RCPM driver

2015-11-20 Thread Chenhui Zhao
* + * Copyright 2012-2015 Freescale Semiconductor Inc. + * + * Author: Chenhui Zhao <chenhui.z...@freescale.com> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; e

[PATCH v3 6/6] powerpc/mpc85xx: Add CPU hotplug support for E6500

2015-11-20 Thread Chenhui Zhao
Support Freescale E6500 core-based platforms, like t4240. Support disabling/enabling individual CPU thread dynamically. Signed-off-by: Chenhui Zhao <chenhui.z...@freescale.com> --- changes for v3 * rebase patches on the latest code * add const for info in wake_hw_thread() * use r8 instead

[PATCH v3 1/6] powerpc/mm: any thread in one core can be the first to setup TLB1

2015-11-20 Thread Chenhui Zhao
On e6500, in the case of cpu hotplug, either thread in one core may be the first thread initilzing the TLB1. The subsequent threads must not setup it again. The code is derived from the comment of Scott Wood. Signed-off-by: Chenhui Zhao <chenhui.z...@freescale.com> --- arch/powerpc/inclu

[PATCH v3 5/6] powerpc/mpc85xx: Add hotplug support on E5500 and E500MC cores

2015-11-20 Thread Chenhui Zhao
Freescale E500MC and E5500 core-based platforms, like P4080, T1040, support disabling/enabling CPU dynamically. This patch adds this feature on those platforms. Signed-off-by: Chenhui Zhao <chenhui.z...@freescale.com> Signed-off-by: Tang Yuantian <yuantian.t...@feescale.com> --- ch

Re: [PATCH v2,5/5] PowerPC/mpc85xx: Add CPU hotplug support for E6500

2015-08-27 Thread Chenhui Zhao
On Thu, Aug 27, 2015 at 6:42 AM, Scott Wood scottw...@freescale.com wrote: On Wed, Aug 26, 2015 at 08:09:48PM +0800, Chenhui Zhao wrote: + .globl booting_thread_hwid +booting_thread_hwid: + .long INVALID_THREAD_HWID + .align 3 The commit message goes into no detail

Re: [PATCH v2,4/5] PowerPC/mpc85xx: Add hotplug support on E5500 and E500MC cores

2015-08-27 Thread Chenhui Zhao
On Thu, Aug 27, 2015 at 4:55 AM, Scott Wood scottw...@freescale.com wrote: On Wed, Aug 26, 2015 at 08:09:47PM +0800, Chenhui Zhao wrote: +int check_cpu_dead(unsigned int cpu) +{ + return per_cpu(cpu_state, cpu) == CPU_DEAD; +} I'm not sure this needs to be a function versus open

[PATCH v2,3/5] Powerpc: mpc85xx: refactor the PM operations

2015-08-26 Thread Chenhui Zhao
Freescale CoreNet-based and Non-CoreNet-based platforms require different PM operations. This patch extracted existing PM operations on Non-CoreNet-based platforms to a new file which can accommodate both platforms. In this way, PM operation codes are clearer structurally. Signed-off-by: Chenhui

[PATCH v2, 1/5] powerpc/cache: add cache flush operation for various e500

2015-08-26 Thread Chenhui Zhao
caches inside the current cpu. Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com Signed-off-by: Tang Yuantian yuantian.t...@feescale.com --- arch/powerpc/include/asm/cacheflush.h | 2 - arch/powerpc/include/asm/cputable.h | 11 +++ arch/powerpc/kernel/asm-offsets.c | 3

[PATCH v2,2/5] powerpc/rcpm: add RCPM driver

2015-08-26 Thread Chenhui Zhao
000..ed59881 --- /dev/null +++ b/arch/powerpc/sysdev/fsl_rcpm.c @@ -0,0 +1,390 @@ +/* + * RCPM(Run Control/Power Management) support + * + * Copyright 2012-2015 Freescale Semiconductor Inc. + * + * Author: Chenhui Zhao chenhui.z...@freescale.com + * + * This program is free software; you can

[PATCH v2,5/5] PowerPC/mpc85xx: Add CPU hotplug support for E6500

2015-08-26 Thread Chenhui Zhao
Support Freescale E6500 core-based platforms, like t4240. Support disabling/enabling individual CPU thread dynamically. Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- major changes for v2: * start Thread1 by Thread0 when we want to boot Thread1 only replacing the method of changing

[PATCH v2, 4/5] PowerPC/mpc85xx: Add hotplug support on E5500 and E500MC cores

2015-08-26 Thread Chenhui Zhao
Freescale E500MC and E5500 core-based platforms, like P4080, T1040, support disabling/enabling CPU dynamically. This patch adds this feature on those platforms. Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com Signed-off-by: Tang Yuantian yuantian.t...@feescale.com --- major changes for v2

Re: [PATCH 1/3] Powerpc: mpc85xx: refactor the PM operations

2015-08-06 Thread Chenhui Zhao
On Fri, Aug 7, 2015 at 2:02 AM, Scott Wood scottw...@freescale.com wrote: On Thu, 2015-08-06 at 13:54 +0800, Chenhui Zhao wrote: On Thu, Aug 6, 2015 at 1:46 PM, Scott Wood scottw...@freescale.com wrote: On Thu, 2015-08-06 at 12:20 +0800, Chenhui Zhao wrote: On Thu, Aug 6, 2015 at 10

Re: [PATCH 2/3] PowerPC/mpc85xx: Add hotplug support on E5500 and E500MC cores

2015-08-05 Thread Chenhui Zhao
On Tue, Aug 4, 2015 at 5:18 AM, Scott Wood scottw...@freescale.com wrote: [Added linuxppc-dev@lists.ozlabs.org. Besides that list being required for review of PPC patches, it feeds the patchwork that I use to track and apply patches.] On Mon, 2015-08-03 at 19:52 +0800, Chenhui Zhao wrote

Re: [PATCH 3/3] PowerPC/mpc85xx: Add hotplug support on E6500 cores

2015-08-05 Thread Chenhui Zhao
On Thu, Aug 6, 2015 at 11:16 AM, Scott Wood scottw...@freescale.com wrote: On Wed, 2015-08-05 at 19:08 +0800, Chenhui Zhao wrote: On Sat, Aug 1, 2015 at 8:22 AM, Scott Wood scottw...@freescale.com wrote: On Fri, 2015-07-31 at 17:20 +0800, b29983@freescale.comwrote

Re: [PATCH 1/3] Powerpc: mpc85xx: refactor the PM operations

2015-08-05 Thread Chenhui Zhao
On Thu, Aug 6, 2015 at 1:46 PM, Scott Wood scottw...@freescale.com wrote: On Thu, 2015-08-06 at 12:20 +0800, Chenhui Zhao wrote: On Thu, Aug 6, 2015 at 10:57 AM, Scott Wood scottw...@freescale.com wrote: On Wed, 2015-08-05 at 18:11 +0800, Chenhui Zhao wrote: On Tue, Aug 4, 2015 at 4

Re: [PATCH 1/3] Powerpc: mpc85xx: refactor the PM operations

2015-08-05 Thread Chenhui Zhao
On Thu, Aug 6, 2015 at 10:57 AM, Scott Wood scottw...@freescale.com wrote: On Wed, 2015-08-05 at 18:11 +0800, Chenhui Zhao wrote: On Tue, Aug 4, 2015 at 4:26 AM, Scott Wood scottw...@freescale.com wrote: On Mon, 2015-08-03 at 19:32 +0800, Chenhui Zhao wrote: On Sat, Aug 1

Re: [PATCH v5] powerpc/rcpm: add RCPM driver

2015-08-03 Thread Chenhui Zhao
On Tue, Aug 4, 2015 at 4:23 AM, Scott Wood scottw...@freescale.com wrote: On Mon, 2015-08-03 at 19:14 +0800, Chenhui Zhao wrote: On Sat, Aug 1, 2015 at 8:45 AM, Scott Wood scottw...@freescale.com wrote: On Fri, 2015-06-26 at 15:44 +0800, Yuantian.Tang@freescale.comwrote: +static

Re: [PATCH] powerpc/85xx: add sleep and deep sleep support

2015-08-03 Thread Chenhui Zhao
On Sat, Aug 1, 2015 at 10:57 AM, Scott Wood scottw...@freescale.com wrote: On Fri, 2015-07-24 at 20:46 +0800, Chenhui Zhao wrote: +static void mpc85xx_pmc_set_wake(struct device *dev, void *enable) { int ret; + u32 value[2]; + + if (!device_may_wakeup(dev

Re: [PATCH 3/4] powerpc: pm: add EPU FSM configuration for deep sleep

2015-08-03 Thread Chenhui Zhao
On Sat, Aug 1, 2015 at 8:41 AM, Scott Wood scottw...@freescale.com wrote: On Fri, 2015-07-31 at 20:53 +0800, Chenhui Zhao wrote: In the last stage of deep sleep, software will trigger a Finite State Machine (FSM) to control the hardware precedure, such as board isolation, killing PLLs

Re: [PATCH v5] powerpc/rcpm: add RCPM driver

2015-08-03 Thread Chenhui Zhao
On Sat, Aug 1, 2015 at 8:45 AM, Scott Wood scottw...@freescale.com wrote: On Fri, 2015-06-26 at 15:44 +0800, yuantian.t...@freescale.com wrote: +static void rcpm_v1_set_ip_power(bool enable, u32 *mask) +{ + if (enable) + setbits32(rcpm_v1_regs-ippdexpcr, *mask); +

[PATCH 1/4] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM

2015-07-31 Thread Chenhui Zhao
-by: Chenhui Zhao chenhui.z...@freescale.com --- Note: This patch set is based on CPU hotplug patches. arch/powerpc/Kconfig | 3 +- arch/powerpc/platforms/85xx/Kconfig| 5 +++ arch/powerpc/platforms/85xx/Makefile | 1 + arch/powerpc/platforms/85xx/qoriq_pm.c | 59

[PATCH 4/4] powerpc: pm: support deep sleep feature on T104x

2015-07-31 Thread Chenhui Zhao
access. This piece of code and related TLBs are prefetched in advance. Due to the different initialization code between 32-bit and 64-bit, they have separate resume entry and precedure. The feature supports 32-bit and 64-bit kernel mode. Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- arch

[PATCH 3/4] powerpc: pm: add EPU FSM configuration for deep sleep

2015-07-31 Thread Chenhui Zhao
precedure. This patch configure the EPU FSM preparing for deep sleep. Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- arch/powerpc/platforms/85xx/Makefile| 2 +- arch/powerpc/platforms/85xx/sleep_fsm.c | 256 arch/powerpc/platforms/85xx/sleep_fsm.h | 104

[PATCH 2/4] powerpc: get the physical base address of DCSR

2015-07-31 Thread Chenhui Zhao
Add get_dcsrbase() to get the physical base address of DCSR. Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- arch/powerpc/sysdev/fsl_soc.c | 31 +++ arch/powerpc/sysdev/fsl_soc.h | 1 + 2 files changed, 32 insertions(+) diff --git a/arch/powerpc/sysdev

[PATCH] powerpc/85xx: add sleep and deep sleep support

2015-07-24 Thread Chenhui Zhao
of Linux Power Management. Command to enter sleep mode. echo standby /sys/power/state Command to enter deep sleep mode. echo mem /sys/power/state Signed-off-by: Li Yang le...@freescale.com Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- arch/powerpc/include/asm/cacheflush.h

[PATCH] powerpc/corenet: use the mixed mode of MPIC when enabling CPU hotplug

2015-07-22 Thread Chenhui Zhao
Core reset may cause issue if using the proxy mode of MPIC. Use the mixed mode of MPIC if enabling CPU hotplug. Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- arch/powerpc/platforms/85xx/corenet_generic.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc

[PATCH 1/4] powerpc/cache: add cache flush operation for various e500

2015-03-26 Thread Chenhui Zhao
caches inside the current cpu. Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- arch/powerpc/include/asm/cacheflush.h | 2 - arch/powerpc/include/asm/cputable.h | 11 +++ arch/powerpc/kernel/asm-offsets.c | 3 + arch/powerpc/kernel/cpu_setup_fsl_booke.S | 114

[PATCH 3/4] powerpc: support CPU hotplug for e500mc, e5500 and e6500

2015-03-26 Thread Chenhui Zhao
power state). When the core is up again, Thread0 is up first, and it will be bound with the present booting cpu. This way, all CPUs can hotplug separately. Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/fsl_pm.h | 4

[PATCH 2/4] powerpc/rcpm: add RCPM driver

2015-03-26 Thread Chenhui Zhao
mode 100644 index 000..e30f1bc --- /dev/null +++ b/arch/powerpc/sysdev/fsl_rcpm.c @@ -0,0 +1,353 @@ +/* + * RCPM(Run Control/Power Management) support + * + * Copyright 2012-2015 Freescale Semiconductor Inc. + * + * Author: Chenhui Zhao chenhui.z...@freescale.com + * + * This program is free

[PATCH 4/4] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM

2015-03-26 Thread Chenhui Zhao
-by: Chenhui Zhao chenhui.z...@freescale.com --- arch/powerpc/Kconfig | 3 +- arch/powerpc/platforms/85xx/Kconfig| 5 +++ arch/powerpc/platforms/85xx/Makefile | 1 + arch/powerpc/platforms/85xx/qoriq_pm.c | 59 ++ arch/powerpc/platforms/86xx/Kconfig

Re: [PATCH 7/9] fsl: add EPU FSM configuration for deep sleep

2014-03-18 Thread Chenhui Zhao
On Tue, Mar 18, 2014 at 06:21:22PM -0500, Scott Wood wrote: On Mon, 2014-03-17 at 18:27 +0800, Chenhui Zhao wrote: On Fri, Mar 14, 2014 at 05:51:09PM -0500, Scott Wood wrote: On Wed, 2014-03-12 at 16:34 +0800, Chenhui Zhao wrote: On Tue, Mar 11, 2014 at 07:08:43PM -0500, Scott Wood wrote

Re: [PATCH 9/9] powerpc/pm: support deep sleep feature on T1040

2014-03-18 Thread Chenhui Zhao
On Tue, Mar 18, 2014 at 05:42:09PM -0500, Scott Wood wrote: On Mon, 2014-03-17 at 19:19 +0800, Chenhui Zhao wrote: On Fri, Mar 14, 2014 at 06:18:27PM -0500, Scott Wood wrote: On Wed, 2014-03-12 at 18:40 +0800, Chenhui Zhao wrote: On Tue, Mar 11, 2014 at 08:10:24PM -0500, Scott Wood wrote

Re: [PATCH 5/9] powerpc/85xx: disable irq by hardware when suspend for 64-bit

2014-03-17 Thread Chenhui Zhao
On Fri, Mar 14, 2014 at 05:41:41PM -0500, Scott Wood wrote: On Wed, 2014-03-12 at 15:46 +0800, Chenhui Zhao wrote: On Tue, Mar 11, 2014 at 06:51:20PM -0500, Scott Wood wrote: On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote: In 64-bit mode, kernel just clears the irq soft-enable

Re: [PATCH 7/9] fsl: add EPU FSM configuration for deep sleep

2014-03-17 Thread Chenhui Zhao
On Fri, Mar 14, 2014 at 05:51:09PM -0500, Scott Wood wrote: On Wed, 2014-03-12 at 16:34 +0800, Chenhui Zhao wrote: On Tue, Mar 11, 2014 at 07:08:43PM -0500, Scott Wood wrote: On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote: From: Hongbo Zhang hongbo.zh...@freescale.com

Re: [PATCH 8/9] powerpc/85xx: add save/restore functions for core registers

2014-03-17 Thread Chenhui Zhao
On Fri, Mar 14, 2014 at 06:01:45PM -0500, Scott Wood wrote: On Wed, 2014-03-12 at 17:42 +0800, Chenhui Zhao wrote: On Tue, Mar 11, 2014 at 07:45:14PM -0500, Scott Wood wrote: On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote: From: Wang Dongsheng dongsheng.w...@freescale.com

Re: [PATCH 9/9] powerpc/pm: support deep sleep feature on T1040

2014-03-17 Thread Chenhui Zhao
On Fri, Mar 14, 2014 at 06:18:27PM -0500, Scott Wood wrote: On Wed, 2014-03-12 at 18:40 +0800, Chenhui Zhao wrote: On Tue, Mar 11, 2014 at 08:10:24PM -0500, Scott Wood wrote: On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote: From: Zhao Chenhui chenhui.z...@freescale.com

Re: [PATCH 5/9] powerpc/85xx: disable irq by hardware when suspend for 64-bit

2014-03-12 Thread Chenhui Zhao
On Tue, Mar 11, 2014 at 06:51:20PM -0500, Scott Wood wrote: On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote: In 64-bit mode, kernel just clears the irq soft-enable flag in struct paca_struct to disable external irqs. But, in the case of suspend, irqs should be disabled by hardware

Re: [PATCH 6/9] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM

2014-03-12 Thread Chenhui Zhao
On Tue, Mar 11, 2014 at 07:00:27PM -0500, Scott Wood wrote: On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote: In sleep mode, the clocks of e500 cores and unused IP blocks is turned off. The IP blocks which are allowed to wake up the processor are still running. The sleep mode

Re: [PATCH 7/9] fsl: add EPU FSM configuration for deep sleep

2014-03-12 Thread Chenhui Zhao
On Tue, Mar 11, 2014 at 07:08:43PM -0500, Scott Wood wrote: On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote: From: Hongbo Zhang hongbo.zh...@freescale.com In the last stage of deep sleep, software will trigger a Finite State Machine (FSM) to control the hardware precedure

Re: [PATCH 8/9] powerpc/85xx: add save/restore functions for core registers

2014-03-12 Thread Chenhui Zhao
On Tue, Mar 11, 2014 at 07:45:14PM -0500, Scott Wood wrote: On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote: From: Wang Dongsheng dongsheng.w...@freescale.com Add booke_cpu_state_save() and booke_cpu_state_restore() functions which can be used to save/restore CPU's registers

Re: [PATCH 9/9] powerpc/pm: support deep sleep feature on T1040

2014-03-12 Thread Chenhui Zhao
On Tue, Mar 11, 2014 at 08:10:24PM -0500, Scott Wood wrote: On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote: From: Zhao Chenhui chenhui.z...@freescale.com T1040 supports deep sleep feature, which can switch off most parts of the SoC when it is in deep sleep mode. This way

Re: [PATCH 3/9] powerpc/rcpm: add RCPM driver

2014-03-11 Thread Chenhui Zhao
On Tue, Mar 11, 2014 at 06:42:51PM -0500, Scott Wood wrote: On Fri, 2014-03-07 at 12:57 +0800, Chenhui Zhao wrote: diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c b/arch/powerpc/platforms/85xx/corenet_generic.c index b756f3d..3fdf9f3 100644 --- a/arch/powerpc/platforms/85xx

Re: [PATCH 4/9] powerpc/85xx: support CPU hotplug for e500mc and e5500

2014-03-11 Thread Chenhui Zhao
On Tue, Mar 11, 2014 at 06:48:13PM -0500, Scott Wood wrote: On Fri, 2014-03-07 at 12:58 +0800, Chenhui Zhao wrote: diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index ac2621a..f3f4401 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -405,8

[PATCH 4/9] powerpc/85xx: support CPU hotplug for e500mc and e5500

2014-03-06 Thread Chenhui Zhao
Implemented CPU hotplug on e500mc and e5500. On e5500 both 32-bit and 64-bit modes can work. Used some callback functions implemented in RCPM driver. Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- arch/powerpc/Kconfig |2 +- arch/powerpc/kernel/smp.c |6

[PATCH 5/9] powerpc/85xx: disable irq by hardware when suspend for 64-bit

2014-03-06 Thread Chenhui Zhao
In 64-bit mode, kernel just clears the irq soft-enable flag in struct paca_struct to disable external irqs. But, in the case of suspend, irqs should be disabled by hardware. Therefore, hook a function to ppc_md.suspend_disable_irqs to really disable irqs. Signed-off-by: Chenhui Zhao chenhui.z

[PATCH 3/9] powerpc/rcpm: add RCPM driver

2014-03-06 Thread Chenhui Zhao
of register map in RCPM, which is specified by the compatible entry in the RCPM node of device tree. Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- arch/powerpc/include/asm/fsl_guts.h | 105 arch/powerpc/platforms/85xx/Kconfig |1 + arch/powerpc

[PATCH 6/9] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM

2014-03-06 Thread Chenhui Zhao
-by: Chenhui Zhao chenhui.z...@freescale.com --- arch/powerpc/Kconfig |4 +- arch/powerpc/platforms/85xx/Makefile |3 + arch/powerpc/platforms/85xx/qoriq_pm.c | 78 3 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 arch

[PATCH 7/9] fsl: add EPU FSM configuration for deep sleep

2014-03-06 Thread Chenhui Zhao
the hardware to complete the early resume precedure. This patch configure the EPU FSM preparing for deep sleep. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- arch/powerpc/platforms/85xx/Kconfig |1 + arch/powerpc/sysdev

[PATCH 8/9] powerpc/85xx: add save/restore functions for core registers

2014-03-06 Thread Chenhui Zhao
Dongsheng dongsheng.w...@freescale.com Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- arch/powerpc/include/asm/booke_save_regs.h | 96 arch/powerpc/kernel/Makefile |1 + arch/powerpc/kernel/booke_save_regs.S | 361 3 files

[PATCH 9/9] powerpc/pm: support deep sleep feature on T1040

2014-03-06 Thread Chenhui Zhao
/platforms/85xx/deepsleep.c new file mode 100644 index 000..ddd7185 --- /dev/null +++ b/arch/powerpc/platforms/85xx/deepsleep.c @@ -0,0 +1,201 @@ +/* + * Support deep sleep feature + * + * Copyright 2014 Freescale Semiconductor Inc. + * + * Author: Chenhui Zhao chenhui.z...@freescale.com

[PATCH 2/9] powerpc/cache: add cache flush operation for various e500

2014-03-06 Thread Chenhui Zhao
caches in the current cpu. Signed-off-by: Chenhui Zhao chenhui.z...@freescale.com --- arch/powerpc/include/asm/cacheflush.h |2 - arch/powerpc/include/asm/cputable.h | 11 +++ arch/powerpc/kernel/asm-offsets.c |3 + arch/powerpc/kernel/cpu_setup_fsl_booke.S | 114

[PATCH 1/9] powerpc/fsl: add PVR definition for E500MC and E5500

2014-03-06 Thread Chenhui Zhao
From: Wang Dongsheng dongsheng.w...@freescale.com Signed-off-by: Wang Dongsheng dongsheng.w...@freescale.com --- arch/powerpc/include/asm/reg.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index