From mboxrd@z Thu Jan 1 00:00:00 1970 From: lee.jones@linaro.org (Lee Jones) Date: Wed, 5 Jun 2013 09:05:22 +0100 Subject: [PATCH 21/21] clk: ux500: Supply provider look-up functionality to support Device Tree In-Reply-To: <201306042252.03340.arnd@arndb.de> References: <1370266965-7901-1-git-send-email-lee.jones@linaro.org> <1370266965-7901-22-git-send-email-lee.jones@linaro.org> <201306042252.03340.arnd@arndb.de> Message-ID: <20130605080522.GP3370@gmail.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, 04 Jun 2013, Arnd Bergmann wrote: > On Tuesday 04 June 2013, Linus Walleij wrote: > > The whole thing is very different from other DT clock things > > I've seen, usually you add a compatible node for each > > clock type, and a node for each physical gate. But there > > may be several ways to skin this cat... > > > > Based on the IRC discussion we had, I would think that the "prcc" clocks > would best be represented using multiple clock-cells since you can describe > them easily a tuple of register index, bit number some way to distinguish > the two types. > > The "prcmu" clocks are harder, and we probably need either a more verbose > representation using one node per clock there, or have a single node > for the entire prcmu and not bother to describe them in DT but hardcode > everything in the source. The current patch does the latter, which is > easier now but means we cannot simplify the code much in the future > when we remove ATAGS boot support. As already discussed, in the PRCMU case I'm going to make 'enum prcmu_clock {' look like register PRCM_YYCLKEN0_MGT_SET as described by the design specification, and use that as our indexer. > I hope Mike can give some better insight to what his preferences are. > > Arnd -- Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH 21/21] clk: ux500: Supply provider look-up functionality to support Device Tree Date: Wed, 5 Jun 2013 09:05:22 +0100 Message-ID: <20130605080522.GP3370@gmail.com> References: <1370266965-7901-1-git-send-email-lee.jones@linaro.org> <1370266965-7901-22-git-send-email-lee.jones@linaro.org> <201306042252.03340.arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Content-Disposition: inline In-Reply-To: <201306042252.03340.arnd-r2nGTMty4D4@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Arnd Bergmann Cc: Ulf Hansson , Mike Turquette , Linus WALLEIJ , Srinidhi KASAGAR , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" List-Id: devicetree@vger.kernel.org T24gVHVlLCAwNCBKdW4gMjAxMywgQXJuZCBCZXJnbWFubiB3cm90ZToKCj4gT24gVHVlc2RheSAw NCBKdW5lIDIwMTMsIExpbnVzIFdhbGxlaWogd3JvdGU6Cj4gPiBUaGUgd2hvbGUgdGhpbmcgaXMg dmVyeSBkaWZmZXJlbnQgZnJvbSBvdGhlciBEVCBjbG9jayB0aGluZ3MKPiA+IEkndmUgc2Vlbiwg dXN1YWxseSB5b3UgYWRkIGEgY29tcGF0aWJsZSBub2RlIGZvciBlYWNoCj4gPiBjbG9jayB0eXBl LCBhbmQgYSBub2RlIGZvciBlYWNoIHBoeXNpY2FsIGdhdGUuIEJ1dCB0aGVyZQo+ID4gbWF5IGJl IHNldmVyYWwgd2F5cyB0byBza2luIHRoaXMgY2F0Li4uCj4gPiAKPiAKPiBCYXNlZCBvbiB0aGUg SVJDIGRpc2N1c3Npb24gd2UgaGFkLCBJIHdvdWxkIHRoaW5rIHRoYXQgdGhlICJwcmNjIiBjbG9j a3MKPiB3b3VsZCBiZXN0IGJlIHJlcHJlc2VudGVkIHVzaW5nIG11bHRpcGxlIGNsb2NrLWNlbGxz IHNpbmNlIHlvdSBjYW4gZGVzY3JpYmUKPiB0aGVtIGVhc2lseSBhIHR1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vbiBMYW5kaW5nIFRlYW0gTGVhZApMaW5hcm8u b3JnIOKUgiBPcGVuIHNvdXJjZSBzb2Z0d2FyZSBmb3IgQVJNIFNvQ3MKRm9sbG93IExpbmFybzog RmFjZWJvb2sgfCBUd2l0dGVyIHwgQmxvZwpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fXwpkZXZpY2V0cmVlLWRpc2N1c3MgbWFpbGluZyBsaXN0CmRldmljZXRy ZWUtZGlzY3Vzc0BsaXN0cy5vemxhYnMub3JnCmh0dHBzOi8vbGlzdHMub3psYWJzLm9yZy9saXN0 aW5mby9kZXZpY2V0cmVlLWRpc2N1c3MK From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752806Ab3FEIFj (ORCPT ); Wed, 5 Jun 2013 04:05:39 -0400 Received: from mail-ee0-f53.google.com ([74.125.83.53]:41332 "EHLO mail-ee0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752500Ab3FEIF1 (ORCPT ); Wed, 5 Jun 2013 04:05:27 -0400 Date: Wed, 5 Jun 2013 09:05:22 +0100 From: Lee Jones To: Arnd Bergmann Cc: Linus Walleij , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Linus WALLEIJ , Srinidhi KASAGAR , Ulf Hansson , Mike Turquette , "devicetree-discuss@lists.ozlabs.org" Subject: Re: [PATCH 21/21] clk: ux500: Supply provider look-up functionality to support Device Tree Message-ID: <20130605080522.GP3370@gmail.com> References: <1370266965-7901-1-git-send-email-lee.jones@linaro.org> <1370266965-7901-22-git-send-email-lee.jones@linaro.org> <201306042252.03340.arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201306042252.03340.arnd@arndb.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 04 Jun 2013, Arnd Bergmann wrote: > On Tuesday 04 June 2013, Linus Walleij wrote: > > The whole thing is very different from other DT clock things > > I've seen, usually you add a compatible node for each > > clock type, and a node for each physical gate. But there > > may be several ways to skin this cat... > > > > Based on the IRC discussion we had, I would think that the "prcc" clocks > would best be represented using multiple clock-cells since you can describe > them easily a tuple of register index, bit number some way to distinguish > the two types. > > The "prcmu" clocks are harder, and we probably need either a more verbose > representation using one node per clock there, or have a single node > for the entire prcmu and not bother to describe them in DT but hardcode > everything in the source. The current patch does the latter, which is > easier now but means we cannot simplify the code much in the future > when we remove ATAGS boot support. As already discussed, in the PRCMU case I'm going to make 'enum prcmu_clock {' look like register PRCM_YYCLKEN0_MGT_SET as described by the design specification, and use that as our indexer. > I hope Mike can give some better insight to what his preferences are. > > Arnd -- Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog