Re: [PATCH v3 0/8] QCOM 8074 cpuidle driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 18, 2014 at 04:23:26PM -0600, Lina Iyer wrote:
Changes since v2:
[ https://www.mail-archive.com/linux-arm-msm@xxxxxxxxxxxxxxx/msg10148.html ]
- Prune all the drivers to support basic WFI and power down cpuidle
 functionality. Remove debug code.
- Integrate KConfig changes into the drivers' patches.
- Use Lorenzo's ARM idle-states patches as the basis for reading cpuidle
 c-states from DT.

Ref: http://marc.info/?l=linux-pm&m=140794514812383&w=2

- Incorporate review comments
- Rebase on top of 3.16

Changes since v1/RFC:
[ https://www.mail-archive.com/linux-arm-msm@xxxxxxxxxxxxxxx/msg10065.html ]
- Remove hotplug from the patch series. Will submit it seprately.
- Fix SPM drivers per the review comments
- Modify patch sequence to compile SPM drivers independent of msm-pm, so as to
 allow wfi() calls to use SPM even without SoC interface driver.

8074 like any ARM SoC can do architectural clock gating, that helps save on
power, but not enough of leakage power.  Leakage power of the SoC can be
further reduced by turning off power to the core. To aid this, every core (cpu
and L2) is accompanied by a Sub-system Power Manager (SPM), that can be
configured to indicate the low power mode, the core would be put into and the
SPM programs the peripheral h/w accordingly to enter low power and turn off the
power rail to the core.

The idle invocation hierarchy -

	CPUIDLE
	|
	cpuidle-qcom.c [CPUIdle driver]
	|
	------>	msm-pm.c [SoC Interface layer for QCOM chipsets]
		|
		------> spm-devices.c [SPM devices manager]
		|	|
		|	------>	spm.c [SPM h/w driver]
		|
		------> scm-boot.c [SCM interface layer]		
			|
------------------------|--------------------------
(EL)			Secure Monitor Code
			|
			|
			wfi();
------------------------|--------------------------
(HW)			[CPU] {clock gate}
			|
			-----> [SPM] {statemachine}
			

The patchsets do the following -

- Move scm-boot files from arm/mach-qcom to drivers/soc, following convention.
They are based on Stephen Boyd's series of patches
[http://www.spinics.net/lists/linux-arm-msm/msg10482.html]

- Add new Secure Monitor flags to support warmboot of a quad core system.

- Introduce the SPM driver to control power to the core. The SPM h/w IP works
in conjunction with the Krait CPU/L2. When the core executes WFI instruction,
the core is clockgated and the SPM state machine takes over and powers the core
down. An interrupt from GIC, resumes the SPM state machine which brings the cpu
out of the low power mode.

- Add a SPM device manager to configure multiple SPM devices.

- Add the device tree configuration for each of the SPM nodes. There is one for
each cpu. There is one for each cpu.

- Introduce the SoC driver interface layer to configure SPM per the core's idle
state. To power down the cpu core, the SPM h/w needs to be set up correctly
to power down the core, when the core executes WFI. Linux is expected to call
into Secure Monitor to power down the core. At reset, the core will start in
seure mode and will be returned back to Linux.

- Add CPUIDLE driver for QCOM cpus. The cpuidle driver uses the SoC interface
layer to configure the SPM to allow Krait to be powered down. The cpuidle driver
is based on ARM idle-state framework for cpuidle drivers.

- Provide device configuration for 8074 SoC. Current support is for WFI and
standalone power collapse, which powers only the core independent of the
other cores and caches.

Thanks,
Lina


Lina Iyer (8):
 msm: scm: Move scm-boot files to drivers/soc and include/soc
 msm: scm: Add SCM warmboot flags for quad core targets.
 qcom: spm: Add Subsystem Power Manager driver (SAW2)
 qcom: spm-devices: Add SPM device manager for the SoC
 arm: dts: qcom: Add SPM device bindings for 8974
 qcom: msm-pm: Add cpu low power mode functions
 qcom: cpuidle: Add cpuidle driver for QCOM cpus
 arm: dts: qcom: Add idle states device nodes for 8974

Documentation/devicetree/bindings/arm/msm/spm.txt  |  47 ++++
arch/arm/boot/dts/qcom-msm8974-pm.dtsi             |  69 ++++++
arch/arm/boot/dts/qcom-msm8974.dtsi                |  24 +-
arch/arm/mach-qcom/Makefile                        |   1 -
arch/arm/mach-qcom/platsmp.c                       |   2 +-
drivers/cpuidle/Kconfig.arm                        |   7 +
drivers/cpuidle/Makefile                           |   1 +
drivers/cpuidle/cpuidle-qcom.c                     | 119 ++++++++++
drivers/soc/qcom/Kconfig                           |   8 +
drivers/soc/qcom/Makefile                          |   3 +-
drivers/soc/qcom/msm-pm.c                          | 117 ++++++++++
.../arm/mach-qcom => drivers/soc/qcom}/scm-boot.c  |   4 +-
drivers/soc/qcom/spm-devices.c                     | 242 +++++++++++++++++++++
drivers/soc/qcom/spm.c                             | 176 +++++++++++++++
drivers/soc/qcom/spm_driver.h                      |  85 ++++++++
include/soc/qcom/pm.h                              |  38 ++++
.../arm/mach-qcom => include/soc/qcom}/scm-boot.h  |   2 +
include/soc/qcom/spm.h                             |  34 +++
18 files changed, 970 insertions(+), 9 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/msm/spm.txt
create mode 100644 arch/arm/boot/dts/qcom-msm8974-pm.dtsi
create mode 100644 drivers/cpuidle/cpuidle-qcom.c
create mode 100644 drivers/soc/qcom/msm-pm.c
rename {arch/arm/mach-qcom => drivers/soc/qcom}/scm-boot.c (97%)
create mode 100644 drivers/soc/qcom/spm-devices.c
create mode 100644 drivers/soc/qcom/spm.c
create mode 100644 drivers/soc/qcom/spm_driver.h
create mode 100644 include/soc/qcom/pm.h
rename {arch/arm/mach-qcom => include/soc/qcom}/scm-boot.h (92%)
create mode 100644 include/soc/qcom/spm.h

--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux