All of lore.kernel.org
 help / color / mirror / Atom feed
From: wens@csie.org (Chen-Yu Tsai)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 0/3] clk: sunxi: Add muxable AHB clock to fix hstimer issues
Date: Wed, 25 Mar 2015 15:04:28 -0700	[thread overview]
Message-ID: <CAGb2v66JqdGLZSAtAds+On3vBe-9Z=o7eQM0MPh42A5jx1fO-g@mail.gmail.com> (raw)
In-Reply-To: <20150325215309.GN23664@lukather>

On Wed, Mar 25, 2015 at 2:53 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Wed, Mar 25, 2015 at 01:13:46PM -0700, Chen-Yu Tsai wrote:
>> On Wed, Mar 25, 2015 at 11:51 AM, Maxime Ripard
>> <maxime.ripard@free-electrons.com> wrote:
>> > On Wed, Mar 25, 2015 at 01:22:06AM +0800, Chen-Yu Tsai wrote:
>> >> Hi everyone,
>> >>
>> >> This is v2 of the sun5i muxable AHB clock series.
>> >>
>> >> Changes since v1:
>> >>
>> >>   - Dropped patches 1~3 that are merged
>> >>   - Extend comments to clarify what the "base factor clock" refers to,
>> >>     and what the divs clocks outputs should be.
>> >>
>> >>
>> >> This series adds support for the muxable ahb clock on sun5/7i. The mux
>> >> has inputs such as the axi clock, the cpu clock on sun5i, and pll6 with
>> >> various dividers. The goal is to have ahb muxed to pll6, which should
>> >> be a fixed rate albeit configurable clock. This fixes issues with
>> >> cpufreq changing the cpu frequency, which would affect the hstimer
>> >> clocked from ahb.
>> >>
>> >> Patch 1 makes divs clocks explicitly specify in the driver which output
>> >> is the base factor clock, instead of always putting it in last. This is
>> >> done to ensure DT bindings compatibility when we add outputs.
>> >>
>> >> Patch 2 adds the new pll6/4 output, which is used on sun7i as an input
>> >> to ahb mux.
>> >>
>> >> Patch 3 updates the dtsi files with the new drivers.
>> >>
>> >> The series is also available at
>> >>
>> >>     https://github.com/wens/linux/commits/sun5i-ahb-v2
>> >
>> > Applied all three. I think it would be great to convert the later SoCs
>> > to that too, just to make sure we have the same policy on all SoCs.
>>
>> For sun6i this is already doable. We just move the assignment from the
>> dmaengine node to the clock node.
>
> Yep.

Sent out a patch as part of the sun6i cpufreq series.

>> For sun8i the default divider results in 300 MHz for AHB, which might
>> be too fast.
>
> I guess you're talking about AHB1? APB2 should be muxed to PLL6 as
> well.

Ah, AHB1 yes. Is APB2 muxed from OSC 24MHz too slow?

>> And we can't do clock rate assignment yet. The clock drivers need
>> to be split out.
>
> Why?

The clock rate is propagated down the tree from the root OSC 24M
clock. Unfortunately it is registered after all the A23 clocks,
due to the way the sunxi clock driver works. So at the time the
AHB1 clock is registered, the parent clocks all have rate=0,
as there is no proper reference value for all the factor clocks
to calculate their rates.

ChenYu

>> For sun9i it is already the default.
>
> Perfect.
>
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

  reply	other threads:[~2015-03-25 22:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24 17:22 [PATCH v2 0/3] clk: sunxi: Add muxable AHB clock to fix hstimer issues Chen-Yu Tsai
2015-03-24 17:22 ` [PATCH v2 1/3] clk: sunxi: Make divs clocks specify which output is the base factor clock Chen-Yu Tsai
2015-03-24 17:22 ` [PATCH v2 2/3] clk: sunxi: Add pll6 / 4 clock output to sun4i-a10-pll6 Chen-Yu Tsai
2015-03-24 17:22 ` [PATCH v2 3/3] ARM: dts: sunxi: Update ahb clocks for sun5i and sun7i Chen-Yu Tsai
2015-03-25 18:51 ` [PATCH v2 0/3] clk: sunxi: Add muxable AHB clock to fix hstimer issues Maxime Ripard
2015-03-25 20:13   ` Chen-Yu Tsai
2015-03-25 21:53     ` Maxime Ripard
2015-03-25 22:04       ` Chen-Yu Tsai [this message]
2015-03-30 21:58         ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGb2v66JqdGLZSAtAds+On3vBe-9Z=o7eQM0MPh42A5jx1fO-g@mail.gmail.com' \
    --to=wens@csie.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.