From: Mark Rutland <mark.rutland@arm.com>
To: Olof Johansson <olof@lixom.net>
Cc: Tomasz Figa <tomasz.figa@gmail.com>,
Yuvaraj Kumar C D <yuvaraj.cd@gmail.com>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
"kgene.kim@samsung.com" <kgene.kim@samsung.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
Pawel Moll <Pawel.Moll@arm.com>,
"swarren@wwwdotorg.org" <swarren@wwwdotorg.org>,
"ian.campbell@citrix.com" <ian.campbell@citrix.com>,
"t.figa@samsung.com" <t.figa@samsung.com>,
"thomas.abraham@linaro.org" <thomas.abraham@linaro.org>,
"ks.giri@samsung.com" <ks.giri@samsung.com>,
Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>,
Marc Zyngier <Marc.Zyngier@arm.com>,
Tony Lindgren <tony@atomide.com>,
Sean Paul <seanpaul@chromium.org>
Subject: Re: [PATCH] ARM: dts: Update arch timer node with clock frequency
Date: Wed, 9 Oct 2013 22:51:47 +0100 [thread overview]
Message-ID: <20131009215147.GC2322@kartoffel> (raw)
In-Reply-To: <CAOesGMgZ7+w3NGaxjpV-f08Wt+Zh8FPRHEoR+pM1UG5vLkFMkg@mail.gmail.com>
On Wed, Oct 09, 2013 at 08:46:06PM +0100, Olof Johansson wrote:
> On Wed, Oct 9, 2013 at 1:25 AM, Mark Rutland <mark.rutland@arm.com> wrote:
> > On Tue, Oct 08, 2013 at 11:15:47PM +0100, Olof Johansson wrote:
> >> [Adding Tony, who reported a mainline booting issue, and Sean who
> >> helped me track this down]
> >>
> >> On Mon, Sep 23, 2013 at 7:15 AM, Mark Rutland <mark.rutland@arm.com> wrote:
> >> > On Sat, Sep 21, 2013 at 04:24:59PM +0100, Tomasz Figa wrote:
> >> >> Hi Yuvaraj,
> >> >>
> >> >> On Wednesday 18 of September 2013 15:41:53 Yuvaraj Kumar C D wrote:
> >> >> > Without the "clock-frequency" property in arch timer node, could able
> >> >> > to see the below crash dump.
> >> >> [snip]
> >> >> > diff --git a/arch/arm/boot/dts/exynos5250.dtsi
> >> >> > b/arch/arm/boot/dts/exynos5250.dtsi index 7d7cc77..668ce5d 100644
> >> >> > --- a/arch/arm/boot/dts/exynos5250.dtsi
> >> >> > +++ b/arch/arm/boot/dts/exynos5250.dtsi
> >> >> > @@ -96,6 +96,7 @@
> >> >> > <1 14 0xf08>,
> >> >> > <1 11 0xf08>,
> >> >> > <1 10 0xf08>;
> >> >> > + clock-frequency = <24000000>;
> >> >>
> >> >> Shouldn't it rather come from some clock provided by some clock controller
> >> >> instead?
> >> >>
> >> >> The frequency would be then retrieved using clk_get_rate() on a clock
> >> >> received by clk_get(), specified in device tree using generic clock
> >> >> bindings.
> >> >
> >> > If the bootloader has initialised the generic timer correctly, the
> >> > CNTFRQ register should contain the clock frequency, independent of any
> >> > external clock.
> >>
> >> So, we just sat here to bisect a problem on the Samsung Chromebook
> >> where we hit exactly this problem. The read-only firmware on the
> >> device does not set CNTFRQ at boot, so this fails.
> >
> > Ouch. That's a shame.
> >
> > A chained bootloader (like the KVM guys are using) should be able to set
> > CNTFRQ, so as long as any chained loader actually does that this won't
> > cause that to blow up...
>
> Yes, but we have cases where we want to be able to boot without a
> chained u-boot as well.
Sorry, that was poorly worded on my behalf. I meant that in the main case I'm
aware of where the having the clock-frequency property wasn't good enough
(because it doesn't get propagated to guests), we have another workaround.
>
> >> Apparantly the u-boot that comes with Arndale sets it, so I haven't
> >> seen this error on that platform.
> >>
> >> > Having the bootloader set CNTFRQ is by far the preferable solution, it
> >> > is architected for this purpose.
> >>
> >> Unfortunately there is now real hardware out there that needs this due
> >> to firmware bugs / missing features, so there's little other choice.
> >> :(
> >
> > Indeed :(
> >
> >>
> >> I'll pick this patch up in the fixes branch for 3.12, unless someone
> >> complains loudly.
> >
> > Could you please add a note to the dts regarding why we actually need
> > this? It would be nice to maintain the impression that this is not the
> > preferred way of doing things...
>
> s/dts/dtsi/, yes I can do that. Hopefully with that we won't get too
> much automated copy and paste to other platforms.
Cheers!
Thanks,
Mark.
next prev parent reply other threads:[~2013-10-09 21:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-18 10:11 [PATCH] ARM: dts: Update arch timer node with clock frequency Yuvaraj Kumar C D
[not found] ` <1379499113-20342-1-git-send-email-yuvaraj.cd-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-09-18 10:23 ` Mark Rutland
2013-09-20 4:57 ` Yuvaraj Kumar
[not found] ` <CAKuRcOLfRwJohWMhc=QMew87SXtBmkPUJwW7UzNry_gFuC-81Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-20 8:17 ` Marc Zyngier
[not found] ` <523C048C.10303-5wv7dgnIgG8@public.gmane.org>
2013-09-20 14:55 ` Christopher Covington
[not found] ` <523C61CB.2050607-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2013-09-20 15:04 ` Marc Zyngier
2013-09-21 15:24 ` Tomasz Figa
2013-09-23 14:15 ` Mark Rutland
2013-10-08 22:15 ` Olof Johansson
2013-10-09 8:25 ` Mark Rutland
2013-10-09 19:46 ` Olof Johansson
2013-10-09 21:51 ` Mark Rutland [this message]
2013-10-09 21:48 ` Rob Herring
2013-10-12 22:26 ` Olof Johansson
2013-10-12 22:31 ` Olof Johansson
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=20131009215147.GC2322@kartoffel \
--to=mark.rutland@arm.com \
--cc=Marc.Zyngier@arm.com \
--cc=Pawel.Moll@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=ian.campbell@citrix.com \
--cc=kgene.kim@samsung.com \
--cc=ks.giri@samsung.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=olof@lixom.net \
--cc=rob.herring@calxeda.com \
--cc=seanpaul@chromium.org \
--cc=swarren@wwwdotorg.org \
--cc=t.figa@samsung.com \
--cc=thomas.abraham@linaro.org \
--cc=tomasz.figa@gmail.com \
--cc=tony@atomide.com \
--cc=yuvaraj.cd@gmail.com \
--cc=yuvaraj.cd@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).