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


Groups > linux.kernel > #1409313 > unrolled thread

Re: [PATCH v2] clk: sunxi: predivider handling for factors clock

Started byMaxime Ripard <maxime.ripard@free-electrons.com>
First post2016-05-30 20:50 +0200
Last post2016-05-31 11:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2] clk: sunxi: predivider handling for factors clock Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-05-30 20:50 +0200
    Re: [PATCH v2] clk: sunxi: predivider handling for factors clock Jean-Francois Moine <moinejf@free.fr> - 2016-05-31 10:40 +0200
      Re: [PATCH v2] clk: sunxi: predivider handling for factors clock Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-05-31 11:00 +0200

#1409313 — Re: [PATCH v2] clk: sunxi: predivider handling for factors clock

FromMaxime Ripard <maxime.ripard@free-electrons.com>
Date2016-05-30 20:50 +0200
SubjectRe: [PATCH v2] clk: sunxi: predivider handling for factors clock
Message-ID<rEAqd-7ZT-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi Vishnu,

On Mon, May 16, 2016 at 07:28:42AM +0800, Vishnu Patekar wrote:
> > > @@ -307,7 +305,7 @@ static void sun6i_get_ahb1_factors(struct factors_request *req)
> > >       div = DIV_ROUND_UP(req->parent_rate, req->rate);
> > >
> > >       /* calculate pre-divider if parent is pll6 */
> > > -     if (req->parent_index == SUN6I_AHB1_PARENT_PLL6) {
> > > +     if (req->prediv_width) {
> > >               if (div < 4)
> > >                       calcp = 0;
> > >               else if (div / 2 < 4)
> >
> > You should also remove that code from that function. Now that the core
> > can tell the pre-divider configuration, it can adjust the parent rate
> > so that you don't have to care anymore.
>
> We still need to get m factor when it's called from set_rate and
> determine_rate.
> 
> Sorry, I did not your "that code from that function" meaning. I assumed
> you're talking about m factor in sun6i_get_ahb1_factors.

Sorry for the late answer.

I don't know if you've seen it, but I have been working on a new clock
framework.

I went over all the A83T clocks, and most of them could be
covered. The issue only lies in the PLLs and their additional 1-bit
dividers.

If we just choos to ignore (one of) them, it should be pretty trivial
to implement with the current clock classes we have.

There's also the current assumption that there's a single parent that
has a pre-divider, but that can easily be fixed by setting up an
array.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[toc] | [next] | [standalone]


#1409987

FromJean-Francois Moine <moinejf@free.fr>
Date2016-05-31 10:40 +0200
Message-ID<rENnr-iy-3@gated-at.bofh.it>
In reply to#1409313
On Mon, 30 May 2016 20:45:32 +0200
Maxime Ripard <maxime.ripard@free-electrons.com> wrote:

> I went over all the A83T clocks, and most of them could be
> covered. The issue only lies in the PLLs and their additional 1-bit
> dividers.
> 
> If we just choos to ignore (one of) them, it should be pretty trivial
> to implement with the current clock classes we have.

Hi Maxime,

I already did the job for all the A83T clocks.
It is not fully tested yet, but, to be sure we are on the same way,
I am sending a RFC series.

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

[toc] | [prev] | [next] | [standalone]


#1410005

FromMaxime Ripard <maxime.ripard@free-electrons.com>
Date2016-05-31 11:00 +0200
Message-ID<rENGO-pS-11@gated-at.bofh.it>
In reply to#1409987

[Multipart message — attachments visible in raw view] — view raw

On Tue, May 31, 2016 at 10:39:05AM +0200, Jean-Francois Moine wrote:
> On Mon, 30 May 2016 20:45:32 +0200
> Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> 
> > I went over all the A83T clocks, and most of them could be
> > covered. The issue only lies in the PLLs and their additional 1-bit
> > dividers.
> > 
> > If we just choos to ignore (one of) them, it should be pretty trivial
> > to implement with the current clock classes we have.
> 
> Hi Maxime,
> 
> I already did the job for all the A83T clocks.
> It is not fully tested yet, but, to be sure we are on the same way,
> I am sending a RFC series.

Awesome, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web