diff options
-rw-r--r-- | arch/arm/mach-tegra/tegra_odm_fuses.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/tegra_odm_fuses.c b/arch/arm/mach-tegra/tegra_odm_fuses.c index 06b831c31967..ae82ed56f0f0 100644 --- a/arch/arm/mach-tegra/tegra_odm_fuses.c +++ b/arch/arm/mach-tegra/tegra_odm_fuses.c @@ -53,6 +53,7 @@ #define NFUSES 64 #define STATE_IDLE (0x4 << 16) +#define SENSE_DONE (0x1 << 30) /* since fuse burning is irreversible, use this for testing */ #define ENABLE_FUSE_BURNING 1 @@ -607,6 +608,17 @@ static void fuse_program_array(int pgm_cycles) } fuse_power_disable(); + + /* + * Wait until done (polling) + * this one needs to use fuse_sense done, the FSM follows a periodic + * sequence that includes idle + */ + do { + udelay(1); + reg = tegra_fuse_readl(FUSE_CTRL); + } while ((reg & (0x1 << 30)) != SENSE_DONE); + } static int fuse_set(enum fuse_io_param io_param, u32 *param, int size) |