summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-01-06 08:49:58 +0100
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-01-06 08:49:58 +0100
commita891601ce51edbafa1a2750c96a618e4fcbca1c2 (patch)
tree9a5d44eb1fcca45dfd30557318f786b66392a8f3 /drivers/misc
parent2931fa4db349c97f882ffda42e901208654b5ca9 (diff)
parent4611d5bab26f93471b84f6f33967cef69b3f723a (diff)
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Conflicts: include/micrel.h The conflict above was trivial, caused by four lines being added in both branches with different whitepace.
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/fsl_iim.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/misc/fsl_iim.c b/drivers/misc/fsl_iim.c
index 44ae7b1028..36433a74f8 100644
--- a/drivers/misc/fsl_iim.c
+++ b/drivers/misc/fsl_iim.c
@@ -16,6 +16,9 @@
#ifndef CONFIG_MPC512X
#include <asm/arch/imx-regs.h>
#endif
+#if defined(CONFIG_MX51) || defined(CONFIG_MX53)
+#include <asm/arch/clock.h>
+#endif
/* FSL IIM-specific constants */
#define STAT_BUSY 0x80
@@ -93,6 +96,10 @@ struct fsl_iim {
} bank[8];
};
+#if !defined(CONFIG_MX51) && !defined(CONFIG_MX53)
+#define enable_efuse_prog_supply(enable)
+#endif
+
static int prepare_access(struct fsl_iim **regs, u32 bank, u32 word, int assert,
const char *caller)
{
@@ -237,12 +244,16 @@ int fuse_prog(u32 bank, u32 word, u32 val)
if (ret)
return ret;
+ enable_efuse_prog_supply(1);
for (bit = 0; val; bit++, val >>= 1)
if (val & 0x01) {
ret = prog_bit(regs, bank, word, bit);
- if (ret)
+ if (ret) {
+ enable_efuse_prog_supply(0);
return ret;
+ }
}
+ enable_efuse_prog_supply(0);
return 0;
}