[PATCH] powerpc: p1022: add two functions for reset pci slot

2016-01-22 Thread Dongsheng Wang
From: Wang Dongsheng When the DIU enable, only through the way of indirect access to read/write pixis register. So add direct and indirect for pci slot reset. Signed-off-by: Wang Dongsheng diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c index 371df

[PATCH v4] Documentation: dt: binding: fsl: add devicetree binding for describing RCPM

2015-10-25 Thread Dongsheng Wang
From: Wang Dongsheng RCPM is the Run Control and Power Management module performs all device-level tasks associated with device run control and power management. Add this for freescale powerpc platform and layerscape platform. Signed-off-by: Chenhui Zhao Signed-off-by: Tang Yuantian Signed-of

[PATCH] powerpc: Quick fix upstream main line build error on PowerPC

2015-10-08 Thread Dongsheng Wang
From: Wang Dongsheng This issue caused on 'commit 990486c8af04 ("strscpy: zero any trailing garbage bytes in the destination")'. zero_bytemask is not implemented on PowerPC. So copy the zero_bytemask of BIG_ENDIAN implementation from include/asm-generic/word-at-a-time.h to arch/powerpc/include/a

[PATCH v3 2/2] arm/layerscape: add RCPM device tree support for ls1021a.

2015-09-24 Thread Dongsheng Wang
From: Wang Dongsheng Signed-off-by: Wang Dongsheng --- *v3*: Add "fsl,#rcpm-wakeup-cells" for rcpm node. *v2*: No changes. diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index 973a496..ac5f9a2 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls102

[PATCH v3 1/2] fsl: Add binding for RCPM

2015-09-24 Thread Dongsheng Wang
From: Wang Dongsheng RCPM is the Run Control and Power Management module performs all device-level tasks associated with device run control and power management. Add this for freescale powerpc platform and layerscape platform. Signed-off-by: Chenhui Zhao Signed-off-by: Tang Yuantian Signed-of

[PATCH v2 2/2] arm/layerscape: add RCPM device tree support for ls1021a.

2015-09-15 Thread Dongsheng Wang
From: Wang Dongsheng Signed-off-by: Wang Dongsheng --- *v2*: No changes. diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index 973a496..deb1271 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -139,6 +139,7 @@

[PATCH v2 1/2] fsl: Add binding for RCPM

2015-09-15 Thread Dongsheng Wang
From: Wang Dongsheng RCPM is the Run Control and Power Management module performs all device-level tasks associated with device run control and power management. Add this for freescale powerpc platform and layerscape platform. Signed-off-by: Chenhui Zhao Signed-off-by: Tang Yuantian Signed-of

[PATCH 2/2] arm/layerscape: add RCPM device tree support for ls1021a.

2015-09-09 Thread Dongsheng Wang
From: Wang Dongsheng Signed-off-by: Wang Dongsheng diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index 973a496..deb1271 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -139,6 +139,7 @@ sdhci,auto-cmd12;

[PATCH 1/2] fsl: Add binding for RCPM

2015-09-09 Thread Dongsheng Wang
From: Wang Dongsheng RCPM is the Run Control and Power Management module performs all device-level tasks associated with device run control and power management. Add this for freescale powerpc platform and layerscape platform. Signed-off-by: Chenhui Zhao Signed-off-by: Tang Yuantian Signed-of

[PATCH] powerpc: Add a vga alias node for P1022

2015-08-17 Thread Dongsheng Wang
From: Jason Jin In u-boot, when set the video as console, the name 'vga' is used as a general name for the video device, during the fdt_fixup_stdout process, the 'vga' name is used to search in the dtb to setup the 'linux,stdout-path' node. Though the P1022 DIU is not VGA-compatible device, to me

[PATCH v2] video: fbdev: fsl: Fix the sleep function for FSL DIU module

2015-08-13 Thread Dongsheng Wang
From: Jason Jin For deep sleep, the diu module will power off, when wake up from the deep sleep, the registers need to be reinitialized. Signed-off-by: Jason Jin Signed-off-by: Wang Dongsheng --- *v2* Changes: - int i -> unsigned int i. Rmove: - struct mfb_info *mfbi; diff --git a/drivers/vi

[PATCH v2 1/2] powerpc/85xx: Add binding for SCFG

2015-08-13 Thread Dongsheng Wang
From: Wang Dongsheng SCFG provides SoC specific configuration and status registers for the chip. Add this for powerpc platform. Signed-off-by: Wang Dongsheng --- *V2* - Remove scfg description in board.txt and create scfg.txt for scfg. - Change "fsl,-scfg" to "fsl,-scfg" diff --git a/Documenta

[PATCH v2 2/2] powerpc/mpc85xx:Add SCFG device tree support of T104x

2015-08-13 Thread Dongsheng Wang
From: Wang Dongsheng Signed-off-by: Wang Dongsheng --- *V2* No changes. diff --git a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi index 9e9f7e2..9770d02 100644 --- a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi +++ b/arch/powerpc/boot/dts/fsl/t1040si-

[RESEND] powerpc/diu: adjust DIU initialization entry

2015-07-07 Thread Dongsheng Wang
From: Wang Dongsheng Move fsl_diu_init into diu probe function, because it should be initialized when system get diu device tree node, not always do initialization. Signed-off-by: Wang Dongsheng --- Changes: Rebase original patch for upstream because fsl-diu-fb.c has moved to fbdev dir. This p

[PATCH] powerpc/fsl: add power_off support for fsl platform

2015-02-03 Thread Dongsheng Wang
From: Wang Dongsheng QIXIS System Logic FPGA support to manage system power. So we through QIXIS to power off freescale SOC. Signed-off-by: Wang Dongsheng diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c b/arch/powerpc/platforms/85xx/corenet_generic.c index 1f309cc..e1a1eb5 100644 -

[PATCH] fsl/smp: add low power boot support to replace spin boot

2015-01-14 Thread Dongsheng Wang
From: Wang Dongsheng U-boot put non-boot cpus into an low power state(PW10/PW20 or DOZE) when cpu powered up. To exit low power state kernel will send DOORBELL or MPIC-IPI signal to all those CPUs. e500/e500v2 use mpic to send IPI signal. e500mc and later use doorbell to send IPI signal. This f

[PATCH] powerpc/smp: Fix Non-boot cpus cannot be bring up.

2014-12-22 Thread Dongsheng Wang
From: Wang Dongsheng Kernel cannot bring up Non-boot cpus always get "Processor xx is stuck". this issue bring by http://patchwork.ozlabs.org/patch/418912/ (powerpc: Secondary CPUs must set cpu_callin_map after setting active and online) We need to take timebase after bootup cpu give the timebase

[PATCH v2 2/2] fsl/mpic_timer: make mpic_timer to support deep sleep feature

2014-04-23 Thread Dongsheng Wang
From: Wang Dongsheng At T104x platfrom the timer clock will be changed from platform_clock to sys_ref_clock when system going to deep sleep. So before system going to deep sleep, we need to change time to adapt to the new frequency that is sys_ref_clock. And after resume from deep sleep, restore

[PATCH v2 1/2] powerpc/pm: add api to get suspend state which is STANDBY or MEM

2014-04-23 Thread Dongsheng Wang
From: Wang Dongsheng Add set_pm_suspend_state & pm_suspend_state functions to set/get suspend state. When system going to sleep or deep sleep, devices can get the system suspend state(STANDBY/MEM) through pm_suspend_state function and to handle different situations. Signed-off-by: Wang Dongsheng

[PATCH] powerpc/diu: adjust DIU initialization entry

2014-04-18 Thread Dongsheng Wang
From: Wang Dongsheng Move fsl_diu_init into diu probe function, because it should be initialized when system get diu device tree node, not always do initialization. Signed-off-by: Wang Dongsheng diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index e8758b9..75ab20e 100644

[PATCH 2/2] fsl/pci: fix EP device sometimes hangup when system resume from sleep

2014-04-15 Thread Dongsheng Wang
From: Wang Dongsheng Root cause is pcie power management state transition need a delay. The delay time define in "PCI Bus Power Management Interface Specification". D0, D1 or D2 --> D3 need to delay 10ms. D3 --> D0 need to delay 10ms. Signed-off-by: Wang Dongsheng diff --git a/arch/powerpc/sy

