summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2024-02-05 13:57:28 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-02-08 08:12:39 +0100
commitc8bf88f4f96af2cf67dd6cda9c9374d3fc07e26f (patch)
tree7eb313e023e6229fec5636b273f578aff794537b
parentddf0d5cf35aa5e5e13a3e3a09ea5eea997dcbbd8 (diff)
downloadbarebox-c8bf88f4f96a.tar.gz
barebox-c8bf88f4f96a.tar.xz
ARM: i.MX: add Kconfig option for scratchmem
scratch.c is needed for both i.MX8 and i.MX9, but is compiled only for i.MX8, so linking will failed if only i.MX9 is enabled. Add a Kconfig option for it and select it from both i.MX8 and i.MX9. Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20240205125728.2470228-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-imx/Kconfig4
-rw-r--r--arch/arm/mach-imx/Makefile3
2 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index b6936a7554..a87ba1cef0 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -42,6 +42,10 @@ config ARCH_IMX_ROMAPI
def_bool y
depends on ARCH_IMX8M || ARCH_IMX9
+config ARCH_IMX_SCRATCHMEM
+ def_bool y
+ depends on ARCH_IMX8M || ARCH_IMX9
+
#
# PMIC configuration found on i.MX51 Babbadge board
#
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 9505cffa81..ce8af486ae 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -17,7 +17,8 @@ CFLAGS_imx6.o := -march=armv7-a
lwl-$(CONFIG_ARCH_IMX6) += imx6-mmdc.o
obj-$(CONFIG_ARCH_IMX7) += imx7.o
obj-$(CONFIG_ARCH_VF610) += vf610.o
-obj-pbl-$(CONFIG_ARCH_IMX8M) += imx8m.o scratch.o
+obj-pbl-$(CONFIG_ARCH_IMX8M) += imx8m.o
+obj-pbl-$(CONFIG_ARCH_IMX_SCRATCHMEM) += scratch.o
obj-$(CONFIG_ARCH_IMX9) += imx9.o
lwl-$(CONFIG_ARCH_IMX_ATF) += atf.o
obj-pbl-$(CONFIG_ARCH_IMX8M) += tzasc.o