From patchwork Tue Feb 16 15:31:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 8327961 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B70BF9F6E7 for ; Tue, 16 Feb 2016 15:33:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C84332010C for ; Tue, 16 Feb 2016 15:33:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E5EAA20272 for ; Tue, 16 Feb 2016 15:33:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755252AbcBPPdK (ORCPT ); Tue, 16 Feb 2016 10:33:10 -0500 Received: from andre.telenet-ops.be ([195.130.132.53]:39717 "EHLO andre.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755380AbcBPPcE (ORCPT ); Tue, 16 Feb 2016 10:32:04 -0500 Received: from ayla.of.borg ([84.195.106.123]) by andre.telenet-ops.be with bizsmtp id K3Y11s00h2fm56U013Y1p5; Tue, 16 Feb 2016 16:32:02 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1aVhbd-0002jO-LU; Tue, 16 Feb 2016 16:32:01 +0100 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1aVhbe-0000nr-Hv; Tue, 16 Feb 2016 16:32:02 +0100 From: Geert Uytterhoeven To: Simon Horman , Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org, linux-pm@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/4] ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains Date: Tue, 16 Feb 2016 16:31:49 +0100 Message-Id: <1455636712-3040-2-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455636712-3040-1-git-send-email-geert+renesas@glider.be> References: <1455636712-3040-1-git-send-email-geert+renesas@glider.be> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All supported Renesas ARM SoCs (except for Emma Mobile EV2) have clock domains. Some SoCs also have power domains. To ensure proper operation of on-SoC modules, module clocks must be ungated, and power domains must be powered up when needed. Currently the user can choose to build a kernel with power management enabled or disabled: - If CONFIG_PM=y, power domains and/or module clocks are handled dynamically by Runtime PM and the generic power domain. - If CONFIG_PM=n, power domains are assumed to be powered up by reset state or by the boot loader, and module clocks are handled by the legacy clock domain on driver (un)bind. The latter is implemented using a platform bus notifier, which applies not only to all on-SoC devices, but to all platform devices present in the system. To remove the dependency on implicit assumptions, and to get rid of the peculiarities of the legacy clock domain, enable CONFIG_PM and CONFIG_PM_GENERIC_DOMAINS unconditionally, for all Renesas ARM SoCs with clock and/or power domains. This does cause an increase in kernel size. Given bloat-o-meter reports a modest increase of 26 KiB for an RZ/A1H kernel, this should not be a problem, even when used on RZ/A1H with XIP and internal RAM only. Signed-off-by: Geert Uytterhoeven --- arch/arm/mach-shmobile/Kconfig | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index cd5f171f83ce6420..2824b81f1a392d87 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -6,28 +6,30 @@ config ARCH_SHMOBILE_MULTI config PM_RCAR bool - select PM_GENERIC_DOMAINS if PM + select PM + select PM_GENERIC_DOMAINS config PM_RMOBILE bool + select PM select PM_GENERIC_DOMAINS config ARCH_RCAR_GEN1 bool - select PM_RCAR if PM || SMP + select PM_RCAR select RENESAS_INTC_IRQPIN select SYS_SUPPORTS_SH_TMU config ARCH_RCAR_GEN2 bool - select PM_RCAR if PM || SMP + select PM_RCAR select RENESAS_IRQC select SYS_SUPPORTS_SH_CMT select PCI_DOMAINS if PCI config ARCH_RMOBILE bool - select PM_RMOBILE if PM + select PM_RMOBILE select SYS_SUPPORTS_SH_CMT select SYS_SUPPORTS_SH_TMU @@ -55,7 +57,8 @@ config ARCH_EMEV2 config ARCH_R7S72100 bool "RZ/A1H (R7S72100)" - select PM_GENERIC_DOMAINS if PM + select PM + select PM_GENERIC_DOMAINS select SYS_SUPPORTS_SH_MTU2 config ARCH_R8A73A4