]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/misc/mxc_ocotp.c
karo: tx6: implement secure boot support
[karo-tx-uboot.git] / drivers / misc / mxc_ocotp.c
index 89737af9b73c417c61d55b5712d8c46f8b1ead4c..5fb86ca6b2f982d894612e7e06503d818f7c0933 100644 (file)
@@ -60,7 +60,7 @@ static int prepare_access(struct ocotp_regs **regs, u32 bank, u32 word,
        *regs = (struct ocotp_regs *)OCOTP_BASE_ADDR;
 
        if (bank >= ARRAY_SIZE((*regs)->bank) ||
-                       word >= ARRAY_SIZE((*regs)->bank[0].fuse_regs) >> 2 ||
+                       word >= ARRAY_SIZE((*regs)->bank[0].fuse_regs) ||
                        !assert) {
                printf("mxc_ocotp %s(): Invalid argument\n", caller);
                return -EINVAL;
@@ -81,8 +81,6 @@ static int finish_access(struct ocotp_regs *regs, const char *caller)
        err = !!(readl(&regs->ctrl) & BM_CTRL_ERROR);
        clear_error(regs);
 
-       enable_ocotp_clk(0);
-
        if (err) {
                printf("mxc_ocotp %s(): Access protect error\n", caller);
                return -EIO;