From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751980AbbCTLoJ (ORCPT ); Fri, 20 Mar 2015 07:44:09 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:32826 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751403AbbCTLoG (ORCPT ); Fri, 20 Mar 2015 07:44:06 -0400 From: Daniel Lezcano To: rjw@rjwysocki.net, lorenzo.pieralisi@arm.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Catalin.Marinas@arm.com, robherring2@gmail.com, arnd@arndb.de, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, lina.iyer@linaro.org, sboyd@codeaurora.org Subject: [PATCH V3 0/8] ARM: cpuidle: Unify the ARM64/ARM DT approach Date: Fri, 20 Mar 2015 12:43:53 +0100 Message-Id: <1426851841-2072-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is a big number of cpuidle drivers for the ARM architecture. These drivers have been cleaned up and grouped into the drivers/cpuidle directory to keep track of the changes more easily and ensure the code is following the same scheme across the drivers. That had the benefit of simplifying the code and factor out a lot of common parts. Beside that, as the drivers belong to the 'drivers' directory, we had to split the arch specific bits and the generic code in order to keep everything self contained. The platform driver paradigm was used for this purpose. Unfortunately, this approach is now no longer accepted and a different solution must be provided to reach the same goal: one example is the Qualcomm cpuidle driver upstreaming attempt. In the meantime, ARM64 developed a generic cpuidle driver based on DT definition. The DT definition provides an 'enable-method' to specify one of the cpu operations (PSCI, ...). This patchset unify this driver with ARM32, using the same DT definition. Thanks with this patchset we can use the 'enable-method' to specify a cpu operations, hence get rid of the platform driver approach and go further in the cpuidle driver flexibility via the DT. Changelog: V3: * Fixed unroll loop when failing to register the device * Removed the per cpu cpuidle_device * Remove goto statement in the registration path * Fixed a compilation failure with allyesconfig on arm64 V2: * Used smp_operations style for cpuidle_ops * Fixed some nits in the comments * Added a patch to change the name of the functions * Added per cpu device registration patch Daniel Lezcano (8): ARM: cpuidle: Remove duplicate header inclusion ARM: cpuidle: Add a cpuidle ops structure to be used for DT ARM64: cpuidle: Replace cpu_suspend by the common ARM/ARM64 function ARM64: cpuidle: Rename cpu_init_idle to a common function name ARM64: cpuidle: Remove arm64 reference ARM: cpuidle: Enable the ARM64 driver for both ARM32/ARM64 ARM: cpuidle: Register per cpuidle device ARM: cpuidle: Change function name to be consistent with x86 arch/arm/include/asm/cpuidle.h | 23 +++++++ arch/arm/kernel/cpuidle.c | 74 +++++++++++++++++++- arch/arm/mach-davinci/cpuidle.c | 1 - arch/arm/mach-imx/cpuidle-imx6q.c | 1 - arch/arm/mach-imx/cpuidle-imx6sl.c | 1 - arch/arm/mach-imx/cpuidle-imx6sx.c | 1 - arch/arm/mach-omap2/cpuidle44xx.c | 1 - arch/arm/mach-s3c64xx/cpuidle.c | 2 +- arch/arm/mach-tegra/cpuidle-tegra20.c | 1 - arch/arm/mach-tegra/cpuidle-tegra30.c | 1 - arch/arm64/include/asm/cpuidle.h | 9 ++- arch/arm64/kernel/cpuidle.c | 2 +- drivers/cpuidle/Kconfig | 7 +- drivers/cpuidle/Kconfig.arm | 12 +++- drivers/cpuidle/Kconfig.arm64 | 13 ---- drivers/cpuidle/Makefile | 5 +- drivers/cpuidle/{cpuidle-arm64.c => cpuidle-arm.c} | 80 ++++++++++++++++------ drivers/cpuidle/cpuidle-at91.c | 1 - drivers/cpuidle/cpuidle-exynos.c | 1 - drivers/cpuidle/cpuidle-kirkwood.c | 1 - drivers/cpuidle/cpuidle-ux500.c | 1 - drivers/cpuidle/cpuidle-zynq.c | 1 - include/asm-generic/vmlinux.lds.h | 2 + 23 files changed, 178 insertions(+), 63 deletions(-) delete mode 100644 drivers/cpuidle/Kconfig.arm64 rename drivers/cpuidle/{cpuidle-arm64.c => cpuidle-arm.c} (57%) -- 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Lezcano Subject: [PATCH V3 0/8] ARM: cpuidle: Unify the ARM64/ARM DT approach Date: Fri, 20 Mar 2015 12:43:53 +0100 Message-ID: <1426851841-2072-1-git-send-email-daniel.lezcano@linaro.org> Return-path: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org, lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org Cc: linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Catalin.Marinas-5wv7dgnIgG8@public.gmane.org, robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, arnd-r2nGTMty4D4@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, lina.iyer-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org List-Id: devicetree@vger.kernel.org There is a big number of cpuidle drivers for the ARM architecture. These drivers have been cleaned up and grouped into the drivers/cpuidle directory to keep track of the changes more easily and ensure the code is following the same scheme across the drivers. That had the benefit of simplifying the code and factor out a lot of common parts. Beside that, as the drivers belong to the 'drivers' directory, we had to split the arch specific bits and the generic code in order to keep everything self contained. The platform driver paradigm was used for this purpose. Unfortunately, this approach is now no longer accepted and a different solution must be provided to reach the same goal: one example is the Qualcomm cpuidle driver upstreaming attempt. In the meantime, ARM64 developed a generic cpuidle driver based on DT definition. The DT definition provides an 'enable-method' to specify one of the cpu operations (PSCI, ...). This patchset unify this driver with ARM32, using the same DT definition. Thanks with this patchset we can use the 'enable-method' to specify a cpu operations, hence get rid of the platform driver approach and go further in the cpuidle driver flexibility via the DT. Changelog: V3: * Fixed unroll loop when failing to register the device * Removed the per cpu cpuidle_device * Remove goto statement in the registration path * Fixed a compilation failure with allyesconfig on arm64 V2: * Used smp_operations style for cpuidle_ops * Fixed some nits in the comments * Added a patch to change the name of the functions * Added per cpu device registration patch Daniel Lezcano (8): ARM: cpuidle: Remove duplicate header inclusion ARM: cpuidle: Add a cpuidle ops structure to be used for DT ARM64: cpuidle: Replace cpu_suspend by the common ARM/ARM64 function ARM64: cpuidle: Rename cpu_init_idle to a common function name ARM64: cpuidle: Remove arm64 reference ARM: cpuidle: Enable the ARM64 driver for both ARM32/ARM64 ARM: cpuidle: Register per cpuidle device ARM: cpuidle: Change function name to be consistent with x86 arch/arm/include/asm/cpuidle.h | 23 +++++++ arch/arm/kernel/cpuidle.c | 74 +++++++++++++++++++- arch/arm/mach-davinci/cpuidle.c | 1 - arch/arm/mach-imx/cpuidle-imx6q.c | 1 - arch/arm/mach-imx/cpuidle-imx6sl.c | 1 - arch/arm/mach-imx/cpuidle-imx6sx.c | 1 - arch/arm/mach-omap2/cpuidle44xx.c | 1 - arch/arm/mach-s3c64xx/cpuidle.c | 2 +- arch/arm/mach-tegra/cpuidle-tegra20.c | 1 - arch/arm/mach-tegra/cpuidle-tegra30.c | 1 - arch/arm64/include/asm/cpuidle.h | 9 ++- arch/arm64/kernel/cpuidle.c | 2 +- drivers/cpuidle/Kconfig | 7 +- drivers/cpuidle/Kconfig.arm | 12 +++- drivers/cpuidle/Kconfig.arm64 | 13 ---- drivers/cpuidle/Makefile | 5 +- drivers/cpuidle/{cpuidle-arm64.c => cpuidle-arm.c} | 80 ++++++++++++++++------ drivers/cpuidle/cpuidle-at91.c | 1 - drivers/cpuidle/cpuidle-exynos.c | 1 - drivers/cpuidle/cpuidle-kirkwood.c | 1 - drivers/cpuidle/cpuidle-ux500.c | 1 - drivers/cpuidle/cpuidle-zynq.c | 1 - include/asm-generic/vmlinux.lds.h | 2 + 23 files changed, 178 insertions(+), 63 deletions(-) delete mode 100644 drivers/cpuidle/Kconfig.arm64 rename drivers/cpuidle/{cpuidle-arm64.c => cpuidle-arm.c} (57%) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: daniel.lezcano@linaro.org (Daniel Lezcano) Date: Fri, 20 Mar 2015 12:43:53 +0100 Subject: [PATCH V3 0/8] ARM: cpuidle: Unify the ARM64/ARM DT approach Message-ID: <1426851841-2072-1-git-send-email-daniel.lezcano@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org There is a big number of cpuidle drivers for the ARM architecture. These drivers have been cleaned up and grouped into the drivers/cpuidle directory to keep track of the changes more easily and ensure the code is following the same scheme across the drivers. That had the benefit of simplifying the code and factor out a lot of common parts. Beside that, as the drivers belong to the 'drivers' directory, we had to split the arch specific bits and the generic code in order to keep everything self contained. The platform driver paradigm was used for this purpose. Unfortunately, this approach is now no longer accepted and a different solution must be provided to reach the same goal: one example is the Qualcomm cpuidle driver upstreaming attempt. In the meantime, ARM64 developed a generic cpuidle driver based on DT definition. The DT definition provides an 'enable-method' to specify one of the cpu operations (PSCI, ...). This patchset unify this driver with ARM32, using the same DT definition. Thanks with this patchset we can use the 'enable-method' to specify a cpu operations, hence get rid of the platform driver approach and go further in the cpuidle driver flexibility via the DT. Changelog: V3: * Fixed unroll loop when failing to register the device * Removed the per cpu cpuidle_device * Remove goto statement in the registration path * Fixed a compilation failure with allyesconfig on arm64 V2: * Used smp_operations style for cpuidle_ops * Fixed some nits in the comments * Added a patch to change the name of the functions * Added per cpu device registration patch Daniel Lezcano (8): ARM: cpuidle: Remove duplicate header inclusion ARM: cpuidle: Add a cpuidle ops structure to be used for DT ARM64: cpuidle: Replace cpu_suspend by the common ARM/ARM64 function ARM64: cpuidle: Rename cpu_init_idle to a common function name ARM64: cpuidle: Remove arm64 reference ARM: cpuidle: Enable the ARM64 driver for both ARM32/ARM64 ARM: cpuidle: Register per cpuidle device ARM: cpuidle: Change function name to be consistent with x86 arch/arm/include/asm/cpuidle.h | 23 +++++++ arch/arm/kernel/cpuidle.c | 74 +++++++++++++++++++- arch/arm/mach-davinci/cpuidle.c | 1 - arch/arm/mach-imx/cpuidle-imx6q.c | 1 - arch/arm/mach-imx/cpuidle-imx6sl.c | 1 - arch/arm/mach-imx/cpuidle-imx6sx.c | 1 - arch/arm/mach-omap2/cpuidle44xx.c | 1 - arch/arm/mach-s3c64xx/cpuidle.c | 2 +- arch/arm/mach-tegra/cpuidle-tegra20.c | 1 - arch/arm/mach-tegra/cpuidle-tegra30.c | 1 - arch/arm64/include/asm/cpuidle.h | 9 ++- arch/arm64/kernel/cpuidle.c | 2 +- drivers/cpuidle/Kconfig | 7 +- drivers/cpuidle/Kconfig.arm | 12 +++- drivers/cpuidle/Kconfig.arm64 | 13 ---- drivers/cpuidle/Makefile | 5 +- drivers/cpuidle/{cpuidle-arm64.c => cpuidle-arm.c} | 80 ++++++++++++++++------ drivers/cpuidle/cpuidle-at91.c | 1 - drivers/cpuidle/cpuidle-exynos.c | 1 - drivers/cpuidle/cpuidle-kirkwood.c | 1 - drivers/cpuidle/cpuidle-ux500.c | 1 - drivers/cpuidle/cpuidle-zynq.c | 1 - include/asm-generic/vmlinux.lds.h | 2 + 23 files changed, 178 insertions(+), 63 deletions(-) delete mode 100644 drivers/cpuidle/Kconfig.arm64 rename drivers/cpuidle/{cpuidle-arm64.c => cpuidle-arm.c} (57%) -- 1.9.1