This is now recommended for all systems. Especially for the HAB usecase
disallowing alternative boot selection after WDOG reset is essential.

Signed-off-by: Bastian Stender <b...@pengutronix.de>
---
Changes since v1:
  - removed accidentally added empty line
---
 drivers/hab/hab.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/hab/hab.c b/drivers/hab/hab.c
index 0d71f5bf26..03bb65e0fa 100644
--- a/drivers/hab/hab.c
+++ b/drivers/hab/hab.c
@@ -161,6 +161,12 @@ static int imx_hab_permanent_write_enable_ocotp(int enable)
 
 static int imx_hab_lockdown_device_ocotp(void)
 {
+       int ret;
+
+       ret = imx_ocotp_write_field(OCOTP_DIR_BT_DIS, 1);
+       if (ret < 0)
+               return ret;
+
        return imx_ocotp_write_field(OCOTP_SEC_CONFIG_1, 1);
 }
 
-- 
2.18.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to