Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1487639

[PATCH v3 3/5] clk: at91: sckc: optimize boot time

From Alexandre Belloni <alexandre.belloni@free-electrons.com>
Newsgroups linux.kernel
Subject [PATCH v3 3/5] clk: at91: sckc: optimize boot time
Date 2016-09-20 23:10 +0200
Message-ID <sjAsG-8jJ-7@gated-at.bofh.it> (permalink)
References <sjAj0-81b-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <alexandre.belloni@free-electrons.com>
---
 drivers/clk/at91/sckc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/at91/sckc.c b/drivers/clk/at91/sckc.c
index 60d8225715a2..b1265f2cdae7 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);
-- 
2.9.3

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/5] AT91: sckc improvements Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-09-20 23:00 +0200
  [PATCH v3 2/5] clk: at91: Add sama5d4 sckc support Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-09-20 23:00 +0200
    Re: [PATCH v3 2/5] clk: at91: Add sama5d4 sckc support Stephen Boyd <sboyd@codeaurora.org> - 2016-09-21 02:10 +0200
  [PATCH v3 3/5] clk: at91: sckc: optimize boot time Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-09-20 23:10 +0200
    Re: [PATCH v3 3/5] clk: at91: sckc: optimize boot time Stephen Boyd <sboyd@codeaurora.org> - 2016-09-21 02:10 +0200
  [PATCH v3 4/5] ARM: dts: at91: sama5d4: use proper sckc compatible Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-09-20 23:10 +0200

csiph-web