From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:37
Hello,
Here comes the third version of the cpuidle support for Armada 370 and
Armada 38x.
We are hoping to see this patch series merged for 3.17.
Most patches are touching only arch/arm/mach-mvebu/ code so they
should be handled by the mvebu maintainers. However, patches 11-13 are
touching the mvebu cpuidle driver, with a possible issue on patch 11,
which touches both the cpuidle driver and the mach-mvebu code in order
to rename the driver without breaking functionality (if needed, we can
decide to split the commits, it would break functionality temporarly,
but not buildability).
Changes since v2
================
* According to the discussion with Daniel Lezcano (cpuidle
maintainer) and Arnd Bergmann, changed the cpuidle-mvebu-v7 driver
to actually register three separate cpuidle platform driver, one
per-SoC. This way, we don't need special platform data to convey
the SoC type being used, as this information is already available
by looking at the driver name.
This change impacts the patches "cpuidle: mvebu: rename the driver
from armada-370-xp to mvebu-v7", "cpuidle: mvebu: add Armada 370
support", "cpuidle: mvebu: add Armada 38x support", "ARM: mvebu:
add cpuidle support for Armada 370" and "ARM: mvebu: add cpuidle
support for Armada 38x". Other patches are unchanged. The patch
"cpuidle: mvebu: make the cpuidle driver capable of handling
multiple SoCs" was no longer needed, so it has been removed.
Changes since v1
================
* Series rebased on top of mvebu/fixes + mvebu/soc to take into
account the conflicts with the changes already merged on the PMSU
code.
* Adjusted the fix that sorts the #include statements in pmsu.c by
alphabetic order to really use the alphabetic order.
* Various improvements to the implementation of the common function
for the boot address workaround:
- Main function renamed from mvebu_boot_addr_wa() to
mvebu_setup_boot_addr_wa().
- Both target and attribute of the crypto SRAM MBus window are now
passed as arguments.
- Use appropriate types for arguments.
- Add error checking for ioremap() call.
- Use __raw_writel() instead of direct pointer dereference
- Fix the assembly code to work properly in big-endian
configurations.
* Misc small fixes in the migration of the Armada 375 SMP code to use
the common function for the boot address workaround: use correct
types, split in a separate function to reduce the indentation
level, use better naming for macros, etc.
* Re-organized the commits by grouping several patches that were
separate before, to for example have a single patch to introduce
the cpuidle support on Armada 370.
* Move back into the cpuidle driver the list of the cpuidle states
for each SoC.
* Numerous other small typos and improvements.
Thanks,
Thomas
Gregory CLEMENT (14):
ARM: mvebu: split again armada_370_xp_pmsu_idle_enter() in PMSU code
ARM: mvebu: sort the #include of pmsu.c in alphabetic order
ARM: mvebu: add a common function for the boot address work around
ARM: mvebu: use the common function for Armada 375 SMP workaround
ARM: mvebu: rename the armada_370_xp symbols to mvebu_v7 in pmsu.c
ARM: mvebu: make the cpuidle initialization more generic
ARM: mvebu: use a local variable to store the resume address
ARM: mvebu: make the snoop disabling optional in
mvebu_v7_pmsu_idle_prepare()
ARM: mvebu: export the SCU address
ARM: mvebu: add CA9 MPcore SoC Controller node
cpuidle: mvebu: rename the driver from armada-370-xp to mvebu-v7
ARM: mvebu: add cpuidle support for Armada 370
ARM: mvebu: add cpuidle support for Armada 38x
ARM: mvebu: defconfig: enable cpuidle support in mvebu_v7_defconfig
Thomas Petazzoni (2):
cpuidle: mvebu: add Armada 370 support
cpuidle: mvebu: add Armada 38x support
.../bindings/arm/armada-380-mpcore-soc-ctrl.txt | 14 ++
arch/arm/boot/dts/armada-38x.dtsi | 5 +
arch/arm/configs/mvebu_v7_defconfig | 2 +
arch/arm/mach-mvebu/armada-370-xp.h | 1 -
arch/arm/mach-mvebu/board-v7.c | 9 +-
arch/arm/mach-mvebu/common.h | 2 +
arch/arm/mach-mvebu/headsmp-a9.S | 15 --
arch/arm/mach-mvebu/platsmp-a9.c | 42 +---
arch/arm/mach-mvebu/platsmp.c | 2 +-
arch/arm/mach-mvebu/pmsu.c | 273 ++++++++++++++++++---
arch/arm/mach-mvebu/pmsu.h | 5 +
arch/arm/mach-mvebu/pmsu_ll.S | 36 +++
arch/arm/mach-mvebu/system-controller.c | 31 +++
drivers/cpuidle/Kconfig.arm | 12 +-
drivers/cpuidle/Makefile | 2 +-
drivers/cpuidle/cpuidle-armada-370-xp.c | 93 -------
drivers/cpuidle/cpuidle-mvebu-v7.c | 150 +++++++++++
17 files changed, 500 insertions(+), 194 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/armada-380-mpcore-soc-ctrl.txt
delete mode 100644 drivers/cpuidle/cpuidle-armada-370-xp.c
create mode 100644 drivers/cpuidle/cpuidle-mvebu-v7.c
--
2.0.0
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:38
From: Gregory CLEMENT <redacted>
do_armada_370_xp_cpu_suspend() and armada_370_xp_pmsu_idle_prepare(),
have been merged into a single function called
armada_370_xp_pmsu_idle_enter() by the commit "bbb92284b6c8 ARM:
mvebu: slightly refactor/rename PMSU idle related functions", in
prepare for the introduction of the CPU hotplug support for Armada XP.
But for cpuidle the prepare function will be common to all the mvebu
SoCs that use the PMSU, while the suspend function will be specific to
each SoC. Keeping the prepare function separate will help reducing
code duplication while new SoC support is added.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
arch/arm/mach-mvebu/pmsu.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
@@ -143,7 +143,7 @@ static void armada_370_xp_pmsu_enable_l2_powerdown_onidle(void)}/* No locking is needed because we only access per-CPU registers */-intarmada_370_xp_pmsu_idle_enter(unsignedlongdeepidle)+staticintarmada_370_xp_prepare(unsignedlongdeepidle){unsignedinthw_cpu=cpu_logical_map(smp_processor_id());u32reg;
@@ -179,6 +179,17 @@ int armada_370_xp_pmsu_idle_enter(unsigned long deepidle)reg|=PMSU_CPU_POWER_DOWN_DIS_SNP_Q_SKIP;writel(reg,pmsu_mp_base+PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu));+return0;+}++intarmada_370_xp_pmsu_idle_enter(unsignedlongdeepidle)+{+intret;++ret=armada_370_xp_prepare(deepidle);+if(ret)+returnret;+v7_exit_coherency_flush(all);ll_disable_coherency();
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:39
From: Gregory CLEMENT <redacted>
Sorting the headers in alphabetic order will help to reduce conflicts
when adding new headers later.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
arch/arm/mach-mvebu/pmsu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:40
From: Gregory CLEMENT <redacted>
On some of the mvebu SoCs and due to internal BootROM issue, the CPU
initial jump code must be placed in the SRAM memory of the SoC. In
order to achieve this, we have to unmap the BootROM and at some
specific location where the BootROM was placed, create a dedicated
MBus window for the SRAM. This SRAM is initialized with a few
instructions of code that allows to jump to the real secondary CPU
boot address. The SRAM used is the Crypto engine one.
This work around is currently needed for booting SMP on Armada 375 Z1
and will be needed for cpuidle support on Armada 370. Instead of
duplicating the same code, this commit introduces a common function to
handle it: mvebu_setup_boot_addr_wa().
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
arch/arm/mach-mvebu/pmsu.c | 47 +++++++++++++++++++++++++++++++++++++++++++
arch/arm/mach-mvebu/pmsu.h | 3 +++
arch/arm/mach-mvebu/pmsu_ll.S | 22 ++++++++++++++++++++
3 files changed, 72 insertions(+)
@@ -23,3 +23,25 @@ ARM_BE8(setend be ) @ go BE8 if entered LEbcpu_resumeENDPROC(armada_370_xp_cpu_resume)+.globalmvebu_boot_wa_start+.globalmvebu_boot_wa_end++/*ThefollowingcodewillbeexecutedfromSRAM*/+ENTRY(mvebu_boot_wa_start)+mvebu_boot_wa_start:+ARM_BE8(setendbe)+adrr0,1f+ldrr0,[r0]@loadtheaddressofthe+@resumeregister+ldrr0,[r0]@loadthevalueinthe+@resumeregister+ARM_BE8(revr0,r0)@thevalueisstoredLE+movpc,r0@jumptothisvalue+/*+*thelastwordofthispieceofcodewillbefilledbythephysical+*addressofthebootaddressregisterjustafterbeingcopiedinSRAM+*/+1:+.long.+mvebu_boot_wa_end:+ENDPROC(mvebu_boot_wa_end)
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:41
From: Gregory CLEMENT <redacted>
Use the common function mvebu_setup_boot_addr_wa() introduced in the
commit "ARM: mvebu: Add a common function for the boot address work
around" instead of the dedicated version for Armada 375.
This commit also moves the workaround in the system-controller
module. Indeed the workaround on 375 is really related to setting the
boot address which is done by the system controller.
As a bonus we no longer use an harcoded value to access the register
storing the boot address.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
arch/arm/mach-mvebu/headsmp-a9.S | 15 ------------
arch/arm/mach-mvebu/platsmp-a9.c | 42 +++------------------------------
arch/arm/mach-mvebu/system-controller.c | 31 ++++++++++++++++++++++++
3 files changed, 34 insertions(+), 54 deletions(-)
@@ -63,21 +38,10 @@ static int __cpuinit mvebu_cortex_a9_boot_secondary(unsigned int cpu,*address.*/hw_cpu=cpu_logical_map(cpu);--if(of_machine_is_compatible("marvell,armada375")){-u32dev,rev;--if(mvebu_get_soc_id(&dev,&rev)==0&&-rev==ARMADA_375_Z1_REV)-armada_375_smp_cpu1_enable_wa();-+if(of_machine_is_compatible("marvell,armada375"))mvebu_system_controller_set_cpu_boot_addr(mvebu_cortex_a9_secondary_startup);-}-else{-mvebu_pmsu_set_cpu_boot_addr(hw_cpu,-mvebu_cortex_a9_secondary_startup);-}-+else+mvebu_pmsu_set_cpu_boot_addr(hw_cpu,mvebu_cortex_a9_secondary_startup);smp_wmb();ret=mvebu_cpu_reset_deassert(hw_cpu);if(ret){
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:42
From: Gregory CLEMENT <redacted>
Most of the function related to the PMSU are not specific to the
Armada 370 or Armada XP SoCs. They can also be used for most of the
other mvebu ARMv7 SoCs, and will actually be used to support cpuidle
on Armada 38x.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
arch/arm/mach-mvebu/armada-370-xp.h | 1 -
arch/arm/mach-mvebu/platsmp.c | 2 +-
arch/arm/mach-mvebu/pmsu.c | 34 +++++++++++++++++-----------------
arch/arm/mach-mvebu/pmsu.h | 2 ++
4 files changed, 20 insertions(+), 19 deletions(-)
@@ -132,7 +132,7 @@ int mvebu_setup_boot_addr_wa(unsigned int crypto_eng_target,return0;}-staticint__initarmada_370_xp_pmsu_init(void)+staticint__initmvebu_v7_pmsu_init(void){structdevice_node*np;structresourceres;
@@ -176,7 +176,7 @@ static int __init armada_370_xp_pmsu_init(void)returnret;}-staticvoidarmada_370_xp_pmsu_enable_l2_powerdown_onidle(void)+staticvoidmvebu_v7_pmsu_enable_l2_powerdown_onidle(void){u32reg;
@@ -190,7 +190,7 @@ static void armada_370_xp_pmsu_enable_l2_powerdown_onidle(void)}/* No locking is needed because we only access per-CPU registers */-staticintarmada_370_xp_prepare(unsignedlongdeepidle)+staticintmvebu_v7_pmsu_idle_prepare(booldeepidle){unsignedinthw_cpu=cpu_logical_map(smp_processor_id());u32reg;
@@ -233,7 +233,7 @@ int armada_370_xp_pmsu_idle_enter(unsigned long deepidle){intret;-ret=armada_370_xp_prepare(deepidle);+ret=mvebu_v7_pmsu_idle_prepare(deepidle);if(ret)returnret;
@@ -272,7 +272,7 @@ static int armada_370_xp_cpu_suspend(unsigned long deepidle)}/* No locking is needed because we only access per-CPU registers */-voidarmada_370_xp_pmsu_idle_exit(void)+voidmvebu_v7_pmsu_idle_exit(void){unsignedinthw_cpu=cpu_logical_map(smp_processor_id());u32reg;
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:43
From: Gregory CLEMENT <redacted>
In preparation to the addition of the cpuidle support for more SoCs,
this patch moves the Armada XP specific initialization to a separate
function.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
arch/arm/mach-mvebu/pmsu.c | 32 ++++++++++++++++++++------------
1 file changed, 20 insertions(+), 12 deletions(-)
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:44
From: Gregory CLEMENT <redacted>
The resume address used by the cpuidle code will not always be the
same depending on the SoC. Using a local variable to store the resume
address allows to keep the same function for the PM notifier but with
a different address. This address will be set during the
initialization of the cpuidle logic in pmsu.c.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
arch/arm/mach-mvebu/pmsu.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:45
From: Gregory CLEMENT <redacted>
On some mvebu v7 SoCs (the ones using a Cortex-A9 core and not a PJ4B
core), the snoop disabling feature does not exist as the hardware
coherency is handled in a different way. Therefore, in preparation to
the introduction of the cpuidle support for those SoCs, this commit
modifies the mvebu_v7_psmu_idle_prepare() function to take several
flags, which allow to decide whether snooping should be disabled, and
whether we should use the deep idle mode or not.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
arch/arm/mach-mvebu/pmsu.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
@@ -191,8 +191,14 @@ static void mvebu_v7_pmsu_enable_l2_powerdown_onidle(void)writel(reg,pmsu_mp_base+L2C_NFABRIC_PM_CTL);}+enumpmsu_idle_prepare_flags{+PMSU_PREPARE_NORMAL=0,+PMSU_PREPARE_DEEP_IDLE=BIT(0),+PMSU_PREPARE_SNOOP_DISABLE=BIT(1),+};+/* No locking is needed because we only access per-CPU registers */-staticintmvebu_v7_pmsu_idle_prepare(booldeepidle)+staticintmvebu_v7_pmsu_idle_prepare(unsignedlongflags){unsignedinthw_cpu=cpu_logical_map(smp_processor_id());u32reg;
@@ -216,26 +222,32 @@ static int mvebu_v7_pmsu_idle_prepare(bool deepidle)reg=readl(pmsu_mp_base+PMSU_CONTROL_AND_CONFIG(hw_cpu));/* ask HW to power down the L2 Cache if needed */-if(deepidle)+if(flags&PMSU_PREPARE_DEEP_IDLE)reg|=PMSU_CONTROL_AND_CONFIG_L2_PWDDN;/* request power down */reg|=PMSU_CONTROL_AND_CONFIG_PWDDN_REQ;writel(reg,pmsu_mp_base+PMSU_CONTROL_AND_CONFIG(hw_cpu));-/* Disable snoop disable by HW - SW is taking care of it */-reg=readl(pmsu_mp_base+PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu));-reg|=PMSU_CPU_POWER_DOWN_DIS_SNP_Q_SKIP;-writel(reg,pmsu_mp_base+PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu));+if(flags&PMSU_PREPARE_SNOOP_DISABLE){+/* Disable snoop disable by HW - SW is taking care of it */+reg=readl(pmsu_mp_base+PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu));+reg|=PMSU_CPU_POWER_DOWN_DIS_SNP_Q_SKIP;+writel(reg,pmsu_mp_base+PMSU_CPU_POWER_DOWN_CONTROL(hw_cpu));+}return0;}intarmada_370_xp_pmsu_idle_enter(unsignedlongdeepidle){+unsignedlongflags=PMSU_PREPARE_SNOOP_DISABLE;intret;-ret=mvebu_v7_pmsu_idle_prepare(deepidle);+if(deepidle)+flags|=PMSU_PREPARE_DEEP_IDLE;++ret=mvebu_v7_pmsu_idle_prepare(flags);if(ret)returnret;
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:46
From: Gregory CLEMENT <redacted>
The SCU address will be needed in other files than board-v7.c,
especially in pmsu.c for cpuidle related activities. So this patch
adds a function that allows to retrieve the virtual address at which
the SCU has been mapped.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
arch/arm/mach-mvebu/board-v7.c | 9 +++++++--
arch/arm/mach-mvebu/common.h | 2 ++
2 files changed, 9 insertions(+), 2 deletions(-)
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:47
From: Gregory CLEMENT <redacted>
The CA9 MPcore SoC Control block is a set of registers that allows to
configure certain internal aspects of the core blocks of the SoC
(Cortex-A9, L2 cache controller, etc.). In most cases, the default
values are fine so they aren't many reasons to touch those registers,
but there is one exception: to support cpuidle on Armada 38x, we need
to modify the value of the CA9 MPcore Reset Control register.
Therefore, this commit adds a new Device Tree binding for this
hardware block, and uses this new binding for the Armada 38x Device
Tree file.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
Cc: devicetree at vger.kernel.org
---
.../devicetree/bindings/arm/armada-380-mpcore-soc-ctrl.txt | 14 ++++++++++++++
arch/arm/boot/dts/armada-38x.dtsi | 5 +++++
2 files changed, 19 insertions(+)
create mode 100644 Documentation/devicetree/bindings/arm/armada-380-mpcore-soc-ctrl.txt
@@ -0,0 +1,14 @@+Marvell Armada 38x CA9 MPcore SoC Controller+============================================++Required properties:++- compatible: Should be "marvell,armada-380-mpcore-soc-ctrl".++- reg: should be the register base and length as documented in the+ datasheet for the CA9 MPcore SoC Control registers++mpcore-soc-ctrl at 20d20 {+ compatible = "marvell,armada-380-mpcore-soc-ctrl";+ reg = <0x20d20 0x6c>;+};
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:48
From: Gregory CLEMENT <redacted>
This driver will be able to manage the cpuidle for more SoCs than just
Armada 370 and XP. It will also support Armada 38x and potentially
other SoC of the Marvell Armada EBU family. To take this into account,
this patch renames the driver and its symbols.
It also changes the driver name from cpuidle-armada-370-xp to
cpuidle-armada-xp, because separate platform drivers will be
registered for the other SoC types. This change must be done
simultaneously in the cpuidle driver and in the PMSU code in order to
remain bisectable.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
arch/arm/mach-mvebu/pmsu.c | 2 +-
drivers/cpuidle/Kconfig.arm | 12 +++----
drivers/cpuidle/Makefile | 2 +-
...{cpuidle-armada-370-xp.c => cpuidle-mvebu-v7.c} | 39 +++++++++++-----------
4 files changed, 27 insertions(+), 28 deletions(-)
rename drivers/cpuidle/{cpuidle-armada-370-xp.c => cpuidle-mvebu-v7.c} (58%)
@@ -1,12 +1,6 @@## ARM CPU Idle drivers#-configARM_ARMADA_370_XP_CPUIDLE-bool"CPU Idle Driver for Armada 370/XP family processors"-depends onARCH_MVEBU-help-SelectthistoenablecpuidleonArmada370/XPprocessors.-configARM_BIG_LITTLE_CPUIDLEbool"Support for ARM big.LITTLE processors"depends onARCH_VEXPRESS_TC2_PM
@@ -61,3 +55,9 @@ config ARM_EXYNOS_CPUIDLEdepends onARCH_EXYNOShelpSelectthistoenablecpuidleforExynosprocessors++configARM_MVEBU_V7_CPUIDLE+bool"CPU Idle Driver for mvebu v7 family processors"+depends onARCH_MVEBU+help+SelectthistoenablecpuidleonArmada370,38xandXPprocessors.
@@ -7,7 +7,7 @@ obj-$(CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED) += coupled.o################################################################################### ARM SoC drivers-obj-$(CONFIG_ARM_ARMADA_370_XP_CPUIDLE)+=cpuidle-armada-370-xp.o+obj-$(CONFIG_ARM_MVEBU_V7_CPUIDLE)+=cpuidle-mvebu-v7.oobj-$(CONFIG_ARM_BIG_LITTLE_CPUIDLE)+=cpuidle-big_little.oobj-$(CONFIG_ARM_CLPS711X_CPUIDLE)+=cpuidle-clps711x.oobj-$(CONFIG_ARM_HIGHBANK_CPUIDLE)+=cpuidle-calxeda.o
diff --git a/drivers/cpuidle/cpuidle-armada-370-xp.c b/drivers/cpuidle/cpuidle-mvebu-v7.csimilarity index 58%rename from drivers/cpuidle/cpuidle-armada-370-xp.crename to drivers/cpuidle/cpuidle-mvebu-v7.cindex 28587d0..7252fd8 100644--- a/drivers/cpuidle/cpuidle-armada-370-xp.c+++ b/drivers/cpuidle/cpuidle-mvebu-v7.c
@@ -34,10 +33,10 @@ static int armada_370_xp_enter_idle(struct cpuidle_device *dev,booldeepidle=false;cpu_pm_enter();-if(drv->states[index].flags&ARMADA_370_XP_FLAG_DEEP_IDLE)+if(drv->states[index].flags&MVEBU_V7_FLAG_DEEP_IDLE)deepidle=true;-ret=armada_370_xp_cpu_suspend(deepidle);+ret=mvebu_v7_cpu_suspend(deepidle);if(ret)returnret;
@@ -46,11 +45,11 @@ static int armada_370_xp_enter_idle(struct cpuidle_device *dev,returnindex;}-staticstructcpuidle_driverarmada_370_xp_idle_driver={-.name="armada_370_xp_idle",+staticstructcpuidle_driverarmadaxp_idle_driver={+.name="armada_xp_idle",.states[0]=ARM_CPUIDLE_WFI_STATE,.states[1]={-.enter=armada_370_xp_enter_idle,+.enter=mvebu_v7_enter_idle,.exit_latency=10,.power_usage=50,.target_residency=100,
@@ -59,35 +58,35 @@ static struct cpuidle_driver armada_370_xp_idle_driver = {.desc="CPU power down",},.states[2]={-.enter=armada_370_xp_enter_idle,+.enter=mvebu_v7_enter_idle,.exit_latency=100,.power_usage=5,.target_residency=1000,.flags=CPUIDLE_FLAG_TIME_VALID|-ARMADA_370_XP_FLAG_DEEP_IDLE,+MVEBU_V7_FLAG_DEEP_IDLE,.name="MV CPU DEEP IDLE",.desc="CPU and L2 Fabric power down",},-.state_count=ARMADA_370_XP_MAX_STATES,+.state_count=3,};-staticintarmada_370_xp_cpuidle_probe(structplatform_device*pdev)+staticintmvebu_v7_cpuidle_probe(structplatform_device*pdev){-armada_370_xp_cpu_suspend=(void*)(pdev->dev.platform_data);-returncpuidle_register(&armada_370_xp_idle_driver,NULL);+mvebu_v7_cpu_suspend=pdev->dev.platform_data;+returncpuidle_register(&armadaxp_idle_driver,NULL);}-staticstructplatform_driverarmada_370_xp_cpuidle_plat_driver={+staticstructplatform_driverarmadaxp_cpuidle_plat_driver={.driver={-.name="cpuidle-armada-370-xp",+.name="cpuidle-armada-xp",.owner=THIS_MODULE,},-.probe=armada_370_xp_cpuidle_probe,+.probe=mvebu_v7_cpuidle_probe,};-module_platform_driver(armada_370_xp_cpuidle_plat_driver);+module_platform_driver(armadaxp_cpuidle_plat_driver);MODULE_AUTHOR("Gregory CLEMENT <gregory.clement@free-electrons.com>");-MODULE_DESCRIPTION("Armada 370/XP cpu idle driver");+MODULE_DESCRIPTION("Marvell EBU v7 cpuidle driver");MODULE_LICENSE("GPL");
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:49
This commit adds the list of cpuidle states supported by the Armada
370 SoC in the cpuidle-mvebu-v7 driver, as well as the necessary logic
around it to support this SoC.
Signed-off-by: Thomas Petazzoni <redacted>
---
drivers/cpuidle/cpuidle-mvebu-v7.c | 35 +++++++++++++++++++++++++++++++++--
1 file changed, 33 insertions(+), 2 deletions(-)
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:50
This commit adds the list of cpuidle states supported by the Armada
38x SoC in the cpuidle-mvebu-v7 driver, as well as the necessary logic
around it to support this SoC.
Signed-off-by: Thomas Petazzoni <redacted>
---
drivers/cpuidle/cpuidle-mvebu-v7.c | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:51
From: Gregory CLEMENT <redacted>
This commit introduces the cpuidle support for Armada 370. The main
difference compared to the already supported Armada XP is that the
Armada 370 has an issue caused by "a slow exit process from the deep
idle state due to heavy L1/L2 cache cleanup operations performed by
the BootROM software" (cf errata GL-BootROM-10).
To work around this issue, we replace the restart code of the BootROM
by some custom code located in an internal SRAM. For this purpose, we
use the common function mvebu_boot_addr_wa() introduced in the commit
"ARM: mvebu: Add a common function for the boot address work around".
The message in case of failure to suspend the system was switched from
the warn level to the debug level. Indeed due to the "slow exit
process from the deep idle state" in Armada 370, this situation
happens quite often. Using the debug level avoids spamming the kernel
logs, but still allows to enable it if needed.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
arch/arm/mach-mvebu/pmsu.c | 51 +++++++++++++++++++++++++++++++++++++++-------
1 file changed, 44 insertions(+), 7 deletions(-)
@@ -165,6 +165,8 @@ static int __init mvebu_v7_pmsu_init(void)gotoout;}+pmsu_mp_phys_base=res.start;+pmsu_mp_base=ioremap(res.start,resource_size(&res));if(!pmsu_mp_base){pr_err("unable to map registers\n");
@@ -275,7 +277,7 @@ int armada_370_xp_pmsu_idle_enter(unsigned long deepidle)"isb ":::"r0");-pr_warn("Failed to suspend the system\n");+pr_debug("Failed to suspend the system\n");return0;}
@@ -325,7 +327,39 @@ static struct notifier_block mvebu_v7_cpu_pm_notifier = {.notifier_call=mvebu_v7_cpu_pm_notify,};-staticint__initarmada_xp_cpuidle_init(void)+staticstructplatform_devicemvebu_v7_cpuidle_device;++static__initintarmada_370_cpuidle_init(void)+{+structdevice_node*np;+phys_addr_tredirect_reg;++np=of_find_compatible_node(NULL,NULL,"marvell,coherency-fabric");+if(!np)+return-ENODEV;+of_node_put(np);++/*+*OnArmada370,thereis"a slow exit process from the deep+*idlestateduetoheavyL1/L2cachecleanupoperations+*performedbytheBootROMsoftware". To avoid this, we+*replacetherestartcodeofthebootrombyaasimplejump+*tothebootaddress.Thenthecodelocatedatthisboot+*addresswilltakecareoftheinitialization.+*/+redirect_reg=pmsu_mp_phys_base+PMSU_BOOT_ADDR_REDIRECT_OFFSET(0);+mvebu_setup_boot_addr_wa(ARMADA_370_CRYPT0_ENG_TARGET,+ARMADA_370_CRYPT0_ENG_ATTR,+redirect_reg);++mvebu_cpu_resume=armada_370_xp_cpu_resume;+mvebu_v7_cpuidle_device.dev.platform_data=armada_370_xp_cpu_suspend;+mvebu_v7_cpuidle_device.name="cpuidle-armada-370";++return0;+}++static__initintarmada_xp_cpuidle_init(void){structdevice_node*np;
@@ -336,6 +370,7 @@ static int __init armada_xp_cpuidle_init(void)mvebu_cpu_resume=armada_370_xp_cpu_resume;mvebu_v7_cpuidle_device.dev.platform_data=armada_370_xp_cpu_suspend;+mvebu_v7_cpuidle_device.name="cpuidle-armada-xp";return0;}
@@ -352,6 +387,8 @@ static int __init mvebu_v7_cpu_pm_init(void)if(of_machine_is_compatible("marvell,armadaxp"))ret=armada_xp_cpuidle_init();+elseif(of_machine_is_compatible("marvell,armada370"))+ret=armada_370_cpuidle_init();elsereturn0;
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:52
From: Gregory CLEMENT <redacted>
Unlike the Armada XP and the Armada 370, this SoC uses a Cortex A9
core. Consequently, the procedure to enter the idle state is
different: interaction with the SCU, not disabling snooping, etc.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
arch/arm/mach-mvebu/pmsu.c | 85 ++++++++++++++++++++++++++++++++++++++++++-
arch/arm/mach-mvebu/pmsu_ll.S | 14 +++++++
2 files changed, 98 insertions(+), 1 deletion(-)
@@ -287,6 +302,32 @@ static int armada_370_xp_cpu_suspend(unsigned long deepidle)returncpu_suspend(deepidle,armada_370_xp_pmsu_idle_enter);}+staticintarmada_38x_do_cpu_suspend(unsignedlongdeepidle)+{+unsignedlongflags=0;++if(deepidle)+flags|=PMSU_PREPARE_DEEP_IDLE;++mvebu_v7_pmsu_idle_prepare(flags);+/*+*Alreadyflushedcache,butdoitagainastheoutercache+*functionsdirtythecachewithspinlocks+*/+v7_exit_coherency_flush(louis);++scu_power_mode(mvebu_get_scu_base(),SCU_PM_POWEROFF);++cpu_do_idle();++return1;+}++staticintarmada_38x_cpu_suspend(unsignedlongdeepidle)+{+returncpu_suspend(false,armada_38x_do_cpu_suspend);+}+/* No locking is needed because we only access per-CPU registers */voidmvebu_v7_pmsu_idle_exit(void){
@@ -295,7 +336,6 @@ void mvebu_v7_pmsu_idle_exit(void)if(pmsu_mp_base==NULL)return;-/* cancel ask HW to power down the L2 Cache if possible */reg=readl(pmsu_mp_base+PMSU_CONTROL_AND_CONFIG(hw_cpu));reg&=~PMSU_CONTROL_AND_CONFIG_L2_PWDDN;
@@ -359,6 +399,47 @@ static __init int armada_370_cpuidle_init(void)return0;}+static__initintarmada_38x_cpuidle_init(void)+{+structdevice_node*np;+void__iomem*mpsoc_base;+u32reg;++np=of_find_compatible_node(NULL,NULL,+"marvell,armada-380-coherency-fabric");+if(!np)+return-ENODEV;+of_node_put(np);++np=of_find_compatible_node(NULL,NULL,+"marvell,armada-380-mpcore-soc-ctrl");+if(!np)+return-ENODEV;+mpsoc_base=of_iomap(np,0);+BUG_ON(!mpsoc_base);+of_node_put(np);++/* Set up reset mask when powering down the cpus */+reg=readl(mpsoc_base+MPCORE_RESET_CTL);+reg|=MPCORE_RESET_CTL_L2;+reg|=MPCORE_RESET_CTL_DEBUG;+writel(reg,mpsoc_base+MPCORE_RESET_CTL);+iounmap(mpsoc_base);++/* Set up delay */+reg=readl(pmsu_mp_base+PMSU_POWERDOWN_DELAY);+reg&=~PMSU_POWERDOWN_DELAY_MASK;+reg|=PMSU_DFLT_ARMADA38X_DELAY;+reg|=PMSU_POWERDOWN_DELAY_PMU;+writel(reg,pmsu_mp_base+PMSU_POWERDOWN_DELAY);++mvebu_cpu_resume=armada_38x_cpu_resume;+mvebu_v7_cpuidle_device.dev.platform_data=armada_38x_cpu_suspend;+mvebu_v7_cpuidle_device.name="cpuidle-armada-38x";++return0;+}+static__initintarmada_xp_cpuidle_init(void){structdevice_node*np;
@@ -389,6 +470,8 @@ static int __init mvebu_v7_cpu_pm_init(void)ret=armada_xp_cpuidle_init();elseif(of_machine_is_compatible("marvell,armada370"))ret=armada_370_cpuidle_init();+elseif(of_machine_is_compatible("marvell,armada380"))+ret=armada_38x_cpuidle_init();elsereturn0;
@@ -23,6 +23,20 @@ ARM_BE8(setend be ) @ go BE8 if entered LEbcpu_resumeENDPROC(armada_370_xp_cpu_resume)+ENTRY(armada_38x_cpu_resume)+/*doweneeditforArmada38x*/+ARM_BE8(setendbe)@goBE8ifenteredLE+blv7_invalidate_l1+mrcp15,4,r1,c15,c0@getSCUbaseaddress+orrr1,r1,#0x8 @ SCU CPU Power Status Register+mrc15,0,r0,cr0,cr0,5@gettheCPUID+andr0,r0,#15+addr1,r1,r0+movr0,#0x0+strbr0,[r1]@switchSCUpowerstatetoNormalmode+bcpu_resume+ENDPROC(armada_38x_cpu_resume)+.globalmvebu_boot_wa_start.globalmvebu_boot_wa_end
From: Thomas Petazzoni <hidden> Date: 2014-07-23 13:00:53
From: Gregory CLEMENT <redacted>
The Marvell EBU SoCs such as Armada 370, Armada XP or Armada 38x now
support cpuidle, so this commit enables the appropriate Kconfig
options in mvebu_v7_defconfig.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
arch/arm/configs/mvebu_v7_defconfig | 2 ++
1 file changed, 2 insertions(+)
From: Daniel Lezcano <hidden> Date: 2014-07-24 09:15:15
On 07/23/2014 03:00 PM, Thomas Petazzoni wrote:
From: Gregory CLEMENT <redacted>
This driver will be able to manage the cpuidle for more SoCs than just
Armada 370 and XP. It will also support Armada 38x and potentially
other SoC of the Marvell Armada EBU family. To take this into account,
this patch renames the driver and its symbols.
It also changes the driver name from cpuidle-armada-370-xp to
cpuidle-armada-xp, because separate platform drivers will be
registered for the other SoC types. This change must be done
simultaneously in the cpuidle driver and in the PMSU code in order to
remain bisectable.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
@@ -1,12 +1,6 @@## ARM CPU Idle drivers#-configARM_ARMADA_370_XP_CPUIDLE-bool"CPU Idle Driver for Armada 370/XP family processors"-depends onARCH_MVEBU-help-SelectthistoenablecpuidleonArmada370/XPprocessors.-configARM_BIG_LITTLE_CPUIDLEbool"Support for ARM big.LITTLE processors"depends onARCH_VEXPRESS_TC2_PM
@@ -61,3 +55,9 @@ config ARM_EXYNOS_CPUIDLEdepends onARCH_EXYNOShelpSelectthistoenablecpuidleforExynosprocessors++configARM_MVEBU_V7_CPUIDLE+bool"CPU Idle Driver for mvebu v7 family processors"+depends onARCH_MVEBU+help+SelectthistoenablecpuidleonArmada370,38xandXPprocessors.
diff --git a/drivers/cpuidle/cpuidle-armada-370-xp.c b/drivers/cpuidle/cpuidle-mvebu-v7.csimilarity index 58%rename from drivers/cpuidle/cpuidle-armada-370-xp.crename to drivers/cpuidle/cpuidle-mvebu-v7.cindex 28587d0..7252fd8 100644--- a/drivers/cpuidle/cpuidle-armada-370-xp.c+++ b/drivers/cpuidle/cpuidle-mvebu-v7.c
@@ -34,10 +33,10 @@ static int armada_370_xp_enter_idle(struct cpuidle_device *dev,booldeepidle=false;cpu_pm_enter();-if(drv->states[index].flags&ARMADA_370_XP_FLAG_DEEP_IDLE)+if(drv->states[index].flags&MVEBU_V7_FLAG_DEEP_IDLE)deepidle=true;-ret=armada_370_xp_cpu_suspend(deepidle);+ret=mvebu_v7_cpu_suspend(deepidle);if(ret)returnret;
@@ -46,11 +45,11 @@ static int armada_370_xp_enter_idle(struct cpuidle_device *dev,returnindex;}-staticstructcpuidle_driverarmada_370_xp_idle_driver={-.name="armada_370_xp_idle",+staticstructcpuidle_driverarmadaxp_idle_driver={+.name="armada_xp_idle",.states[0]=ARM_CPUIDLE_WFI_STATE,.states[1]={-.enter=armada_370_xp_enter_idle,+.enter=mvebu_v7_enter_idle,.exit_latency=10,.power_usage=50,.target_residency=100,
@@ -59,35 +58,35 @@ static struct cpuidle_driver armada_370_xp_idle_driver = {.desc="CPU power down",},.states[2]={-.enter=armada_370_xp_enter_idle,+.enter=mvebu_v7_enter_idle,.exit_latency=100,.power_usage=5,.target_residency=1000,.flags=CPUIDLE_FLAG_TIME_VALID|-ARMADA_370_XP_FLAG_DEEP_IDLE,+MVEBU_V7_FLAG_DEEP_IDLE,.name="MV CPU DEEP IDLE",.desc="CPU and L2 Fabric power down",},-.state_count=ARMADA_370_XP_MAX_STATES,+.state_count=3,};-staticintarmada_370_xp_cpuidle_probe(structplatform_device*pdev)+staticintmvebu_v7_cpuidle_probe(structplatform_device*pdev){-armada_370_xp_cpu_suspend=(void*)(pdev->dev.platform_data);-returncpuidle_register(&armada_370_xp_idle_driver,NULL);+mvebu_v7_cpu_suspend=pdev->dev.platform_data;+returncpuidle_register(&armadaxp_idle_driver,NULL);}-staticstructplatform_driverarmada_370_xp_cpuidle_plat_driver={+staticstructplatform_driverarmadaxp_cpuidle_plat_driver={.driver={-.name="cpuidle-armada-370-xp",+.name="cpuidle-armada-xp",.owner=THIS_MODULE,},-.probe=armada_370_xp_cpuidle_probe,+.probe=mvebu_v7_cpuidle_probe,};-module_platform_driver(armada_370_xp_cpuidle_plat_driver);+module_platform_driver(armadaxp_cpuidle_plat_driver);MODULE_AUTHOR("Gregory CLEMENT <gregory.clement@free-electrons.com>");-MODULE_DESCRIPTION("Armada 370/XP cpu idle driver");+MODULE_DESCRIPTION("Marvell EBU v7 cpuidle driver");MODULE_LICENSE("GPL");
From: Daniel Lezcano <hidden> Date: 2014-07-24 09:17:09
On 07/23/2014 03:00 PM, Thomas Petazzoni wrote:
This commit adds the list of cpuidle states supported by the Armada
370 SoC in the cpuidle-mvebu-v7 driver, as well as the necessary logic
around it to support this SoC.
Signed-off-by: Thomas Petazzoni <redacted>
From: Daniel Lezcano <hidden> Date: 2014-07-24 09:17:37
On 07/23/2014 03:00 PM, Thomas Petazzoni wrote:
This commit adds the list of cpuidle states supported by the Armada
38x SoC in the cpuidle-mvebu-v7 driver, as well as the necessary logic
around it to support this SoC.
Signed-off-by: Thomas Petazzoni <redacted>
From: Jason Cooper <hidden> Date: 2014-07-24 12:00:34
On Thu, Jul 24, 2014 at 11:15:15AM +0200, Daniel Lezcano wrote:
On 07/23/2014 03:00 PM, Thomas Petazzoni wrote:
quoted
From: Gregory CLEMENT <redacted>
This driver will be able to manage the cpuidle for more SoCs than just
Armada 370 and XP. It will also support Armada 38x and potentially
other SoC of the Marvell Armada EBU family. To take this into account,
this patch renames the driver and its symbols.
It also changes the driver name from cpuidle-armada-370-xp to
cpuidle-armada-xp, because separate platform drivers will be
registered for the other SoC types. This change must be done
simultaneously in the cpuidle driver and in the PMSU code in order to
remain bisectable.
Signed-off-by: Gregory CLEMENT <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
Acked-by: Daniel Lezcano <redacted>
Thanks for getting on top of this so quickly after returning from
vacation!
thx,
Jason.
From: Jason Cooper <hidden> Date: 2014-07-24 12:03:49
Thomas, all,
On Wed, Jul 23, 2014 at 03:00:37PM +0200, Thomas Petazzoni wrote:
Hello,
Here comes the third version of the cpuidle support for Armada 370 and
Armada 38x.
We are hoping to see this patch series merged for 3.17.
Most patches are touching only arch/arm/mach-mvebu/ code so they
should be handled by the mvebu maintainers. However, patches 11-13 are
touching the mvebu cpuidle driver, with a possible issue on patch 11,
which touches both the cpuidle driver and the mach-mvebu code in order
to rename the driver without breaking functionality (if needed, we can
decide to split the commits, it would break functionality temporarly,
but not buildability).
Changes since v2
================
* According to the discussion with Daniel Lezcano (cpuidle
maintainer) and Arnd Bergmann, changed the cpuidle-mvebu-v7 driver
to actually register three separate cpuidle platform driver, one
per-SoC. This way, we don't need special platform data to convey
the SoC type being used, as this information is already available
by looking at the driver name.
This change impacts the patches "cpuidle: mvebu: rename the driver
from armada-370-xp to mvebu-v7", "cpuidle: mvebu: add Armada 370
support", "cpuidle: mvebu: add Armada 38x support", "ARM: mvebu:
add cpuidle support for Armada 370" and "ARM: mvebu: add cpuidle
support for Armada 38x". Other patches are unchanged. The patch
"cpuidle: mvebu: make the cpuidle driver capable of handling
multiple SoCs" was no longer needed, so it has been removed.
...
Gregory CLEMENT (14):
ARM: mvebu: split again armada_370_xp_pmsu_idle_enter() in PMSU code
ARM: mvebu: sort the #include of pmsu.c in alphabetic order
ARM: mvebu: add a common function for the boot address work around
ARM: mvebu: use the common function for Armada 375 SMP workaround
ARM: mvebu: rename the armada_370_xp symbols to mvebu_v7 in pmsu.c
ARM: mvebu: make the cpuidle initialization more generic
ARM: mvebu: use a local variable to store the resume address
ARM: mvebu: make the snoop disabling optional in
mvebu_v7_pmsu_idle_prepare()
ARM: mvebu: export the SCU address
ARM: mvebu: add CA9 MPcore SoC Controller node
cpuidle: mvebu: rename the driver from armada-370-xp to mvebu-v7
ARM: mvebu: add cpuidle support for Armada 370
ARM: mvebu: add cpuidle support for Armada 38x
ARM: mvebu: defconfig: enable cpuidle support in mvebu_v7_defconfig
Thomas Petazzoni (2):
cpuidle: mvebu: add Armada 370 support
cpuidle: mvebu: add Armada 38x support
.../bindings/arm/armada-380-mpcore-soc-ctrl.txt | 14 ++
arch/arm/boot/dts/armada-38x.dtsi | 5 +
arch/arm/configs/mvebu_v7_defconfig | 2 +
arch/arm/mach-mvebu/armada-370-xp.h | 1 -
arch/arm/mach-mvebu/board-v7.c | 9 +-
arch/arm/mach-mvebu/common.h | 2 +
arch/arm/mach-mvebu/headsmp-a9.S | 15 --
arch/arm/mach-mvebu/platsmp-a9.c | 42 +---
arch/arm/mach-mvebu/platsmp.c | 2 +-
arch/arm/mach-mvebu/pmsu.c | 273 ++++++++++++++++++---
arch/arm/mach-mvebu/pmsu.h | 5 +
arch/arm/mach-mvebu/pmsu_ll.S | 36 +++
arch/arm/mach-mvebu/system-controller.c | 31 +++
drivers/cpuidle/Kconfig.arm | 12 +-
drivers/cpuidle/Makefile | 2 +-
drivers/cpuidle/cpuidle-armada-370-xp.c | 93 -------
drivers/cpuidle/cpuidle-mvebu-v7.c | 150 +++++++++++
17 files changed, 500 insertions(+), 194 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/armada-380-mpcore-soc-ctrl.txt
delete mode 100644 drivers/cpuidle/cpuidle-armada-370-xp.c
create mode 100644 drivers/cpuidle/cpuidle-mvebu-v7.c
Whole series, except 10 (went to mvebu/dt), and 16 (went to
mvebu/defconfig) applied to mvebu/soc-cpuidle. Patches 11 to 13 applied
with Daniel's Ack.
It'll be in -next tonight.
thx,
Jason.
Whole series, except 10 (went to mvebu/dt), and 16 (went to
mvebu/defconfig) applied to mvebu/soc-cpuidle. Patches 11 to 13 applied
with Daniel's Ack.
It'll be in -next tonight.
Great, thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
From: Jason Cooper <hidden> Date: 2014-07-25 00:05:54
On Thu, Jul 24, 2014 at 08:03:49AM -0400, Jason Cooper wrote:
Thomas, all,
On Wed, Jul 23, 2014 at 03:00:37PM +0200, Thomas Petazzoni wrote:
quoted
Hello,
Here comes the third version of the cpuidle support for Armada 370 and
Armada 38x.
We are hoping to see this patch series merged for 3.17.
Most patches are touching only arch/arm/mach-mvebu/ code so they
should be handled by the mvebu maintainers. However, patches 11-13 are
touching the mvebu cpuidle driver, with a possible issue on patch 11,
which touches both the cpuidle driver and the mach-mvebu code in order
to rename the driver without breaking functionality (if needed, we can
decide to split the commits, it would break functionality temporarly,
but not buildability).
Changes since v2
================
* According to the discussion with Daniel Lezcano (cpuidle
maintainer) and Arnd Bergmann, changed the cpuidle-mvebu-v7 driver
to actually register three separate cpuidle platform driver, one
per-SoC. This way, we don't need special platform data to convey
the SoC type being used, as this information is already available
by looking at the driver name.
This change impacts the patches "cpuidle: mvebu: rename the driver
from armada-370-xp to mvebu-v7", "cpuidle: mvebu: add Armada 370
support", "cpuidle: mvebu: add Armada 38x support", "ARM: mvebu:
add cpuidle support for Armada 370" and "ARM: mvebu: add cpuidle
support for Armada 38x". Other patches are unchanged. The patch
"cpuidle: mvebu: make the cpuidle driver capable of handling
multiple SoCs" was no longer needed, so it has been removed.
...
quoted
Gregory CLEMENT (14):
ARM: mvebu: split again armada_370_xp_pmsu_idle_enter() in PMSU code
ARM: mvebu: sort the #include of pmsu.c in alphabetic order
ARM: mvebu: add a common function for the boot address work around
ARM: mvebu: use the common function for Armada 375 SMP workaround
ARM: mvebu: rename the armada_370_xp symbols to mvebu_v7 in pmsu.c
ARM: mvebu: make the cpuidle initialization more generic
ARM: mvebu: use a local variable to store the resume address
ARM: mvebu: make the snoop disabling optional in
mvebu_v7_pmsu_idle_prepare()
ARM: mvebu: export the SCU address
ARM: mvebu: add CA9 MPcore SoC Controller node
cpuidle: mvebu: rename the driver from armada-370-xp to mvebu-v7
ARM: mvebu: add cpuidle support for Armada 370
ARM: mvebu: add cpuidle support for Armada 38x
ARM: mvebu: defconfig: enable cpuidle support in mvebu_v7_defconfig
Thomas Petazzoni (2):
cpuidle: mvebu: add Armada 370 support
cpuidle: mvebu: add Armada 38x support
.../bindings/arm/armada-380-mpcore-soc-ctrl.txt | 14 ++
arch/arm/boot/dts/armada-38x.dtsi | 5 +
arch/arm/configs/mvebu_v7_defconfig | 2 +
arch/arm/mach-mvebu/armada-370-xp.h | 1 -
arch/arm/mach-mvebu/board-v7.c | 9 +-
arch/arm/mach-mvebu/common.h | 2 +
arch/arm/mach-mvebu/headsmp-a9.S | 15 --
arch/arm/mach-mvebu/platsmp-a9.c | 42 +---
arch/arm/mach-mvebu/platsmp.c | 2 +-
arch/arm/mach-mvebu/pmsu.c | 273 ++++++++++++++++++---
arch/arm/mach-mvebu/pmsu.h | 5 +
arch/arm/mach-mvebu/pmsu_ll.S | 36 +++
arch/arm/mach-mvebu/system-controller.c | 31 +++
drivers/cpuidle/Kconfig.arm | 12 +-
drivers/cpuidle/Makefile | 2 +-
drivers/cpuidle/cpuidle-armada-370-xp.c | 93 -------
drivers/cpuidle/cpuidle-mvebu-v7.c | 150 +++++++++++
17 files changed, 500 insertions(+), 194 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/armada-380-mpcore-soc-ctrl.txt
delete mode 100644 drivers/cpuidle/cpuidle-armada-370-xp.c
create mode 100644 drivers/cpuidle/cpuidle-mvebu-v7.c
Whole series, except 10 (went to mvebu/dt), and 16 (went to
mvebu/defconfig) applied to mvebu/soc-cpuidle. Patches 11 to 13 applied
with Daniel's Ack.
Now merged into mvebu/soc.
It's getting really close. I'll try to send out the pull request
tomorrow am.
thx,
Jason.