summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVignesh Raghavendra <vigneshr@ti.com>2023-02-20 10:03:08 +0530
committerPraneeth Bajjuri <praneeth@ti.com>2023-02-21 17:55:17 -0600
commit80e092decd7a2b3806f7de6569dccf70a6c3b50d (patch)
tree115efd77a9dd1584a7da1cbff9e9a8325f01d10a
parent7988f626336ac9b94c1e5bb7ee4a18c46b6d4ddf (diff)
mach-k3: common: Allow overriding boot_fit via env
Currently, code doesn't take into account the fact that user may have overriden boot_fit value via env using saveenv. Check if boot_fit is already set before overriding based on SoC type. This allows users to boot signed fitImage or regular kernel Image and dtbs consistently without needing to stop at U-Boot prompt and overriding the variable each time. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
-rw-r--r--arch/arm/mach-k3/common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 77e1ed9419..e4a825365c 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -628,8 +628,10 @@ int misc_init_r(void)
}
/* Default FIT boot on non-GP devices */
- if (get_device_type() != K3_DEVICE_TYPE_GP)
- env_set("boot_fit", "1");
+ if (get_device_type() != K3_DEVICE_TYPE_GP) {
+ if (!env_get("boot_fit"))
+ env_set("boot_fit", "1");
+ }
return 0;
}