From patchwork Mon Aug 25 03:04:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4772301 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 9B92DC0338 for ; Mon, 25 Aug 2014 03:01:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ABE8320121 for ; Mon, 25 Aug 2014 03:01:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B50BA20114 for ; Mon, 25 Aug 2014 03:01:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753895AbaHYDBn (ORCPT ); Sun, 24 Aug 2014 23:01:43 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:40805 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753826AbaHYDBn (ORCPT ); Sun, 24 Aug 2014 23:01:43 -0400 Received: by mail-pa0-f50.google.com with SMTP id et14so19743053pad.37 for ; Sun, 24 Aug 2014 20:01:42 -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=Qvdet1CllbCx3CY+0zqx9yM1EnXya7vdaPVUhTkc0Q4=; b=Tv10JEOJwYtas7OZPA+KKVznJGVWCuO1JUBDkR4eTpqSsin9bNZozM2oRAHADh12R4 vOWnMin+zjIYxVyHExdxtNaSi180G7XTXGRCo/frtwXjW/4e7gRYhbBx6CJlgk9y/kNd U0yqetUxbtXcQEmbuSHWkrpXiXKJU2LvuuB0vYfZ8ycFQEPlN/QIADD6Gl3hzmu3GwYN BigBJ4zbj+niN6evUkbHZpLHuIv+eK+RilWEU9B1suO/7iOKbpSEUdwWP2hjl+RMrJBh PaBhSVwXKFkcKJ+33Xjv3/A2Dce0wIhzEQAEuqNvZykF4bPih8wL/zGmYkBJVuykkCAf pHng== X-Received: by 10.70.41.11 with SMTP id b11mr22846518pdl.11.1408935702762; Sun, 24 Aug 2014 20:01:42 -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 p6sm55034136pds.42.2014.08.24.20.01.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Aug 2014 20:01:41 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , horms@verge.net.au, geert+renesas@glider.be Date: Mon, 25 Aug 2014 12:04:01 +0900 Message-Id: <20140825030401.1936.7225.sendpatchset@w520> In-Reply-To: <20140825030316.1936.88249.sendpatchset@w520> References: <20140825030316.1936.88249.sendpatchset@w520> Subject: [PATCH v2 05/05] ARM: shmobile: Cleanup pm-rmobile.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=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 From: Magnus Damm Add a CONFIG_PM_RMOBILE entry and enable it for R-Mobile SoCs in case CONFIG_PM is set. Consolidate Makefile power management objects and get rid of #ifdefs in the C code. Signed-off-by: Magnus Damm Acked-by: Geert Uytterhoeven --- This is multiplatform preparation for R-Mobile SoCs. Changes since V1: - CONFIG_PM_MOBILE -> CONFIG_PM_RMOBILE typo fix, thanks Geert! arch/arm/mach-shmobile/Kconfig | 4 ++++ arch/arm/mach-shmobile/Makefile | 14 ++++++-------- arch/arm/mach-shmobile/pm-rmobile.c | 2 -- arch/arm/mach-shmobile/pm-rmobile.h | 4 ++-- 4 files changed, 12 insertions(+), 12 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 --- 0006/arch/arm/mach-shmobile/Kconfig +++ work/arch/arm/mach-shmobile/Kconfig 2014-08-19 22:28:58.000000000 +0900 @@ -5,6 +5,9 @@ config ARCH_SHMOBILE config PM_RCAR bool +config PM_RMOBILE + bool + config ARCH_RCAR_GEN1 bool select PM_RCAR if PM || SMP @@ -19,6 +22,7 @@ config ARCH_RCAR_GEN2 config ARCH_RMOBILE bool + select PM_RMOBILE if PM select SYS_SUPPORTS_SH_CMT select SYS_SUPPORTS_SH_TMU --- 0006/arch/arm/mach-shmobile/Makefile +++ work/arch/arm/mach-shmobile/Makefile 2014-08-19 22:35:23.000000000 +0900 @@ -6,10 +6,10 @@ obj-y := timer.o console.o # CPU objects -obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o -obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o +obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o pm-sh7372.o +obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o pm-sh73a0.o obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o -obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o +obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o pm-r8a7740.o obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o pm-r8a7779.o obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o pm-r8a7790.o @@ -49,12 +49,10 @@ 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_PM_RMOBILE) += pm-rmobile.o -# IRQ objects -obj-$(CONFIG_ARCH_SH7372) += entry-intc.o +# special sh7372 handling for IRQ objects and low level sleep code +obj-$(CONFIG_ARCH_SH7372) += entry-intc.o sleep-sh7372.o # Board objects ifdef CONFIG_ARCH_SHMOBILE_MULTI --- 0001/arch/arm/mach-shmobile/pm-rmobile.c +++ work/arch/arm/mach-shmobile/pm-rmobile.c 2014-08-19 22:30:37.000000000 +0900 @@ -27,7 +27,6 @@ #define PSTR_RETRIES 100 #define PSTR_DELAY_US 10 -#ifdef CONFIG_PM static int rmobile_pd_power_down(struct generic_pm_domain *genpd) { struct rmobile_pm_domain *rmobile_pd = to_rmobile_pd(genpd); @@ -151,4 +150,3 @@ void rmobile_add_devices_to_domains(stru rmobile_add_device_to_domain_td(data[j].domain_name, data[j].pdev, &latencies); } -#endif /* CONFIG_PM */ --- 0001/arch/arm/mach-shmobile/pm-rmobile.h +++ work/arch/arm/mach-shmobile/pm-rmobile.h 2014-08-19 22:30:52.000000000 +0900 @@ -36,7 +36,7 @@ struct pm_domain_device { struct platform_device *pdev; }; -#ifdef CONFIG_PM +#ifdef CONFIG_PM_RMOBILE extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num); extern void rmobile_add_device_to_domain_td(const char *domain_name, struct platform_device *pdev, @@ -58,6 +58,6 @@ extern void rmobile_add_devices_to_domai static inline void rmobile_add_devices_to_domains(struct pm_domain_device d[], int size) {} -#endif /* CONFIG_PM */ +#endif /* CONFIG_PM_RMOBILE */ #endif /* PM_RMOBILE_H */