From: Simon Glass <sjg@chromium.org>
Date: Thu, 29 Oct 2020 17:08:25 +0000 (-0600)
Subject: imx: mx6cuboxi: Disable thermal driver in SPL
X-Git-Tag: v2025.01-rc5-pxa1908~2146^2~30
X-Git-Url: http://git.dujemihanovic.xyz/img/html/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=4e28a259fd3a2025f42ad005b375aea2912c81de;p=u-boot.git

imx: mx6cuboxi: Disable thermal driver in SPL

This feature is incompatble with of-platdata since it uses the
U_BOOT_DEVICE() macro. With of-platdata the only devices permitted are
those created by dtoc.

The driver is not used in SPL anyway, so exclude it from that build.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
---

diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c
index e129286065..a636107410 100644
--- a/arch/arm/mach-imx/mx6/soc.c
+++ b/arch/arm/mach-imx/mx6/soc.c
@@ -34,7 +34,7 @@ struct scu_regs {
 	u32	fpga_rev;
 };
 
-#if defined(CONFIG_IMX_THERMAL)
+#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_IMX_THERMAL)
 static const struct imx_thermal_plat imx6_thermal_plat = {
 	.regs = (void *)ANATOP_BASE_ADDR,
 	.fuse_bank = 1,