linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/8] QCOM 8074 cpuidle driver
@ 2014-08-19 22:15 Lina Iyer
  2014-08-19 22:15 ` [PATCH v4 1/8] msm: scm: Move scm-boot files to drivers/soc and include/soc Lina Iyer
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Lina Iyer @ 2014-08-19 22:15 UTC (permalink / raw)
  To: daniel.lezcano, khilman, sboyd, davidb, galak, linux-arm-msm,
	lorenzo.pieralisi
  Cc: msivasub, Lina Iyer

Changes since v3:
[ https://www.mail-archive.com/linux-arm-msm@vger.kernel.org/msg10288.html ]
- Fix CONFIG_QCOM_PM Kconfig as bool
- More clean ups in spm.c and spm-devices.c
	- Removed and re-organized data structures to make initialization simple
	- Remove export of sequence flush functions
	- Updated commit text
	- Comments for use of barriers.
- Rebase on top of 3.17-rc1

Changes since v2:
[ https://www.mail-archive.com/linux-arm-msm@vger.kernel.org/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.
  [ 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@vger.kernel.org/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                     | 198 +++++++++++++++++++++
 drivers/soc/qcom/spm-drv.h                         |  71 ++++++++
 drivers/soc/qcom/spm.c                             | 195 ++++++++++++++++++++
 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, 931 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-drv.h
 create mode 100644 drivers/soc/qcom/spm.c
 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

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2014-08-27 20:35 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-19 22:15 [PATCH v4 0/8] QCOM 8074 cpuidle driver Lina Iyer
2014-08-19 22:15 ` [PATCH v4 1/8] msm: scm: Move scm-boot files to drivers/soc and include/soc Lina Iyer
2014-08-19 22:15 ` [PATCH v4 2/8] msm: scm: Add SCM warmboot flags for quad core targets Lina Iyer
2014-08-19 22:15 ` [PATCH v4 3/8] qcom: spm: Add Subsystem Power Manager driver (SAW2) Lina Iyer
2014-08-20  2:01   ` Stephen Boyd
2014-08-20  3:24     ` Lina Iyer
2014-08-21  0:25       ` Stephen Boyd
2014-08-21 15:50         ` Lina Iyer
2014-08-19 22:15 ` [PATCH v4 4/8] qcom: spm-devices: Add SPM device manager for the SoC Lina Iyer
2014-08-25 23:40   ` Stephen Boyd
2014-08-26  0:31     ` Lina Iyer
2014-08-26  2:17       ` Stephen Boyd
     [not found]         ` <53FBEE2B.7020008-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-08-26 15:33           ` Lina Iyer
2014-08-27 14:00   ` Kumar Gala
2014-08-27 15:35     ` Lina Iyer
2014-08-19 22:15 ` [PATCH v4 5/8] arm: dts: qcom: Add SPM device bindings for 8974 Lina Iyer
2014-08-19 22:15 ` [PATCH v4 6/8] qcom: msm-pm: Add cpu low power mode functions Lina Iyer
2014-08-19 22:15 ` [PATCH v4 7/8] qcom: cpuidle: Add cpuidle driver for QCOM cpus Lina Iyer
2014-08-21  1:24   ` Daniel Lezcano
2014-08-21 14:36     ` Lina Iyer
2014-08-21 15:07       ` Lorenzo Pieralisi
2014-08-27 17:31       ` Kevin Hilman
2014-08-27 20:35         ` Lina Iyer
2014-08-22 15:36     ` Lina Iyer
2014-08-23 10:37       ` Lorenzo Pieralisi
2014-08-19 22:15 ` [PATCH v4 8/8] arm: dts: qcom: Add idle states device nodes for 8974 Lina Iyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).