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


Groups > linux.kernel > #1324121

Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings

From Vineet Gupta <vgupta@synopsys.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings
Date 2016-02-02 15:30 +0100
Message-ID <qXK7U-4be-21@gated-at.bofh.it> (permalink)
References <qXGQH-1uV-25@gated-at.bofh.it> <qXGQH-1uV-33@gated-at.bofh.it> <qXJ29-3sQ-15@gated-at.bofh.it>
Organization Synopsys

Show all headers | View raw


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.

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


Thread

[PATCH 0/9] ARC clockevent/clocksource modernization Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-02-02 12:00 +0100
  [PATCH 2/9] ARC: [dts] Introduce Timer bindings Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-02-02 12:00 +0100
    Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-02-02 13:50 +0100
    Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-02-02 14:20 +0100
      Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Vineet Gupta <vgupta@synopsys.com> - 2016-02-02 15:30 +0100
        Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-02-02 16:40 +0100
          Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-02-03 00:00 +0100
            Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-02-03 14:50 +0100
              Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-02-03 15:00 +0100
    Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Rob Herring <robh@kernel.org> - 2016-02-02 23:10 +0100
      Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-02-03 09:10 +0100
        Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Rob Herring <robh@kernel.org> - 2016-02-03 16:40 +0100
  [PATCH 6/9] ARC: clocksource: DT based probe Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-02-02 12:10 +0100
    Re: [PATCH 6/9] ARC: clocksource: DT based probe Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-02-08 13:20 +0100
      Re: [PATCH 6/9] ARC: clocksource: DT based probe Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-02-08 13:30 +0100
  [PATCH 3/9] ARC: clockevent: switch to cpu notifier for clockevent setup Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-02-02 12:10 +0100
  [PATCH 9/9] ARC: RIP arc_{get|set}_core_freq() clk API Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-02-02 12:10 +0100
  [PATCH 4/9] ARC: clockevent: Prepare for DT based probe Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-02-02 12:10 +0100
  [PATCH 7/9] ARC: use fixed frequencies in arc_set_early_base_baud() Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-02-02 12:10 +0100
    Re: [PATCH 7/9] ARC: use fixed frequencies in  arc_set_early_base_baud() Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-02-02 14:00 +0100
      Re: [PATCH 7/9] ARC: use fixed frequencies in arc_set_early_base_baud() christian.ruppert@alitech.com - 2016-02-02 15:10 +0100
        Re: [PATCH 7/9] ARC: use fixed frequencies in  arc_set_early_base_baud() Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-02-02 15:30 +0100
  [PATCH 5/9] ARC: clockevent: DT based probe Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-02-02 12:10 +0100
  [PATCH 8/9] ARC: [plat-axs] Don't use arc_{get|set}_core_freq() for manipulating core clk Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-02-02 12:10 +0100

csiph-web