Skip to content

Commit

Permalink
ARM: at91: handle CONFIG_PM for armv7m configurations
Browse files Browse the repository at this point in the history
There is currently no PM support for samx7 but the symbol can still be
selected. This avoids compilation issues.

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
  • Loading branch information
Alexandre Belloni committed Jun 2, 2017
1 parent 2d4c44e commit b2f0627
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions arch/arm/mach-at91/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
3 changes: 1 addition & 2 deletions arch/arm/mach-at91/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions arch/arm/mach-at91/samv7.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b2f0627

Please sign in to comment.