From: vgupta@synopsys.com (Vineet Gupta)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH 2/9] ARC: [dts] Introduce Timer bindings
Date: Tue, 2 Feb 2016 19:59:03 +0530 [thread overview]
Message-ID: <56B0BD2F.5080409@synopsys.com> (raw)
In-Reply-To: <1454418916.25997.18.camel@synopsys.com>
Hi Alexey,
On Tuesday 02 February 2016 06:45 PM, Alexey Brodkin wrote:
> Hi Vineet,
>
> On Tue, 2016-02-02@16:28 +0530, Vineet Gupta wrote:
>> +
>> +Required properties:
>> +
>> +- compatible : should be "snps,arc-timer0"
>> +- interrupts : single Interrupt going into parent intc
>> + (16 for ARCHS cores, 3 for ARC700 cores)
>> +- clocks : phandle to the source clock
>
> Actually we're not flexible here.
> See we have hard-coded "core_clk" in [PATCH 8/9].
> We use it directly in show_cpuinfo() for reading clock speed
> as well as in axs103_early_init().
>
> So "source clock" here MUST be "core_clk", otherwise
> /proc/cpuinfo will report junk instead of meaningful data at least.
Using hardcoded DT names in generic code is total BS and I slap myself for missing
that in reviewing 8/9. Please fix it !
FWIW, it is OK to have such hardcoding in say AXS103 DTS and AXS103 platform code
but it is not the way to go in setup.c
>> +Required properties:
>> +
>> +- compatible : should be "snps,arc-timer1"
>> +- clocks : phandle to the source clock
>> +
>> +Example:
>> +
>> + timer1: timer_clksrc {
>> + compatible = "snps,arc-timer1";
>> + clocks = <&timer0_clk>;
>
> Ditto, "clocks = <&core_clk>".
Yeah I fixed all those !
>> diff --git a/arch/arc/boot/dts/abilis_tb10x.dtsi b/arch/arc/boot/dts/abilis_tb10x.dtsi
>> index cfb5052239a1..f9f138efa92c 100644
>> --- a/arch/arc/boot/dts/abilis_tb10x.dtsi
>> +++ b/arch/arc/boot/dts/abilis_tb10x.dtsi
>> @@ -35,6 +35,18 @@
>> };
>> };
>>
>> + timer0: timer_clkevt {
>> + compatible = "snps,arc-timer0";
>> + interrupts = <3>;
>> + interrupt-parent = <&intc>;
>> + clocks = <&cpu_clk>;
>>
>> + };
>> +
>> + timer1: timer_clksrc {
>> + compatible = "snps,arc-timer1";
>> + clocks = <&cpu_clk>;
>> + };
>> +
>
> Hm now that's a question how to fix /proc/cpuinfo output
> for Abilis? There's no "core_clk" DTS node for Abilis and so
> show_cpuinfo() won't get proper clock value.
>
> Probably we may fix it with modification of their "pll" node
> from
> ------------------------>8----------------------
> pll0: oscillator {
> clock-frequency = <1000000000>;
> };
> ------------------------>8----------------------
>
> to
> ------------------------>8----------------------
> core_clk: oscillator {
> clock
> -frequency = <1000000000>;
> };
> ------------------------>8----------------------
This is all moot once we fix the orig problem.
WARNING: multiple messages have this Message-ID (diff)
From: Vineet Gupta <vgupta@synopsys.com>
To: Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: "robh@kernel.org" <robh@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"noamc@ezchip.com" <noamc@ezchip.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>
Subject: Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings
Date: Tue, 2 Feb 2016 19:59:03 +0530 [thread overview]
Message-ID: <56B0BD2F.5080409@synopsys.com> (raw)
In-Reply-To: <1454418916.25997.18.camel@synopsys.com>
Hi Alexey,
On Tuesday 02 February 2016 06:45 PM, Alexey Brodkin wrote:
> Hi Vineet,
>
> On Tue, 2016-02-02 at 16:28 +0530, Vineet Gupta wrote:
>> +
>> +Required properties:
>> +
>> +- compatible : should be "snps,arc-timer0"
>> +- interrupts : single Interrupt going into parent intc
>> + (16 for ARCHS cores, 3 for ARC700 cores)
>> +- clocks : phandle to the source clock
>
> Actually we're not flexible here.
> See we have hard-coded "core_clk" in [PATCH 8/9].
> We use it directly in show_cpuinfo() for reading clock speed
> as well as in axs103_early_init().
>
> So "source clock" here MUST be "core_clk", otherwise
> /proc/cpuinfo will report junk instead of meaningful data at least.
Using hardcoded DT names in generic code is total BS and I slap myself for missing
that in reviewing 8/9. Please fix it !
FWIW, it is OK to have such hardcoding in say AXS103 DTS and AXS103 platform code
but it is not the way to go in setup.c
>> +Required properties:
>> +
>> +- compatible : should be "snps,arc-timer1"
>> +- clocks : phandle to the source clock
>> +
>> +Example:
>> +
>> + timer1: timer_clksrc {
>> + compatible = "snps,arc-timer1";
>> + clocks = <&timer0_clk>;
>
> Ditto, "clocks = <&core_clk>".
Yeah I fixed all those !
>> diff --git a/arch/arc/boot/dts/abilis_tb10x.dtsi b/arch/arc/boot/dts/abilis_tb10x.dtsi
>> index cfb5052239a1..f9f138efa92c 100644
>> --- a/arch/arc/boot/dts/abilis_tb10x.dtsi
>> +++ b/arch/arc/boot/dts/abilis_tb10x.dtsi
>> @@ -35,6 +35,18 @@
>> };
>> };
>>
>> + timer0: timer_clkevt {
>> + compatible = "snps,arc-timer0";
>> + interrupts = <3>;
>> + interrupt-parent = <&intc>;
>> + clocks = <&cpu_clk>;
>>
>> + };
>> +
>> + timer1: timer_clksrc {
>> + compatible = "snps,arc-timer1";
>> + clocks = <&cpu_clk>;
>> + };
>> +
>
> Hm now that's a question how to fix /proc/cpuinfo output
> for Abilis? There's no "core_clk" DTS node for Abilis and so
> show_cpuinfo() won't get proper clock value.
>
> Probably we may fix it with modification of their "pll" node
> from
> ------------------------>8----------------------
> pll0: oscillator {
> clock-frequency = <1000000000>;
> };
> ------------------------>8----------------------
>
> to
> ------------------------>8----------------------
> core_clk: oscillator {
> clock
> -frequency = <1000000000>;
> };
> ------------------------>8----------------------
This is all moot once we fix the orig problem.
next prev parent reply other threads:[~2016-02-02 14:29 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 10:58 [PATCH 0/9] ARC clockevent/clocksource modernization Vineet Gupta
2016-02-02 10:58 ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 1/9] ARC: [dts] Add clk feeding into timers to DTs Vineet Gupta
2016-02-02 10:58 ` Vineet Gupta
2016-02-02 10:58 ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 2/9] ARC: [dts] Introduce Timer bindings Vineet Gupta
2016-02-02 10:58 ` Vineet Gupta
2016-02-02 10:58 ` Vineet Gupta
2016-02-02 12:48 ` Alexey Brodkin
2016-02-02 12:48 ` Alexey Brodkin
2016-02-02 12:48 ` Alexey Brodkin
2016-02-02 13:15 ` Alexey Brodkin
2016-02-02 13:15 ` Alexey Brodkin
2016-02-02 14:29 ` Vineet Gupta [this message]
2016-02-02 14:29 ` Vineet Gupta
2016-02-02 15:36 ` Alexey Brodkin
2016-02-02 15:36 ` Alexey Brodkin
2016-02-02 15:36 ` Alexey Brodkin
2016-02-02 22:57 ` Alexey Brodkin
2016-02-02 22:57 ` Alexey Brodkin
2016-02-02 22:57 ` Alexey Brodkin
2016-02-03 13:44 ` Alexey Brodkin
2016-02-03 13:44 ` Alexey Brodkin
2016-02-03 13:50 ` Alexey Brodkin
2016-02-03 13:50 ` Alexey Brodkin
2016-02-03 13:50 ` Alexey Brodkin
2016-02-02 22:03 ` Rob Herring
2016-02-02 22:03 ` Rob Herring
2016-02-02 22:03 ` Rob Herring
2016-02-03 8:04 ` Vineet Gupta
2016-02-03 8:04 ` Vineet Gupta
2016-02-03 15:39 ` Rob Herring
2016-02-03 15:39 ` Rob Herring
2016-02-03 15:39 ` Rob Herring
2016-02-16 8:44 ` Vineet Gupta
2016-02-16 8:44 ` Vineet Gupta
2016-02-16 8:44 ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 3/9] ARC: clockevent: switch to cpu notifier for clockevent setup Vineet Gupta
2016-02-02 10:58 ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 4/9] ARC: clockevent: Prepare for DT based probe Vineet Gupta
2016-02-02 10:58 ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 5/9] ARC: clockevent: " Vineet Gupta
2016-02-02 10:58 ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 6/9] ARC: clocksource: " Vineet Gupta
2016-02-02 10:58 ` Vineet Gupta
2016-02-08 12:10 ` Daniel Lezcano
2016-02-08 12:10 ` Daniel Lezcano
2016-02-08 12:23 ` Vineet Gupta
2016-02-08 12:23 ` Vineet Gupta
2016-02-10 13:38 ` Daniel Lezcano
2016-02-10 13:38 ` Daniel Lezcano
2016-02-02 10:58 ` [PATCH 7/9] ARC: use fixed frequencies in arc_set_early_base_baud() Vineet Gupta
2016-02-02 10:58 ` Vineet Gupta
2016-02-02 12:53 ` Alexey Brodkin
2016-02-02 12:53 ` Alexey Brodkin
2016-02-02 13:43 ` christian.ruppert
2016-02-02 13:43 ` christian.ruppert
2016-02-02 14:26 ` Alexey Brodkin
2016-02-02 14:26 ` Alexey Brodkin
2016-02-02 10:58 ` [PATCH 8/9] ARC: [plat-axs] Don't use arc_{get|set}_core_freq() for manipulating core clk Vineet Gupta
2016-02-02 10:58 ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 9/9] ARC: RIP arc_{get|set}_core_freq() clk API Vineet Gupta
2016-02-02 10:58 ` Vineet Gupta
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=56B0BD2F.5080409@synopsys.com \
--to=vgupta@synopsys.com \
--cc=linux-snps-arc@lists.infradead.org \
/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.