summaryrefslogtreecommitdiffstats
path: root/drivers/hab
diff options
context:
space:
mode:
authorBastian Stender <bst@pengutronix.de>2018-08-10 13:43:37 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-08-31 08:30:07 +0200
commite8a12673509b93433dd95503bbfb13dabce5e71b (patch)
tree97a64151c5eafe0ca58aa1d4eb4e33bda939375f /drivers/hab
parent172109e4851237e94a765a625da8bfe0dca69cfb (diff)
downloadbarebox-e8a12673509b93433dd95503bbfb13dabce5e71b.tar.gz
barebox-e8a12673509b93433dd95503bbfb13dabce5e71b.tar.xz
HAB: fuse recommended OCOTP_DIR_BT_DIS
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 <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/hab')
-rw-r--r--drivers/hab/hab.c6
1 files changed, 6 insertions, 0 deletions
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);
}