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


Groups > linux.kernel > #1479301

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

From Alexandre Belloni <alexandre.belloni@free-electrons.com>
Newsgroups linux.kernel
Subject [PATCH v2 5/5] clk: at91: sckc: optimize boot time
Date 2016-09-08 17:00 +0200
Message-ID <sf8Y1-75b-11@gated-at.bofh.it> (permalink)
References <sf8Y1-75b-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 04059ea761c2..d669f5ca4dac 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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/5] AT91: sckc improvements Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-09-08 17:00 +0200
  [PATCH v2 2/5] clk: at91: Add sama5d4 sckc support Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-09-08 17:00 +0200
    Re: [PATCH v2 2/5] clk: at91: Add sama5d4 sckc support Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-09-09 13:00 +0200
  [PATCH v2 4/5] ARM: dts: at91: sama5d2: use correct sckc compatible Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-09-08 17:00 +0200
  [PATCH v2 3/5] ARM: dts: at91: sama5d4: use proper sckc compatible Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-09-08 17:00 +0200
  [PATCH v2 5/5] clk: at91: sckc: optimize boot time Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-09-08 17:00 +0200
  [PATCH v2 1/5] clk: at91: move slow clock controller clocks to sckc.c Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-09-08 17:00 +0200

csiph-web