[PATCH 1/2] ARM: at91: fix link error

From: Claudiu Beznea
Date: Mon Jul 19 2021 - 04:04:09 EST

PM support for SAMA7G5 has been submitted to mailing list before SAMA7G5
soc support thus the SAMA7G5 was not present in AT91 Kconfig file at
that moment. SoC support for SAMA7G5 hasn't added the proper PM flags to
Kconfig thus the link error bellow:

arch/arm/mach-at91/sama7.o: In function `sama7_dt_device_init':
sama7.c:(.init.text+0x18): undefined reference to `sama7_pm_init'
make: *** [Makefile:1176: vmlinux] Error 1

Add proper flags to AT91 Kconfig file to solve the issue.

Fixes: 5617a08dd9e1 ("ARM: at91: pm: add pm support for SAMA7G5")
Fixes: 18d694ecd91e ("ARM: at91: add new SoC sama7g5")
Signed-off-by: Claudiu Beznea <claudiu.beznea@xxxxxxxxxxxxx>
arch/arm/mach-at91/Kconfig | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index f52b46bccd85..b09bb2279f7f 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -204,6 +204,9 @@ config ATMEL_PM
config SOC_SAMA7
select ARM_GIC
+ select ATMEL_PM if PM
select MEMORY
select SOC_SAM_V7
+ select SRAM if PM