From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH v4 2/6] clk: sunxi: Add H3 clocks support Date: Wed, 4 Nov 2015 08:24:56 -0800 Message-ID: <20151104162456.GA6114@lukather> References: <1445964626-6484-1-git-send-email-jenskuske@gmail.com> <1445964626-6484-3-git-send-email-jenskuske@gmail.com> <3751073.AWmm18dvKK@wuerfel> Reply-To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XZLT0nNRngx3qG4/" Return-path: Content-Disposition: inline In-Reply-To: <3751073.AWmm18dvKK@wuerfel> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Arnd Bergmann Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Jens Kuske , Chen-Yu Tsai , Michael Turquette , Linus Walleij , Rob Herring , Philipp Zabel , Emilio =?iso-8859-1?Q?L=F3pez?= , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Vishnu Patekar , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Hans de Goede , linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Id: devicetree@vger.kernel.org --XZLT0nNRngx3qG4/ Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Hi Arnd, On Fri, Oct 30, 2015 at 09:28:55AM +0100, Arnd Bergmann wrote: > On Tuesday 27 October 2015 17:50:22 Jens Kuske wrote: > > + of_property_read_string_index(node, "clock-output-names", > > + i, &clk_name); > > + > > + if (index == 17 || (index >= 29 && index <= 31)) > > + clk_parent = AHB2; > > + else if (index <= 63 || index >= 128) > > + clk_parent = AHB1; > > + else if (index >= 64 && index <= 95) > > + clk_parent = APB1; > > + else if (index >= 96 && index <= 127) > > + clk_parent = APB2; > > + > > + clk_reg = reg + 4 * (index / 32); > > > > Same as for the reset driver, this probably means you should have one > cell to indicate which bus it is for, and another cell for the > index. It's not really comparable to the reset driver. What's happening here is that we have a single set of (contiguous) registers, controlling gates from different parents. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --XZLT0nNRngx3qG4/--