All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	linux-clk <linux-clk@vger.kernel.org>,
	Janos Laube <janos.dev@gmail.com>,
	Paulius Zaleckas <paulius.zaleckas@gmail.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Hans Ulli Kroll <ulli.kroll@googlemail.com>,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH 2/2 v4] clk: Add Gemini SoC clock controller
Date: Mon, 12 Jun 2017 08:21:20 +0200	[thread overview]
Message-ID: <CACRpkdapAgHix2vw-woDFi4sh+H3_EX7w-5q=opBGMyegFrXbA@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdbya9xaN-i7AkG0bTyuFYfZc59sSTYhWB43=9btSKfPpQ@mail.gmail.com>

On Thu, Jun 8, 2017 at 2:18 PM, Linus Walleij <linus.walleij@linaro.org> wrote:

> I think the timer may be more of an issue...
>
> It is using CLOCKSOURCE_OF_DECLARE(), at least last time
> I checked there was no such thing as clocksources retrying their
> calls, and that cannot be regular probes because of, yeah device
> core is using the timer, I think.
>
> Yeah I looked in:
> drivers/clocksource/clksrc-probe.c
>
> It will just fail if it can't initialize the clocksource.
>
> I don't understand what platforms can actually get their timers
> up at all without the clock framework? Those hardcoding the
> clock frequency in the device tree, or things like the ARM
> TWD which has it encoded in hardware perhaps?

I just confirmed this to be the problem using a scratch patch for
a platform device init and some earlydebug prints:

Uncompressing Linux... done, booting the kernel.
 Booting Linux on physical CPU 0x0
start_kernel
(...)
 NR_IRQS:16 nr_irqs:16 16
 could not get PCLK
Failed to initialize '/soc/timer@43000000': -517
 clocksource_probe: no matching clocksources found
 sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every
21474836475000000ns
 Console: colour dummy device 80x30
 Calibrating delay loop...

So the deferred clock makes the whole platform hang because the timer
needs it. Without a clocksource, the delay loop cannot be calibrated, so
it hangs there.

Yours,
Linus Walleij

WARNING: multiple messages have this Message-ID (diff)
From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2 v4] clk: Add Gemini SoC clock controller
Date: Mon, 12 Jun 2017 08:21:20 +0200	[thread overview]
Message-ID: <CACRpkdapAgHix2vw-woDFi4sh+H3_EX7w-5q=opBGMyegFrXbA@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdbya9xaN-i7AkG0bTyuFYfZc59sSTYhWB43=9btSKfPpQ@mail.gmail.com>

On Thu, Jun 8, 2017 at 2:18 PM, Linus Walleij <linus.walleij@linaro.org> wrote:

> I think the timer may be more of an issue...
>
> It is using CLOCKSOURCE_OF_DECLARE(), at least last time
> I checked there was no such thing as clocksources retrying their
> calls, and that cannot be regular probes because of, yeah device
> core is using the timer, I think.
>
> Yeah I looked in:
> drivers/clocksource/clksrc-probe.c
>
> It will just fail if it can't initialize the clocksource.
>
> I don't understand what platforms can actually get their timers
> up at all without the clock framework? Those hardcoding the
> clock frequency in the device tree, or things like the ARM
> TWD which has it encoded in hardware perhaps?

I just confirmed this to be the problem using a scratch patch for
a platform device init and some earlydebug prints:

Uncompressing Linux... done, booting the kernel.
 Booting Linux on physical CPU 0x0
start_kernel
(...)
 NR_IRQS:16 nr_irqs:16 16
 could not get PCLK
Failed to initialize '/soc/timer at 43000000': -517
 clocksource_probe: no matching clocksources found
 sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every
21474836475000000ns
 Console: colour dummy device 80x30
 Calibrating delay loop...

So the deferred clock makes the whole platform hang because the timer
needs it. Without a clocksource, the delay loop cannot be calibrated, so
it hangs there.

Yours,
Linus Walleij

  reply	other threads:[~2017-06-12  6:21 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24  8:20 [PATCH 2/2 v4] clk: Add Gemini SoC clock controller Linus Walleij
2017-05-24  8:20 ` Linus Walleij
2017-06-01  7:02 ` Stephen Boyd
2017-06-01  7:02   ` Stephen Boyd
2017-06-05 13:34   ` Linus Walleij
2017-06-05 13:34     ` Linus Walleij
2017-06-05 19:58     ` Stephen Boyd
2017-06-05 19:58       ` Stephen Boyd
2017-06-08 12:18       ` Linus Walleij
2017-06-08 12:18         ` Linus Walleij
2017-06-12  6:21         ` Linus Walleij [this message]
2017-06-12  6:21           ` Linus Walleij
2017-06-12 21:02           ` Stephen Boyd
2017-06-12 21:02             ` Stephen Boyd
2017-06-14 11:31             ` Linus Walleij
2017-06-14 11:31               ` Linus Walleij
2017-06-14 15:55               ` Stephen Boyd
2017-06-14 15:55                 ` Stephen Boyd
     [not found]             ` <20170612210248.GP20170-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-06-15  7:16               ` Linus Walleij
2017-06-15  7:16                 ` Linus Walleij
2017-06-15  7:16                 ` Linus Walleij
2017-06-15  8:55                 ` Geert Uytterhoeven
2017-06-15  8:55                   ` Geert Uytterhoeven
     [not found]                   ` <CAMuHMdXdYNTLCUfQ9rdj8Fffff5G6fGREcHs5-E5LbwPU9yyLw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-15 12:57                     ` Linus Walleij
2017-06-15 12:57                       ` Linus Walleij
2017-06-15 12:57                       ` Linus Walleij
2017-06-15 21:00                       ` Stephen Boyd
2017-06-15 21:00                         ` Stephen Boyd
     [not found]                         ` <20170615210020.GG20170-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-06-16  8:35                           ` Linus Walleij
2017-06-16  8:35                             ` Linus Walleij
2017-06-16  8:35                             ` Linus Walleij
2017-06-15 21:55                       ` Philipp Zabel
2017-06-15 21:55                         ` Philipp Zabel
2017-06-16  8:38                         ` Linus Walleij
2017-06-16  8:38                           ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACRpkdapAgHix2vw-woDFi4sh+H3_EX7w-5q=opBGMyegFrXbA@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=f.fainelli@gmail.com \
    --cc=janos.dev@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=paulius.zaleckas@gmail.com \
    --cc=sboyd@codeaurora.org \
    --cc=ulli.kroll@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.