From patchwork Thu Sep 22 22:22:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 9347083 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 48111607D0 for ; Thu, 22 Sep 2016 22:24:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E4FB2AC8F for ; Thu, 22 Sep 2016 22:24:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 233982ACB8; Thu, 22 Sep 2016 22:24:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A3F812AC8F for ; Thu, 22 Sep 2016 22:24:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bnCOd-0002dL-RD; Thu, 22 Sep 2016 22:23:11 +0000 Received: from down.free-electrons.com ([37.187.137.238] helo=mail.free-electrons.com) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bnCO7-00024n-Ed for linux-arm-kernel@lists.infradead.org; Thu, 22 Sep 2016 22:22:41 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 1CDD5110E; Fri, 23 Sep 2016 00:22:17 +0200 (CEST) Received: from localhost (unknown [88.191.26.124]) by mail.free-electrons.com (Postfix) with ESMTPSA id E40EE1BB; Fri, 23 Sep 2016 00:22:16 +0200 (CEST) From: Alexandre Belloni To: Nicolas Ferre Subject: [PATCH 2/4] ARM: at91: handle CONFIG_PM for armv7m configurations Date: Fri, 23 Sep 2016 00:22:06 +0200 Message-Id: <20160922222208.23798-3-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160922222208.23798-1-alexandre.belloni@free-electrons.com> References: <20160922222208.23798-1-alexandre.belloni@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160922_152239_751050_E23DA761 X-CRM114-Status: GOOD ( 11.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Szemz=C5=91=20Andr=C3=A1s?= MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There is currently no PM support for samx7 but the symbol can still be selected. This avoids compilation issues. Signed-off-by: Alexandre Belloni --- arch/arm/mach-at91/Kconfig | 6 ++++++ arch/arm/mach-at91/Makefile | 3 +-- arch/arm/mach-at91/samx7.c | 10 ++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 3ca2724a6ca6..df3b6efa888d 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -59,6 +59,7 @@ config SOC_AT91RM9200 bool "AT91RM9200" depends on ARCH_MULTI_V4T select ATMEL_AIC_IRQ + select ATMEL_PM if PM select ATMEL_ST select CPU_ARM920T select HAVE_AT91_USB_CLK @@ -73,6 +74,7 @@ config SOC_AT91SAM9 bool "AT91SAM9" depends on ARCH_MULTI_V5 select ATMEL_AIC_IRQ + select ATMEL_PM if PM select ATMEL_SDRAMC select CPU_ARM926T select HAVE_AT91_SMD @@ -131,9 +133,13 @@ config SOC_SAM_V7 config SOC_SAMA5 bool select ATMEL_AIC5_IRQ + select ATMEL_PM if PM select ATMEL_SDRAMC select MEMORY select SOC_SAM_V7 select SRAM if PM +config ATMEL_PM + bool + endif diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 84956a18d604..116691714bb8 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile @@ -10,8 +10,7 @@ obj-$(CONFIG_SOC_SAMA5) += sama5.o obj-$(CONFIG_SOC_SAMX7) += samx7.o # Power Management -obj-$(CONFIG_PM) += pm.o -obj-$(CONFIG_PM) += pm_suspend.o +obj-$(CONFIG_ATMEL_PM) += pm.o pm_suspend.o ifeq ($(CONFIG_CPU_V7),y) AFLAGS_pm_suspend.o := -march=armv7-a diff --git a/arch/arm/mach-at91/samx7.c b/arch/arm/mach-at91/samx7.c index bd33bc56278e..240f8cda79ee 100644 --- a/arch/arm/mach-at91/samx7.c +++ b/arch/arm/mach-at91/samx7.c @@ -16,6 +16,16 @@ #include "generic.h" #include "soc.h" + +#ifdef CONFIG_PM +/* This function has to be defined for various drivers that are using it */ +int at91_suspend_entering_slow_clock(void) +{ + return 0; +} +EXPORT_SYMBOL(at91_suspend_entering_slow_clock); +#endif + static const struct at91_soc samx7_socs[] = { AT91_SOC(SAME70Q21_CIDR_MATCH, SAME70Q21_EXID_MATCH, "same70q21", "samx7"),