From patchwork Wed Feb 24 01:21:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 8397851 Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 68A2DC0553 for ; Wed, 24 Feb 2016 01:21:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE86B20259 for ; Wed, 24 Feb 2016 01:21:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 01CD92024F for ; Wed, 24 Feb 2016 01:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753487AbcBXBVl (ORCPT ); Tue, 23 Feb 2016 20:21:41 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:42579 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753478AbcBXBVl (ORCPT ); Tue, 23 Feb 2016 20:21:41 -0500 Received: from reginn.isobedori.kobe.vergenet.net (p5023-ipbfp803kobeminato.hyogo.ocn.ne.jp [123.221.39.23]) by kirsty.vergenet.net (Postfix) with ESMTPA id 3B87C25BE87; Wed, 24 Feb 2016 12:21:34 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1456276894; bh=9XGH3UD38UFGdTGvyQ1xjuudNw3O2Pg/DKVCJpiqoR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jX49H6MBOdHNL8tLjEACjS1V6fDZiHtvKgDRIAH3ytE4cTbPC1HyxeONLsjsfkVgv hQEo1eGtG7bAIjj3aRdH/THSX7ECAxkwzw+hcnVep12I3K9itLyKUo7pxtOauHkPoS 4su0EMb6mjfznWPFOPPbgHKilh9Nd8K8h5zLJpDo= Received: by reginn.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id A77FB9409EB; Wed, 24 Feb 2016 10:21:32 +0900 (JST) From: Simon Horman To: linux-renesas-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm , Geert Uytterhoeven , Simon Horman Subject: [PATCH 6/6] ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains Date: Wed, 24 Feb 2016 10:21:31 +0900 Message-Id: <71d076ceb245f0d9a05e552bbebd5911660bd2ac.1456275652.git.horms+renesas@verge.net.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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 From: Geert Uytterhoeven 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 Signed-off-by: Simon Horman --- 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 cd5f171f83ce..2824b81f1a39 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