From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] clk: sunxi: predivider handling for factors clock
Date: Mon, 30 May 2016 20:45:32 +0200 [thread overview]
Message-ID: <20160530184532.GD4908@lukather> (raw)
In-Reply-To: <CAEzqOZvnKKNs_sXUJrwTykA5mzwKMg+HpaFcKgBTFr+utT4qQg@mail.gmail.com>
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160530/d2c5751b/attachment.sig>
next prev parent reply other threads:[~2016-05-30 18:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 16:47 [PATCH v2] sunxi factors clock predivider handling Vishnu Patekar
2016-04-19 16:47 ` [PATCH v2] clk: sunxi: predivider handling for factors clock Vishnu Patekar
2016-04-25 14:51 ` Chen-Yu Tsai
2016-04-26 17:55 ` Vishnu Patekar
2016-05-02 11:13 ` Maxime Ripard
[not found] ` <CAEzqOZvnKKNs_sXUJrwTykA5mzwKMg+HpaFcKgBTFr+utT4qQg@mail.gmail.com>
2016-05-30 18:45 ` Maxime Ripard [this message]
2016-05-31 8:39 ` Jean-Francois Moine
2016-05-31 8:59 ` 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=20160530184532.GD4908@lukather \
--to=maxime.ripard@free-electrons.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).