[PATCH 1/2] fsl/pci: fix RC cannot detect PME message coming

2014-04-15 Thread Dongsheng Wang
From: Wang Dongsheng PCI controller disable PME message report feature, that shouldn't have happened. Fix it and enable PME message report feature. Signed-off-by: Wang Dongsheng diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 3f415e2..4bd091a 100644 --- a/arch/

[PATCH v2 1/2] fsl/corenet_generic: add a particular initialization for platform

2014-04-14 Thread Dongsheng Wang
From: Wang Dongsheng Corenet_generic is a generic platform initialization. Those based on the corenet_generic board maybe need a particular initialize to enable/set some IP-Blocks. So add "Fix Generic Initialization" to solve this kind of special cases. Signed-off-by: Wang Dongsheng --- *v2* 1

[PATCH v2 2/2] fsl/corenet_generic: add t104x platform diu special initialization

2014-04-14 Thread Dongsheng Wang
From: Wang Dongsheng T104x Platforms based on corenet_generic. The platforms DIU-block that need a special initialization to solve some callback functions, those functions depend on platform handle. Signed-off-by: Wang Dongsheng --- This patch is *depends on* Prabhakar Kushwaha support T104x pa

[PATCH 2/2] fsl/mpic_timer: make mpic_timer to support deep sleep feature

2014-04-13 Thread Dongsheng Wang
From: Wang Dongsheng At T104x platfrom the timer clock will be changed when system going to deep sleep. Add suspend function to switch timer time before system going to deep sleep, and recovery the time after resume from deep sleep. Signed-off-by: Wang Dongsheng diff --git a/arch/powerpc/sysde

[PATCH 1/2] powerpc/mpc85xx: add two functions to get suspend state which is standby or mem

2014-04-13 Thread Dongsheng Wang
From: Wang Dongsheng Add set_pm_suspend_state & pm_suspend_state functions to set/get suspend state. When system going to sleep, devices can get the system suspend state(STANDBY/MEM) through pm_suspend_state function and handle different situations. Signed-off-by: Wang Dongsheng diff --git a/

[PATCH] cpuidle: add freescale e500 family porcessors idle support

