From: Alexandre Belloni Date: Tue, 20 Sep 2016 20:58:31 +0000 (+0200) Subject: clk: at91: sckc: optimize boot time X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4135b7f8d42180d6d9820b53b0ab5e3377b7c364;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git clk: at91: sckc: optimize boot time Assume that if the oscillator is enabled (OSC32EN bit is present), the delay has already elapsed as the bootloader probably waited for the oscillator to settle. This could waste up to 1.2s. Signed-off-by: Alexandre Belloni Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/at91/sckc.c b/drivers/clk/at91/sckc.c index 199d1b3f5ad3..ab6ecefc49ad 100644 --- a/drivers/clk/at91/sckc.c +++ b/drivers/clk/at91/sckc.c @@ -69,7 +69,7 @@ static int clk_slow_osc_prepare(struct clk_hw *hw) void __iomem *sckcr = osc->sckcr; u32 tmp = readl(sckcr); - if (tmp & AT91_SCKC_OSC32BYP) + if (tmp & (AT91_SCKC_OSC32BYP | AT91_SCKC_OSC32EN)) return 0; writel(tmp | AT91_SCKC_OSC32EN, sckcr);