summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/common.c
diff options
context:
space:
mode:
authorBibek Basu <bbasu@nvidia.com>2014-09-02 15:48:09 +0530
committerMatthew Pedro <mapedro@nvidia.com>2014-09-16 22:17:17 -0700
commit3dbd628d10a07d0769d4fc071d4c028cc0195d5e (patch)
tree2cf0133e972dd7673185ae4bf28114fcf86cb16d /arch/arm/mach-tegra/common.c
parentc086f0a2543a92e76acd67d35af47522e36abbdf (diff)
arm: tegra: Ram repair for slow cluster
Do ram repair for slow cluster also during boot Bug 1528461 Change-Id: I71ed7891aaff48f0b87438ad029b22ced9be0f04 Signed-off-by: Bibek Basu <bbasu@nvidia.com> Reviewed-on: http://git-master/r/494787 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/common.c')
-rw-r--r--arch/arm/mach-tegra/common.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 275e4035b006..7e98f7c570f9 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -776,13 +776,31 @@ static void __init tegra_perf_init(void)
#if !defined(CONFIG_ARCH_TEGRA_2x_SOC) && !defined(CONFIG_ARCH_TEGRA_3x_SOC)
static void __init tegra_ramrepair_init(void)
{
+#define RAM_REPAIR_TIMEOUT 500 /*usec */
#if defined(CONFIG_ARCH_TEGRA_11x_SOC)
if (tegra_spare_fuse(10) | tegra_spare_fuse(11)) {
#endif
u32 reg;
+ u32 timeout = RAM_REPAIR_TIMEOUT;
+ /* ram repair for Fast Cluster0*/
reg = readl(FLOW_CTRL_RAM_REPAIR);
reg &= ~FLOW_CTRL_RAM_REPAIR_BYPASS_EN;
writel(reg, FLOW_CTRL_RAM_REPAIR);
+
+#if defined(CONFIG_ARCH_TEGRA_12x_SOC)
+ /* Ram Repair for Slow Cluster1 */
+ reg = readl(FLOW_CTRL_RAM_REPAIR_1);
+ reg |= FLOW_CTRL_RAM_REPAIR_REQ;
+ writel(reg, FLOW_CTRL_RAM_REPAIR_1);
+ do {
+ udelay(1);
+ reg = readl(FLOW_CTRL_RAM_REPAIR_1);
+ } while (!(reg & FLOW_CTRL_RAM_REPAIR_STS) && (timeout--));
+ if (!timeout) {
+ pr_err("Slow Cluster Ram Repair failed");
+ pr_err("reg 0x%x timeout %d\n", reg, timeout);
+ }
+#endif
#if defined(CONFIG_ARCH_TEGRA_11x_SOC)
}
#endif