From patchwork Thu Sep 4 01:12:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 4841871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 31849C0338 for ; Thu, 4 Sep 2014 01:17:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4CCC02020A for ; Thu, 4 Sep 2014 01:17:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D01B200D6 for ; Thu, 4 Sep 2014 01:17:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XPLdC-00022N-HR; Thu, 04 Sep 2014 01:14:34 +0000 Received: from kirsty.vergenet.net ([202.4.237.240]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XPLc1-0000fq-9n for linux-arm-kernel@lists.infradead.org; Thu, 04 Sep 2014 01:13:22 +0000 Received: from ayumi.isobedori.kobe.vergenet.net (p4222-ipbfp1605kobeminato.hyogo.ocn.ne.jp [114.154.95.222]) by kirsty.vergenet.net (Postfix) with ESMTP id 6EFFD267175; Thu, 4 Sep 2014 11:12:39 +1000 (EST) Received: by ayumi.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id A4ECFEDEAE1; Thu, 4 Sep 2014 10:12:42 +0900 (JST) From: Simon Horman To: linux-sh@vger.kernel.org Subject: [PATCH 4/9] ARM: shmobile: Cleanup pm-rcar.o build using Kconfig Date: Thu, 4 Sep 2014 10:12:35 +0900 Message-Id: <1a950ca536dd5c40167ef58951e738ae430fa96d.1409792454.git.horms+renesas@verge.net.au> X-Mailer: git-send-email 2.0.1 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140903_181321_712944_4D0CA177 X-CRM114-Status: GOOD ( 12.26 ) X-Spam-Score: -4.0 (----) Cc: Magnus Damm , Magnus Damm , linux-arm-kernel@lists.infradead.org, Simon Horman X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, 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: Magnus Damm Add a CONFIG_PM_RCAR entry and enable it for R-Car Generation 1 or 2 in case CONFIG_PM or CONFIG_SMP is set. Consolidate power management objects and get rid of #ifdefs in the C code. Signed-off-by: Magnus Damm Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/Kconfig | 5 +++++ arch/arm/mach-shmobile/Makefile | 10 ++++------ arch/arm/mach-shmobile/pm-rcar.c | 4 ---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 73d6d3d..cd13021 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -1,13 +1,18 @@ config ARCH_SHMOBILE bool +config PM_RCAR + bool + config ARCH_RCAR_GEN1 bool + select PM_RCAR if PM || SMP select RENESAS_INTC_IRQPIN select SYS_SUPPORTS_SH_TMU config ARCH_RCAR_GEN2 bool + select PM_RCAR if PM || SMP select RENESAS_IRQC select SYS_SUPPORTS_SH_CMT diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index ddc91fd..c9ad169 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile @@ -13,9 +13,9 @@ obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o -obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o -obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o -obj-$(CONFIG_ARCH_R8A7791) += setup-r8a7791.o +obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o pm-r8a7779.o +obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o pm-r8a7790.o +obj-$(CONFIG_ARCH_R8A7791) += setup-r8a7791.o pm-r8a7791.o obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o @@ -51,12 +51,10 @@ smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o obj-$(CONFIG_SUSPEND) += suspend.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_CPU_FREQ) += cpufreq.o +obj-$(CONFIG_PM_RCAR) += pm-rcar.o obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o pm-rmobile.o obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o pm-rmobile.o -obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o pm-rcar.o -obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o -obj-$(CONFIG_ARCH_R8A7791) += pm-r8a7791.o pm-rcar.o # IRQ objects obj-$(CONFIG_ARCH_SH7372) += entry-intc.o diff --git a/arch/arm/mach-shmobile/pm-rcar.c b/arch/arm/mach-shmobile/pm-rcar.c index 34b8a56..00022ee 100644 --- a/arch/arm/mach-shmobile/pm-rcar.c +++ b/arch/arm/mach-shmobile/pm-rcar.c @@ -31,8 +31,6 @@ #define SYSCISR_RETRIES 1000 #define SYSCISR_DELAY_US 1 -#if defined(CONFIG_PM) || defined(CONFIG_SMP) - static void __iomem *rcar_sysc_base; static DEFINE_SPINLOCK(rcar_sysc_lock); /* SMP CPUs + I/O devices */ @@ -137,5 +135,3 @@ void __iomem *rcar_sysc_init(phys_addr_t base) return rcar_sysc_base; } - -#endif /* CONFIG_PM || CONFIG_SMP */