2014-04-01 Thread Dongsheng Wang
ev/null +++ b/drivers/cpuidle/cpuidle-e500.c @@ -0,0 +1,194 @@ +/* + * CPU Idle driver for Freescale PowerPC e500 family processors. + * + * Copyright 2014 Freescale Semiconductor, Inc. + * + * Author: Dongsheng Wang + * + * This program is free software; you can redistribute it and/or modify + *

[PATCH] powerpc/irq: Remove HAVE_IRQ_EXIT_ON_IRQ_STACK feature at powerpc platform

2014-03-28 Thread Dongsheng Wang
From: Wang Dongsheng If softirq use hardirq stack, we will get kernel painc when a hard irq coming again during __do_softirq enable local irq to deal with softirq action. So we need to switch satck into softirq stack when invoke soft irq. Task---> | Task stack | Interr

[PATCH] video/fsl: Fix the sleep function for FSL DIU module

2014-03-25 Thread Dongsheng Wang
From: Jason Jin For deep sleep, the diu module will power off, when wake up from the deep sleep, the registers need to be reinitialized. Signed-off-by: Jason Jin Signed-off-by: Wang Dongsheng diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index e8758b9..7ec780c 100644 --

[PATCH v2] fsl/pci: The new pci suspend/resume implementation

2014-03-19 Thread Dongsheng Wang
From: Wang Dongsheng If we do nothing in suspend/resume, some platform PCIe ip-block can't guarantee the link back to L0 state from sleep, then, when we read the EP device will hang. Only we send pme turnoff message in pci controller suspend, and send pme exit message in resume, the link state wi

[PATCH] rtc/ds3232: Enable ds3232 to work as wakeup source

2014-01-20 Thread Dongsheng Wang
From: Wang Dongsheng Add suspend/resume and device_init_wakeup to enable ds3232 as wakeup source, /sys/class/rtc/rtcX/wakealarm for set wakeup alarm. Signed-off-by: Wang Dongsheng diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index b83bb5a5..a3c40d5 100644 --- a/drivers/rtc/

[PATCH 3/3] powerpc/fsl: Use the new interface to save or restore registers

2014-01-14 Thread Dongsheng Wang
From: Wang Dongsheng Use fsl_cpu_state_save/fsl_cpu_state_restore to save/restore registers. Use the functions to save/restore registers, so we don't need to maintain the code. Signed-off-by: Wang Dongsheng diff --git a/arch/powerpc/kernel/swsusp_booke.S b/arch/powerpc/kernel/swsusp_booke.S i

[PATCH 2/3] powerpc/85xx: Provide two functions to save/restore the core registers

2014-01-14 Thread Dongsheng Wang
From: Wang Dongsheng Add fsl_cpu_state_save/fsl_cpu_state_restore functions, used for deep sleep and hibernation to save/restore core registers. We abstract out save/restore code for use in various modules, to make them don't need to maintain. Currently supported processors type are E6500, E5500

[PATCH 1/3] powerpc/fsl: add E500MC and E5500 PVR define

2014-01-14 Thread Dongsheng Wang
From: Wang Dongsheng E500MC and E5500 PVR will be used in subsequent save/restore core state patches. Signed-off-by: Wang Dongsheng diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 62b114e..cd7b630 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc

[PATCH 2/2] fsl/pci: The new pci suspend/resume implementation

2014-01-07 Thread Dongsheng Wang
From: Wang Dongsheng The new suspend/resume implementation, send pme turnoff message in suspend, and send pme exit message in resume. Add a PME handler, to response PME & message interrupt. Change platform_driver->suspend/resume to syscore->suspend/resume. pci-driver will call back EP device, t

[PATCH 1/2] pci: Fix root port bus->self is NULL

2014-01-07 Thread Dongsheng Wang
From: Wang Dongsheng the root port bus->self always NULL, so put root port pci device into root port bus->self. Signed-off-by: Wang Dongsheng diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 38e403d..7f2d1ab 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1472,6 +147

[PATCH 2/2] powerpc/85xx: handle the eLBC error interrupt if it exist in dts

2014-01-06 Thread Dongsheng Wang
From: Wang Dongsheng On P3041, P1020, P1021, P1022, P1023 eLBC event interrupts are routed to Int9(P3041) & Int3(P102x) while ELBC error interrupts are routed to Int0, we need to call request_irq for each. Signed-off-by: Shaohui Xie Signed-off-by: Wang Dongsheng Signed-off-by: Kumar Gala dif

[PATCH 1/2] powerpc/dts: fix lbc lack of error interrupt

2014-01-06 Thread Dongsheng Wang
From: Wang Dongsheng P1020, P1021, P1022, P1023 when the lbc get error, the error interrupt will be triggered. The corresponding interrupt is internal IRQ0. So system have to process the lbc IRQ0 interrupt. The corresponding lbc general interrupt is internal IRQ3. Signed-off-by: Wang Dongsheng

[PATCH] powerpc/mpic: supply a .disable callback

2014-01-06 Thread Dongsheng Wang
From: Wang Dongsheng Currently MPIC provides .mask, but not .disable. This means that effectively disable_irq() soft-disables the interrupt, and you get a .mask call if an interrupt actually occurs. I'm not sure if this was intended as a performance benefit (it seems common to omit .disable on

[PATCH v2 1/2] powerpc/mpic_timer: fix the time is not accurate caused by GTCRR toggle bit

2014-01-05 Thread Dongsheng Wang
From: Wang Dongsheng When the timer GTCCR toggle bit is inverted, we calculated the rest of the time is not accurate. So we need to ignore this bit. Signed-off-by: Wang Dongsheng --- v2: No change. diff --git a/arch/powerpc/sysdev/mpic_timer.c b/arch/powerpc/sysdev/mpic_timer.c index 22d7d57..

[PATCH v2 2/2] powerpc/mpic_timer: fix convert ticks to time subtraction overflow

2014-01-05 Thread Dongsheng Wang
From: Wang Dongsheng In some cases tmp_sec may be greater than ticks, because in the process of calculation ticks and tmp_sec will be rounded. Signed-off-by: Wang Dongsheng --- v2: Add the new patch in v2. diff --git a/arch/powerpc/sysdev/mpic_timer.c b/arch/powerpc/sysdev/mpic_timer.c index 7

[PATCH] powerpc/mpic_timer: fix the time calculation is not accurate

2013-12-22 Thread Dongsheng Wang
From: Wang Dongsheng When the timer GTCCR toggle bit is inverted, we calculated the rest of the time is not accurate. So we need to ignore this bit. Signed-off-by: Wang Dongsheng diff --git a/arch/powerpc/sysdev/mpic_timer.c b/arch/powerpc/sysdev/mpic_timer.c index 22d7d57..0fb70c9 100644 ---

[RFC] linux/pci: move pci_platform_pm_ops to linux/pci.h

2013-12-20 Thread Dongsheng Wang
From: Wang Dongsheng make Freescale platform use pci_platform_pm_ops struct. Signed-off-by: Wang Dongsheng --- If device's not set power state, we will use this interface to put the device's into the correct state. diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 9c91ecc..48f8b1a 1006

[PATCH 2/2] powerpc/p1022ds: add a interrupt for rtc node

2013-12-18 Thread Dongsheng Wang
From: Wang Dongsheng Add an external interrupt for rtc node. Signed-off-by: Wang Dongsheng diff --git a/arch/powerpc/boot/dts/p1022ds.dtsi b/arch/powerpc/boot/dts/p1022ds.dtsi index 5725058..957e0dc 100644 --- a/arch/powerpc/boot/dts/p1022ds.dtsi +++ b/arch/powerpc/boot/dts/p1022ds.dtsi @@ -1

[PATCH 1/2] powerpc/p1022ds: fix rtc compatible string

2013-12-18 Thread Dongsheng Wang
From: Wang Dongsheng RTC Hardware(ds3232) and rtc compatible string does not match. Change "dallas,ds1339" to "dallas,ds3232". Signed-off-by: Wang Dongsheng diff --git a/arch/powerpc/boot/dts/p1022ds.dtsi b/arch/powerpc/boot/dts/p1022ds.dtsi index 873da35..5725058 100644 --- a/arch/powerpc/bo

[PATCH v6 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle

2013-12-17 Thread Dongsheng Wang
From: Wang Dongsheng Add a sys interface to enable/diable pw20 state or altivec idle, and control the wait entry time. Enable/Disable interface: 0, disable. 1, enable. /sys/devices/system/cpu/cpuX/pw20_state /sys/devices/system/cpu/cpuX/altivec_idle Set wait time interface:(Nanoseco

[PATCH v6 2/4] powerpc/85xx: add hardware automatically enter altivec idle state

2013-12-17 Thread Dongsheng Wang
From: Wang Dongsheng Each core's AltiVec unit may be placed into a power savings mode by turning off power to the unit. Core hardware will automatically power down the AltiVec unit after no AltiVec instructions have executed in N cycles. The AltiVec power-control is triggered by hardware. Signed

[PATCH v6 3/4] powerpc/85xx: add hardware automatically enter pw20 state

2013-12-17 Thread Dongsheng Wang
From: Wang Dongsheng Using hardware features make core automatically enter PW20 state. Set a TB count to hardware, the effective count begins when PW10 is entered. When the effective period has expired, the core will proceed from PW10 to PW20 if no exit conditions have occurred during the period.

[PATCH v6 1/4] powerpc/fsl: add E6500 PVR and SPRN_PWRMGTCR0 define

2013-12-17 Thread Dongsheng Wang
From: Wang Dongsheng E6500 PVR and SPRN_PWRMGTCR0 will be used in subsequent pw20/altivec idle patches. Signed-off-by: Wang Dongsheng --- *v3: Add bit definitions for PWRMGTCR0. arch/powerpc/include/asm/reg.h | 2 ++ arch/powerpc/include/asm/reg_booke.h | 9 + 2 files changed, 1

RE: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle

2013-11-10 Thread Dongsheng Wang
> -Original Message- > From: Wang Dongsheng-B40534 > Sent: Thursday, November 07, 2013 10:13 AM > To: Wood Scott-B07421 > Cc: Bhushan Bharat-R65777; linuxppc-dev@lists.ozlabs.org > Subject: RE: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and > altivec idle > > > > > -Orig

RE: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle

2013-11-06 Thread Dongsheng Wang
> -Original Message- > From: Wood Scott-B07421 > Sent: Thursday, November 07, 2013 9:20 AM > To: Wang Dongsheng-B40534 > Cc: Bhushan Bharat-R65777; Wood Scott-B07421; linuxppc- > d...@lists.ozlabs.org > Subject: Re: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and > altivec idle

RE: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle

2013-11-05 Thread Dongsheng Wang
> -Original Message- > From: Bhushan Bharat-R65777 > Sent: Wednesday, November 06, 2013 1:25 PM > To: Wang Dongsheng-B40534; Wood Scott-B07421 > Cc: linuxppc-dev@lists.ozlabs.org > Subject: RE: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and > altivec idle > > > > > -Orig

RE: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle

2013-11-04 Thread Dongsheng Wang
> -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, November 05, 2013 5:52 AM > To: Wang Dongsheng-B40534 > Cc: Wood Scott-B07421; Bhushan Bharat-R65777; linuxppc- > d...@lists.ozlabs.org > Subject: Re: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and > altivec idle >

RE: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle

2013-11-04 Thread Dongsheng Wang
> -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, November 05, 2013 7:48 AM > To: Wang Dongsheng-B40534 > Cc: Wood Scott-B07421; Bhushan Bharat-R65777; linuxppc- > d...@lists.ozlabs.org > Subject: Re: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and > altivec idle >

RE: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle

2013-11-03 Thread Dongsheng Wang
> -Original Message- > From: Wang Dongsheng-B40534 > Sent: Monday, October 21, 2013 11:11 AM > To: Wood Scott-B07421 > Cc: Bhushan Bharat-R65777; linuxppc-dev@lists.ozlabs.org > Subject: RE: [PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and > altivec idle > > > > > -Original

[PATCH v5 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle

2013-10-15 Thread Dongsheng Wang
From: Wang Dongsheng Add a sys interface to enable/diable pw20 state or altivec idle, and control the wait entry time. Enable/Disable interface: 0, disable. 1, enable. /sys/devices/system/cpu/cpuX/pw20_state /sys/devices/system/cpu/cpuX/altivec_idle Set wait time interface:(Nanosecond) /sys/dev

[PATCH v5 3/4] powerpc/85xx: add hardware automatically enter pw20 state

2013-10-15 Thread Dongsheng Wang
From: Wang Dongsheng Using hardware features make core automatically enter PW20 state. Set a TB count to hardware, the effective count begins when PW10 is entered. When the effective period has expired, the core will proceed from PW10 to PW20 if no exit conditions have occurred during the period.

[PATCH v5 2/4] powerpc/85xx: add hardware automatically enter altivec idle state

2013-10-15 Thread Dongsheng Wang
From: Wang Dongsheng Each core's AltiVec unit may be placed into a power savings mode by turning off power to the unit. Core hardware will automatically power down the AltiVec unit after no AltiVec instructions have executed in N cycles. The AltiVec power-control is triggered by hardware. Signed

[PATCH v5 1/4] powerpc/fsl: add E6500 PVR and SPRN_PWRMGTCR0 define

2013-10-15 Thread Dongsheng Wang
From: Wang Dongsheng E6500 PVR and SPRN_PWRMGTCR0 will be used in subsequent pw20/altivec idle patches. Signed-off-by: Wang Dongsheng --- *v3: Add bit definitions for PWRMGTCR0. arch/powerpc/include/asm/reg.h | 2 ++ arch/powerpc/include/asm/reg_booke.h | 9 + 2 files changed, 1

[PATCH v4 3/4] powerpc/85xx: add hardware automatically enter pw20 state

2013-09-24 Thread Dongsheng Wang
From: Wang Dongsheng Using hardware features make core automatically enter PW20 state. Set a TB count to hardware, the effective count begins when PW10 is entered. When the effective period has expired, the core will proceed from PW10 to PW20 if no exit conditions have occurred during the period.

[PATCH v4 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle

2013-09-24 Thread Dongsheng Wang
From: Wang Dongsheng Add a sys interface to enable/diable pw20 state or altivec idle, and control the wait entry time. Enable/Disable interface: 0, disable. 1, enable. /sys/devices/system/cpu/cpuX/pw20_state /sys/devices/system/cpu/cpuX/altivec_idle Set wait time interface:(Nanosecond) /sys/dev

[PATCH v4 2/4] powerpc/85xx: add hardware automatically enter altivec idle state

2013-09-24 Thread Dongsheng Wang
From: Wang Dongsheng Each core's AltiVec unit may be placed into a power savings mode by turning off power to the unit. Core hardware will automatically power down the AltiVec unit after no AltiVec instructions have executed in N cycles. The AltiVec power-control is triggered by hardware. Signed

[PATCH v4 1/4] powerpc/fsl: add E6500 PVR and SPRN_PWRMGTCR0 define

2013-09-24 Thread Dongsheng Wang
From: Wang Dongsheng E6500 PVR and SPRN_PWRMGTCR0 will be used in subsequent pw20/altivec idle patches. Signed-off-by: Wang Dongsheng --- *v3: Add bit definitions for PWRMGTCR0. arch/powerpc/include/asm/reg.h | 2 ++ arch/powerpc/include/asm/reg_booke.h | 9 + 2 files changed, 1

[PATCH v3 3/4] powerpc/85xx: add hardware automatically enter pw20 state

2013-09-10 Thread Dongsheng Wang
From: Wang Dongsheng Using hardware features make core automatically enter PW20 state. Set a TB count to hardware, the effective count begins when PW10 is entered. When the effective period has expired, the core will proceed from PW10 to PW20 if no exit conditions have occurred during the period.

[PATCH v3 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle

2013-09-10 Thread Dongsheng Wang
From: Wang Dongsheng Add a sys interface to enable/diable pw20 state or altivec idle, and control the wait entry time. Enable/Disable interface: 0, disable. 1, enable. /sys/devices/system/cpu/cpuX/pw20_state /sys/devices/system/cpu/cpuX/altivec_idle Set wait entry bit interface: bit value range

[PATCH v3 1/4] powerpc/fsl: add E6500 PVR and SPRN_PWRMGTCR0 define

2013-09-10 Thread Dongsheng Wang
From: Wang Dongsheng E6500 PVR and SPRN_PWRMGTCR0 will be used in subsequent pw20/altivec idle patches. Signed-off-by: Wang Dongsheng --- *v3: Add bit definitions for PWRMGTCR0. arch/powerpc/include/asm/reg.h | 2 ++ arch/powerpc/include/asm/reg_booke.h | 9 + 2 files changed, 1

[PATCH v3 2/4] powerpc/85xx: add hardware automatically enter altivec idle state

2013-09-10 Thread Dongsheng Wang
From: Wang Dongsheng Each core's AltiVec unit may be placed into a power savings mode by turning off power to the unit. Core hardware will automatically power down the AltiVec unit after no AltiVec instructions have executed in N cycles. The AltiVec power-control is triggered by hardware. Signed

[PATCH v2 3/3] powerpc/85xx: add hardware automatically enter pw20 state

2013-08-27 Thread Dongsheng Wang
From: Wang Dongsheng Using hardware features make core automatically enter PW20 state. Set a TB count to hardware, the effective count begins when PW10 is entered. When the effective period has expired, the core will proceed from PW10 to PW20 if no exit conditions have occurred during the period.

[PATCH v2 2/3] powerpc/85xx: add hardware automatically enter altivec idle state

2013-08-27 Thread Dongsheng Wang
From: Wang Dongsheng Each core's AltiVec unit may be placed into a power savings mode by turning off power to the unit. Core hardware will automatically power down the AltiVec unit after no AltiVec instructions have executed in N cycles. The AltiVec power-control is triggered by hardware. Signed

[PATCH v2 1/3] powerpc/fsl: add E6500 PVR and SPRN_PWRMGTCR0 define

2013-08-27 Thread Dongsheng Wang
From: Wang Dongsheng E6500 PVR and SPRN_PWRMGTCR0 will be used in subsequent pw20/altivec idle patches. Signed-off-by: Wang Dongsheng diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 64264bf..d4160ca 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powe

[PATCH 2/2] powerpc/85xx: add hardware automatically enter pw20 state

2013-08-16 Thread Dongsheng Wang
From: Wang Dongsheng Using hardware features make core automatically enter PW20 state. Set a TB count to hardware, the effective count begins when PW10 is entered. When the effective period has expired, the core will proceed from PW10 to PW20 if no exit conditions have occurred during the period.

[PATCH 1/2] powerpc/85xx: add hardware automatically enter altivec idle state

2013-08-16 Thread Dongsheng Wang
From: Wang Dongsheng Each core's AltiVec unit may be placed into a power savings mode by turning off power to the unit. Core hardware will automatically power down the AltiVec unit after no AltiVec instructions have executed in N cycles. The AltiVec power-control is triggered by hardware. Signed

[PATCH v3 1/2] powerpc: add Book E support to 64-bit hibernation

2013-08-07 Thread Dongsheng Wang
From: Wang Dongsheng Update the 64-bit hibernation code to support Book E CPUs. Some registers and instructions are not defined for Book3e (SDR reg, tlbia instruction). SDR: Storage Description Register. Book3S and Book3E have different address translation mode, we do not need HTABORG & HTABSIZE

[PATCH] cpuidle: add freescale e500 family porcessors idle support

2013-07-30 Thread Dongsheng Wang
From: Wang Dongsheng Add cpuidle support for e500 family, using cpuidle framework to manage various low power modes. The new implementation will remain compatible with original idle method. Initially, this supports PW10, and subsequent patches will support PW20/DOZE/NAP. Signed-off-by: Wang Don

[PATCH] cpuidle: fix unremovable issue for module driver

2013-07-30 Thread Dongsheng Wang
From: Wang Dongsheng After __cpuidle_register_device, the cpu incs are added up, but decs are not, thus the module refcount is not match. So the module "exit" function can not be executed when we do remove operation. Move module_put into __cpuidle_register_device to fix it. Signed-off-by: Wang D

[PATCH 2/2] cpuidle: export cpuidle_idle_call symbol

2013-07-23 Thread Dongsheng Wang
From: Wang Dongsheng Export cpuidle_idle_call symbol, make this function can be invoked in the module. Signed-off-by: Wang Dongsheng --- Branch: pm-cpuidle drivers/cpuidle/cpuidle.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index

[PATCH 1/2] cpuidle: fix cpu idle driver as a module can not remove

2013-07-23 Thread Dongsheng Wang
From: Wang Dongsheng The module can not be removed when execute "rmmod". rmmod not use "--force". Log: root:~# rmmod cpuidle-e500 incs[9], decs[1] rmmod: can't unload 'cpuidle_e500': Resource temporarily unavailable Signed-off-by: Wang Dongsheng --- Branch: pm-cpuidle drivers/cpuidle/cpuidle

[PATCH v2 1/2] powerpc: add Book E support to 64-bit hibernation

2013-07-11 Thread Dongsheng Wang
From: Wang Dongsheng Update the 64-bit hibernation code to support Book E CPUs. Some registers and instructions are not defined for Book3e (SDR reg, tlbia instruction). SDR: Storage Description Register. Book3S and Book3E have different address translation mode, we do not need HTABORG & HTABSIZE

[RFC 2/2] powerpc/cputable: add wait feature for CPU kernel features

2013-07-10 Thread Dongsheng Wang
From: Wang Dongsheng Signed-off-by: Wang Dongsheng diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index 6f3887d..0a8d0cb 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h @@ -138,6 +138,7 @@ extern const char *pow

[RFC 1/2] fsl/pm: combined the idle(PH&PW) state

2013-07-10 Thread Dongsheng Wang
From: Wang Dongsheng move wait instructions from idle_e500.S to idle_book3e.S idle_e500.S: rename e500_idle to e500_idle_ph. idle_book3e.S: rename BOOK3E to E500, this file not only use 64bit mode. Next we will modify the current cpu idle running way, and will use cpuidle framework. Distinguish