Hello everybody,

Here are the set of patches for enabling cpuidle driver for 8074 based targets.

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 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 the device tree configuration for each of the SPM nodes. There is one for
each cpu. There is one for each cpu and one for L2 and one for L2.

- 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.  Also, when powering down the
core, let the SCM know the state of L2 as set up in Linux. This allows secure
monitor to flush the secure lines when Linux knows the cache may be powered
off. 

- Add ability to recognize the power down status of the core, to ensure that
the core is indeed powered down before powering down peripheral h/w.

- Add support for deeper idle states than just clock gating for hotplug and 
warmboot

- 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 driver
supports 4 low power modes, but not all SoCs, support all low power modes. The
modes supported are configured in device tree nodes.

- 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.

- KConfig option to enable the driver

I have tested them on the Dragonboard 8074. The drivers should be fairly
extensible to 8084.

Thanks
Lina


Lina Iyer (13):
  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 for QCOM chipsets
  arm: dts: qcom: Add SPM device bindings for 8974
  qcom: msm-pm: Add cpu low power mode functions
  qcom: msm-pm: Add support for hotplug and secondary startup
  qcom: sleep-status: Add ability to recognize cpu power down state
  arm: dts: qcom: Add device binding for sleep status
  soc: qcom: Add QCOM Power management config
  qcom: platsmp: Enable deeper idle states for hotplug
  qcom: cpuidle: Add cpuidle driver for QCOM cpus
  qcom: cpuidle: Add cpuidle device nodes for 8974 chipset
  qcom: cpuidle: Config option to enable QCOM cpuidle driver

 .../bindings/arm/msm/qcom,cpu-sleep-status.txt     |  41 ++
 .../devicetree/bindings/arm/msm/qcom,cpuidle.txt   |  73 +++
 .../devicetree/bindings/arm/msm/spm-v2.txt         | 104 +++
 arch/arm/boot/dts/qcom-msm8974-pm.dtsi             | 146 +++++
 arch/arm/boot/dts/qcom-msm8974.dtsi                |   2 +
 arch/arm/mach-qcom/Makefile                        |   1 -
 arch/arm/mach-qcom/platsmp.c                       |  22 +-
 drivers/cpuidle/Kconfig.arm                        |   6 +
 drivers/cpuidle/Makefile                           |   1 +
 drivers/cpuidle/cpuidle-qcom.c                     | 140 ++++
 drivers/soc/qcom/Kconfig                           |   8 +
 drivers/soc/qcom/Makefile                          |   4 +-
 drivers/soc/qcom/msm-pm.c                          | 254 ++++++++
 .../arm/mach-qcom => drivers/soc/qcom}/scm-boot.c  |   4 +-
 drivers/soc/qcom/sleep-status.c                    | 178 ++++++
 drivers/soc/qcom/spm.c                             | 559 ++++++++++++++++
 drivers/soc/qcom/spm_devices.c                     | 709 +++++++++++++++++++++
 drivers/soc/qcom/spm_driver.h                      | 118 ++++
 include/soc/qcom/pm.h                              |  45 ++
 .../arm/mach-qcom => include/soc/qcom}/scm-boot.h  |   3 +
 include/soc/qcom/spm.h                             | 106 +++
 21 files changed, 2519 insertions(+), 5 deletions(-)
 create mode 100644 
Documentation/devicetree/bindings/arm/msm/qcom,cpu-sleep-status.txt
 create mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,cpuidle.txt
 create mode 100644 Documentation/devicetree/bindings/arm/msm/spm-v2.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/sleep-status.c
 create mode 100644 drivers/soc/qcom/spm.c
 create mode 100644 drivers/soc/qcom/spm_devices.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 (91%)
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to