summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Hsieh <rhsieh@nvidia.com>2012-07-30 16:20:38 +0800
committerSimone Willett <swillett@nvidia.com>2012-08-02 09:37:03 -0700
commit940211c305fe0bed54b19847633800b77c369a46 (patch)
treea9be414d0aed8dc8d6ee5f7fe2f8e896a0ac2255
parent95b5dfcb4b7e25725b534d55b0b451622851c484 (diff)
arm: tegra: fuse: check SENSE_DONE after fuse programming
Make fuse burning take effect by checking SENSE_DONE. Without this chip options will not be available on fuse registers until power on reset or LP0 resume. Bug 1020726 Change-Id: Id547d1ea51b023ba904f5751c2ad65667375777d Signed-off-by: Roger Hsieh <rhsieh@nvidia.com> Reviewed-on: http://git-master/r/119271 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/tegra_odm_fuses.c12
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)