ARM: tegra12: clock: Add reset propagation delays
Kaz Fukuoka [Wed, 25 Sep 2013 01:07:42 +0000 (18:07 -0700)]
Added explicit reset propagation delay in resume procedure.

Ported from Tegra14 Change-Id: I25b8e124599a177691cff3c868909bff382e5373

Change-Id: I50b6ac00a9dcc682852dc5387d172893d4335a55
Signed-off-by: Kaz Fukuoka <kfukuoka@nvidia.com>
(cherry picked from commit 9f06263084eff3e0b513fec2475a173c11846223)
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>

arch/arm/mach-tegra/tegra12_clocks.c

index e12a179..ba2fb77 100644 (file)
@@ -4355,7 +4355,7 @@ static int tegra12_periph_clk_enable(struct clk *c)
        clk_writel_delay(PERIPH_CLK_TO_BIT(c), PERIPH_CLK_TO_ENB_SET_REG(c));
        if (!(c->flags & PERIPH_NO_RESET) && !(c->flags & PERIPH_MANUAL_RESET)) {
                if (clk_readl(PERIPH_CLK_TO_RST_REG(c)) & PERIPH_CLK_TO_BIT(c)) {
-                       udelay(5);      /* reset propagation delay */
+                       udelay(RESET_PROPAGATION_DELAY);
                        clk_writel(PERIPH_CLK_TO_BIT(c), PERIPH_CLK_TO_RST_CLR_REG(c));
                }
        }
@@ -8771,6 +8771,8 @@ static void tegra12_clk_resume(void)
                off <= PERIPH_CLK_SOURCE_VIC; off += 4)
                clk_writel(*ctx++, off);
 
+       udelay(RESET_PROPAGATION_DELAY);
+
        clk_writel(*ctx++, RST_DEVICES_L);
        clk_writel(*ctx++, RST_DEVICES_H);
        clk_writel(*ctx++, RST_DEVICES_U);