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


Groups > linux.kernel > #1457968

Re: [PATCH v4 3/7] clk: sunxi: add generic multi-parent bus clock gates driver

From Jean-Francois Moine <moinejf@free.fr>
Newsgroups linux.kernel
Subject Re: [PATCH v4 3/7] clk: sunxi: add generic multi-parent bus clock gates driver
Date 2016-08-08 20:20 +0200
Message-ID <s3Xjz-4So-3@gated-at.bofh.it> (permalink)
References <s3Wxb-4gT-7@gated-at.bofh.it> <s3Wxc-4gT-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon,  8 Aug 2016 18:21:45 +0100
Andre Przywara <andre.przywara@arm.com> wrote:

> The Allwinner H3 SoC introduced bus clock gates with potentially
> different parents per clock gate register. The H3 driver chose to
> hardcode the actual parent clock relation in the code.
> Add a new driver (which has the potential to drive the H3 and also
> the simple clock gates as well) which uses the power of DT to describe
> this relationship in an elegant and flexible way.
> Using one subnode for every parent clock we get away with a single
> DT compatible match, which can be used as a fallback value in the
> actual DTs without the need to add specific compatible strings to the
> code.  This avoids adding a new driver or function for every new SoC.

The 'parent's of the bus gates are of no interest.
They are supposed to be (no clear documentation) apb1, apb2, ahb1 and
ahb2, but, as you well noticed in the patch 5/7, these clocks are fixed
and have no gate. Some of them are parents of real clocks, but they
don't bring anything to the bus gates of the other clocks.

As I wrote previously, the simplest is to ungate/gate the clocks in
both the bus and clock registers on clk_prepare/unprepare.
Then, your 'multi-bus-gates' would be simply a generic 'multi-gates'.

-- 
Ken ar c'hentaƱ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

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


Thread

[PATCH v4 3/7] clk: sunxi: add generic multi-parent bus clock gates driver Andre Przywara <andre.przywara@arm.com> - 2016-08-08 19:30 +0200
  Re: [PATCH v4 3/7] clk: sunxi: add generic multi-parent bus clock  gates driver Jean-Francois Moine <moinejf@free.fr> - 2016-08-08 20:20 +0200
    Re: [linux-sunxi] Re: [PATCH v4 3/7] clk: sunxi: add generic  multi-parent bus clock gates driver Chen-Yu Tsai <wens@csie.org> - 2016-08-09 12:10 +0200
      Re: [linux-sunxi] Re: [PATCH v4 3/7] clk: sunxi: add generic  multi-parent bus clock gates driver Jean-Francois Moine <moinejf@free.fr> - 2016-08-09 19:30 +0200

csiph-web