From patchwork Wed Aug 20 13:32:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4751271 Return-Path: X-Original-To: patchwork-linux-sh@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 AC8AFC0338 for ; Wed, 20 Aug 2014 13:30:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0656820172 for ; Wed, 20 Aug 2014 13:30:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C73B32015E for ; Wed, 20 Aug 2014 13:30:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751857AbaHTNaE (ORCPT ); Wed, 20 Aug 2014 09:30:04 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:53120 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbaHTNaB (ORCPT ); Wed, 20 Aug 2014 09:30:01 -0400 Received: by mail-pa0-f49.google.com with SMTP id hz1so12011966pad.8 for ; Wed, 20 Aug 2014 06:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=+LwnNvfc2i9LrlTbTeQE0uBt0E5CYV/TXfvdd/Ea4x8=; b=a9oHALdJrK3/VeNdEW+jD614FLEAUavYNkf4ZUOnuc3rP2ko1Cgz9bzK1n9lkf509j lIX/gATeXgVm5bQKCwrGVD8zPg5t8nQ+E0Y13nco6czKkvBJTyxzk5Hfhfgaq1nh97O9 ZNFD9o52PHeOOq3wz3l+FAdaaMp97+mlZYggTC0W5guQLeKV31vaCkiZz3CmHmSf9KWe RAJPtWreCENOA70exKMZUjnlzw/2ThyEEDu41MvAM126bRKa7xGKkscSXHKJjqyuztkg Uf2iiPzZExZLzgz2jJsVXUOJAO1VW1Oj6AHRrYl2PNRXjDgr/bXQlR7psF3EIk/WZ+0A e4eg== X-Received: by 10.66.156.42 with SMTP id wb10mr22555821pab.155.1408541399417; Wed, 20 Aug 2014 06:29:59 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id w10sm22444288pbt.17.2014.08.20.06.29.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Aug 2014 06:29:58 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , horms@verge.net.au, geert+renesas@glider.be Date: Wed, 20 Aug 2014 22:32:12 +0900 Message-Id: <20140820133212.808.66810.sendpatchset@w520> In-Reply-To: <20140820133121.808.91022.sendpatchset@w520> References: <20140820133121.808.91022.sendpatchset@w520> Subject: [PATCH 05/06] ARM: shmobile: Cleanup pm-rcar.o build using Kconfig Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 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 --- 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0005/arch/arm/mach-shmobile/Kconfig +++ work/arch/arm/mach-shmobile/Kconfig 2014-08-19 22:23:13.000000000 +0900 @@ -2,13 +2,18 @@ config ARCH_SHMOBILE bool select ARCH_WANT_OPTIONAL_GPIOLIB +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 --- 0005/arch/arm/mach-shmobile/Makefile +++ work/arch/arm/mach-shmobile/Makefile 2014-08-19 22:24:59.000000000 +0900 @@ -11,9 +11,9 @@ obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a 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 @@ -48,12 +48,10 @@ smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.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 --- 0001/arch/arm/mach-shmobile/pm-rcar.c +++ work/arch/arm/mach-shmobile/pm-rcar.c 2014-08-19 22:26:10.000000000 +0900 @@ -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 return rcar_sysc_base; } - -#endif /* CONFIG_PM || CONFIG_SMP */