linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] clk: sunxi-ng: Add driver for A83T CCU
Date: Fri, 3 Mar 2017 15:56:39 -0800	[thread overview]
Message-ID: <20170303235639.GW25384@codeaurora.org> (raw)
In-Reply-To: <20170303095333.hgxoli2h7clailvo@lukather>

On 03/03, Maxime Ripard wrote:
> On Wed, Mar 01, 2017 at 11:17:05AM -0800, Stephen Boyd wrote:
> 
> > Can someone explain what the issue is? Could something like
> > clk_get_phase() + clk_get_rate() tell us if we're in one mode
> > vs. the other?
> 
> So we have two modes of operation for that clock, old vs new (I know,
> I didn't pick the names).
> 
> The old mode is what we support right now. It has a combination of a
> linear multiplier and divider, plus some phase controls.
> 
> The new mode however disables the phase controls and adds post-divider
> of 2 on the rate.
> 
> We cannot really rely on the rate itself, since there's a huge overlap
> between the rates we can obtain in the old and new modes. Same thing
> for the phase, having a 0 deg phase is achieved both in the old and
> new modes.
> 
> To make things worse, the new mode is only available on one out of
> three MMC controllers (and associated clocks), and that MMC controller
> needs to set a bit as well to switch to the new mode if needed. So we
> definitely needs some synchronisation there, and also to be able to
> retrieve if the mode switching is available, and if we're already
> using that mode.
> 
> Mike agreed that the easiest way forward was to use a custom function.
> 

Ok. Is there any need to change the mode dynamically at runtime?
Or could it be decided once at clk driver probe time/boot time
and detected via set_phase() failing when we're in the new mode?
At least, it sounds like set_phase() should bail out there
because it doesn't exist, although it could be argued that
setting the phase to something it already is set to is valid and
shouldn't return an error.

I'm not saying I'm opposed to the custom function, just thinking
of alternatives if MMC maintainers don't agree with the custom
function.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2017-03-03 23:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14  3:35 [PATCH 0/5] clk: sunxi-ng: Add support for A83T CCU Chen-Yu Tsai
2017-02-14  3:35 ` [PATCH 1/5] clk: sunxi-ng: mp: Adjust parent rate for pre-dividers Chen-Yu Tsai
2017-02-14  9:34   ` Maxime Ripard
2017-02-14  3:35 ` [PATCH 2/5] clk: sunxi-ng: gate: Support common pre-dividers Chen-Yu Tsai
2017-02-14  9:39   ` Maxime Ripard
2017-02-14  3:35 ` [PATCH 3/5] clk: sunxi-ng: Add compatible string for A83T CCU to bindings Chen-Yu Tsai
2017-02-14  3:35 ` [PATCH 4/5] clk: sunxi-ng: Add driver for A83T CCU Chen-Yu Tsai
2017-02-14  9:58   ` Maxime Ripard
2017-02-14 10:26     ` Chen-Yu Tsai
2017-02-15  9:49       ` Maxime Ripard
2017-03-01 19:17         ` Stephen Boyd
2017-03-03  9:53           ` Maxime Ripard
2017-03-03 23:56             ` Stephen Boyd [this message]
2017-03-07 14:58               ` Maxime Ripard
2017-03-22  6:50         ` Chen-Yu Tsai
2017-03-26 20:51           ` Maxime Ripard
2017-03-27  8:53             ` Chen-Yu Tsai
2017-04-03  7:53               ` Maxime Ripard
2017-02-14  3:35 ` [PATCH 5/5] ARM: dts: sun8i-a83t: Add CCU device nodes Chen-Yu Tsai

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=20170303235639.GW25384@codeaurora.org \
    --to=sboyd@codeaurora.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 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).