From patchwork Wed Aug 20 13:32:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4751281 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0CCC79F344 for ; Wed, 20 Aug 2014 13:30:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C0F912015E for ; Wed, 20 Aug 2014 13:30:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 063162014A for ; Wed, 20 Aug 2014 13:30:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751912AbaHTNaM (ORCPT ); Wed, 20 Aug 2014 09:30:12 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:47591 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbaHTNaL (ORCPT ); Wed, 20 Aug 2014 09:30:11 -0400 Received: by mail-pd0-f177.google.com with SMTP id p10so11441012pdj.8 for ; Wed, 20 Aug 2014 06:30:08 -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=s4P/JyydLjN7iWHGDV/Z54Y9pymXC6KKthV1SdcdlvQ=; b=0mXP2cWYgaTMsMsoKfyjdgbemWofOzwLOSHGSZHcXYgElf4jKkfvIhfpoXtWMdqLer OxOgoe9iNZJVjH0kooBs+QGC9r5qJTNtj6vk+pVIPVf90SJimIN5iCJWB0be6AMSHjVd HJbffXLPVCX/0yLRIGn7sB16Ut7UplunshL/2EvLGoR7n16/XHrrPg2NH+ZdoGDxXcre WduIu8Q0MB5Kopz/MQzzwvJjTkGkiE3xM/b1rQiTNXFkGfI6yI594VGGKWTBIiB+JpGu W0/6qzaoq491yYJYau8xtVVGXS1nh3WcrLCb75WMv/ML7RNCmZj3YPXMixNWm+GAISJy EAtg== X-Received: by 10.66.163.38 with SMTP id yf6mr52896663pab.46.1408541408483; Wed, 20 Aug 2014 06:30:08 -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 zh7sm80335408pab.1.2014.08.20.06.30.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Aug 2014 06:30:07 -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:25 +0900 Message-Id: <20140820133225.808.88832.sendpatchset@w520> In-Reply-To: <20140820133121.808.91022.sendpatchset@w520> References: <20140820133121.808.91022.sendpatchset@w520> Subject: [PATCH 06/06] 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=-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_MOBILE 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 --- This is multiplatform preparation for R-Mobile SoCs. 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 */