Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1655706

[PATCH v4 4/6] ARM: at91: handle CONFIG_PM for armv7m configurations

From Alexandre Belloni <alexandre.belloni@free-electrons.com>
Newsgroups linux.kernel
Subject [PATCH v4 4/6] ARM: at91: handle CONFIG_PM for armv7m configurations
Date 2017-06-01 22:10 +0200
Message-ID <tNEzU-7oF-11@gated-at.bofh.it> (permalink)
References <tNEzT-7oF-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


There is currently no PM support for samx7 but the symbol can still be
selected. This avoids compilation issues.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/mach-at91/Kconfig  | 6 ++++++
 arch/arm/mach-at91/Makefile | 3 +--
 arch/arm/mach-at91/samv7.c  | 9 +++++++++
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 2594b6a412f0..7497a28a79d1 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -60,6 +60,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 a189081dccc0..ee34aa34cc51 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -9,8 +9,7 @@ obj-$(CONFIG_SOC_SAMA5)		+= sama5.o
 obj-$(CONFIG_SOC_SAMV7)		+= samv7.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/samv7.c b/arch/arm/mach-at91/samv7.c
index 11386f190c83..910f0c68db62 100644
--- a/arch/arm/mach-at91/samv7.c
+++ b/arch/arm/mach-at91/samv7.c
@@ -15,6 +15,15 @@
 #include <asm/system_misc.h>
 #include "generic.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 char *const samv7_dt_board_compat[] __initconst = {
 	"atmel,samv7",
 	NULL
-- 
2.11.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/6] ARM: at91: initial samx7 support Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-01 22:10 +0200
  [PATCH v4 3/6] ARM: at91: Add armv7m support Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-01 22:10 +0200
  [PATCH v4 4/6] ARM: at91: handle CONFIG_PM for armv7m configurations Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-01 22:10 +0200
  [PATCH v4 5/6] ARM: at91: add armv7m SoC detection Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-01 22:10 +0200
  [PATCH v4 6/6] ARM: at91: debug: add samv7x support Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-01 22:10 +0200
  [PATCH v4 1/6] ARM: at91: Documentation: add armv7m families Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-01 22:10 +0200
  [PATCH v4 2/6] ARM: at91: Document armv7m compatibles Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-01 22:10 +0200
  Re: [PATCH v4 0/6] ARM: at91: initial samx7 support Nicolas Ferre <nicolas.ferre@microchip.com> - 2017-06-02 09:30 +0200

csiph-web