From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexey.Brodkin@synopsys.com (Alexey Brodkin) Date: Tue, 2 Feb 2016 22:57:26 +0000 Subject: [PATCH 2/9] ARC: [dts] Introduce Timer bindings In-Reply-To: <1454427373.25997.24.camel@synopsys.com> References: <1454410739-24444-1-git-send-email-vgupta@synopsys.com> <1454410739-24444-3-git-send-email-vgupta@synopsys.com> <1454418916.25997.18.camel@synopsys.com> <56B0BD2F.5080409@synopsys.com> <1454427373.25997.24.camel@synopsys.com> List-ID: Message-ID: <1454453846.25997.31.camel@synopsys.com> To: linux-snps-arc@lists.infradead.org Hi Vineet, On Tue, 2016-02-02@18:36 +0300, Alexey Brodkin wrote: > Hi Vineet, > > On Tue, 2016-02-02@19:59 +0530, Vineet Gupta wrote: > > 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 ! > > But the only other alternative to hard-coded name is use of some internal variable > like "arc_timer_freq". > > I.e. we make "arc_timer_freq" global and use it for displaying core frequency. Well actually there's another possibility that is used on many other platforms (ARM both 32 and 64-bit flavors is a good example) - just print bogomips instead of additional core frequency. -Alexey From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexey Brodkin Subject: Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Date: Tue, 2 Feb 2016 22:57:26 +0000 Message-ID: <1454453846.25997.31.camel@synopsys.com> References: <1454410739-24444-1-git-send-email-vgupta@synopsys.com> <1454410739-24444-3-git-send-email-vgupta@synopsys.com> <1454418916.25997.18.camel@synopsys.com> <56B0BD2F.5080409@synopsys.com> <1454427373.25997.24.camel@synopsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <1454427373.25997.24.camel-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> Content-Language: en-US Content-ID: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Vineet Gupta Cc: "robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , "noamc-d5a29ZRxExrQT0dZR+AlfA@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" List-Id: devicetree@vger.kernel.org SGkgVmluZWV0LA0KDQpPbiBUdWUsIDIwMTYtMDItMDIgYXQgMTg6MzYgKzAzMDAsIEFsZXhleSBC cm9ka2luIHdyb3RlOg0KPiBIaSBWaW5lZXQsDQo+IA0KPiBPbiBUdWUsIDIwMTYtMDItMDIgYXQg MTk6NTkgKzA1MzAsIFZpbmVldCBHdXB0YSB3cm90ZToNCj4gPiBIaSBBbGV4ZXksDQo+ID4gDQo+ ID4gT24gVHVlc2RheSAwMiBGZWJydWFyeSAyMDE2IDA2OjQ1IFBNLCBBbGV4ZXkgQnJvZGtpbiB3 cm90ZToNCj4gPiA+IEhpIFZpbmVldCwNCj4gPiA+IA0KPiA+ID4gT24gVHVlLCAyMDE2LTAyLTAy IGF0IDE2OjI4ICswNTMwLCBWaW5lZXQgR3VwdGEgd3JvdGU6DQo+ID4gPiA+ICsNCj4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YWx0ZXJuYXRpdmUg dG8gaGFyZC1jb2RlZCBuYW1lIGlzIHVzZSBvZiBzb21lIGludGVybmFsIHZhcmlhYmxlDQo+IGxp a2UgImFyY190aW1lcl9mcmVxIi4NCj4gDQo+IEkuZS4gd2UgbWFrZSAiYXJjX3RpbWVyX2ZyZXEi IGdsb2JhbCBhbmQgdXNlIGl0IGZvciBkaXNwbGF5aW5nIGNvcmUgZnJlcXVlbmN5Lg0KDQpXZWxs IGFjdHVhbGx5IHRoZXJlJ3MgYW5vdGhlciBwb3NzaWJpbGl0eSB0aGF0IGlzIHVzZWQgb24gbWFu eSBvdGhlciBwbGF0Zm9ybXMNCihBUk0gYm90aCAzMiBhbmQgNjQtYml0IGZsYXZvcnMgaXMgYSBn b29kIGV4YW1wbGUpIC0ganVzdCBwcmludCBib2dvbWlwcyBpbnN0ZWFkDQpvZiBhZGRpdGlvbmFs IGNvcmUgZnJlcXVlbmN5Lg0KDQotQWxleGV5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754291AbcBBW5c (ORCPT ); Tue, 2 Feb 2016 17:57:32 -0500 Received: from smtprelay4.synopsys.com ([198.182.47.9]:56253 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751158AbcBBW5a (ORCPT ); Tue, 2 Feb 2016 17:57:30 -0500 From: Alexey Brodkin To: Vineet Gupta CC: "robh@kernel.org" , "linux-kernel@vger.kernel.org" , "daniel.lezcano@linaro.org" , "noamc@ezchip.com" , "devicetree@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" Subject: Re: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Thread-Topic: [PATCH 2/9] ARC: [dts] Introduce Timer bindings Thread-Index: AQHRXajSbDjni/QM90q7NIDXuiLqPp8Yq24AgAAUnYCAABLEgIAAe0YA Date: Tue, 2 Feb 2016 22:57:26 +0000 Message-ID: <1454453846.25997.31.camel@synopsys.com> References: <1454410739-24444-1-git-send-email-vgupta@synopsys.com> <1454410739-24444-3-git-send-email-vgupta@synopsys.com> <1454418916.25997.18.camel@synopsys.com> <56B0BD2F.5080409@synopsys.com> <1454427373.25997.24.camel@synopsys.com> In-Reply-To: <1454427373.25997.24.camel@synopsys.com> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.225.15.89] Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u12MvarS023673 Hi Vineet, On Tue, 2016-02-02 at 18:36 +0300, Alexey Brodkin wrote: > Hi Vineet, > > On Tue, 2016-02-02 at 19:59 +0530, Vineet Gupta wrote: > > 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 ! > > But the only other alternative to hard-coded name is use of some internal variable > like "arc_timer_freq". > > I.e. we make "arc_timer_freq" global and use it for displaying core frequency. Well actually there's another possibility that is used on many other platforms (ARM both 32 and 64-bit flavors is a good example) - just print bogomips instead of additional core frequency. -Alexey