From 1aebea9bde46bc123b72a7218a4fd8d99bfa2a90 Mon Sep 17 00:00:00 2001 From: Yannic Moog Date: Mon, 15 Jan 2024 10:31:41 +0100 Subject: [PATCH] board: phytec: fix link error when disabling PHYTEC_SOM_DETECTION Commit aa7858fe5e2e ("board: phytec: som_detection: move definitions to source file") moved function definitions from header to source file. Makefile however was not updated to unconditionally (from [..]_SOM_DETECTION) build the imx8 and phytec som detection units. Also remove unused includes that cause build failures on arm 32bit boards. SoM detection shall support 32bit boards as well, but arch specific code should not be included in the generic module. Fixes: aa7858fe5e2e ("board: phytec: som_detection: move definitions to source file") Signed-off-by: Yannic Moog --- board/phytec/common/Makefile | 4 ++-- board/phytec/common/phytec_som_detection.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/board/phytec/common/Makefile b/board/phytec/common/Makefile index fe28964ce2..35c8174130 100644 --- a/board/phytec/common/Makefile +++ b/board/phytec/common/Makefile @@ -7,5 +7,5 @@ ifdef CONFIG_SPL_BUILD obj- := __dummy__.o endif -obj-$(CONFIG_PHYTEC_SOM_DETECTION) += phytec_som_detection.o -obj-$(CONFIG_PHYTEC_IMX8M_SOM_DETECTION) += imx8m_som_detection.o +obj-y += phytec_som_detection.o +obj-$(CONFIG_ARCH_IMX8M) += imx8m_som_detection.o diff --git a/board/phytec/common/phytec_som_detection.c b/board/phytec/common/phytec_som_detection.c index 1b10923b62..c73bf9721b 100644 --- a/board/phytec/common/phytec_som_detection.c +++ b/board/phytec/common/phytec_som_detection.c @@ -5,8 +5,6 @@ */ #include -#include -#include #include #include #include -- 2.39.5