]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
imx: fdt: Allow users to inhibit trip point setup
authorMarek Vasut <marex@nabladev.com>
Sat, 13 Jun 2026 03:11:43 +0000 (05:11 +0200)
committerFabio Estevam <festevam@gmail.com>
Sat, 27 Jun 2026 02:02:45 +0000 (23:02 -0300)
During development or various dangerous experiments, it may
be necessary to override the trip points. Allow users to do
that. However, do keep in mind that this may damage the SoC.

Signed-off-by: Marek Vasut <marex@nabladev.com>
arch/arm/mach-imx/fdt.c

index f19ab9edce496606ba99c80f6a53ff45d596f00e..1ef26718463404dbd6165f8605476f33762e8a01 100644 (file)
@@ -3,6 +3,7 @@
  * Copyright 2024 NXP
  */
 
+#include <env.h>
 #include <errno.h>
 #include <fdtdec.h>
 #include <malloc.h>
@@ -91,6 +92,15 @@ int fixup_thermal_trips(void *blob, const char *name)
        int minc, maxc;
        int node, trip;
 
+       /*
+        * During development or various dangerous experiments, it may
+        * be necessary to override the trip points. Allow users to do
+        * that. However, do keep in mind that this may damage the SoC.
+        */
+       if (CONFIG_IS_ENABLED(ENV_SUPPORT))
+               if (env_get("imx_skip_fixup_thermal_trips"))
+                       return 0;
+
        node = fdt_path_offset(blob, "/thermal-zones");
        if (node < 0)
                return node;