linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Gerhard Sittig <gsi@denx.de>,
	Mike Turquette <mturquette@linaro.org>,
	Michal Simek <michal.simek@xilinx.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC 0/3] clk: CCF clock primitives + custom IO accessors
Date: Mon, 3 Mar 2014 11:46:25 -0800	[thread overview]
Message-ID: <8d1a2e24-869d-4e77-aa73-d5c0ca36fe28@VA3EHSMHS011.ehs.local> (raw)
In-Reply-To: <5314DA49.9060001@codeaurora.org>

On Mon, 2014-03-03 at 11:38AM -0800, Stephen Boyd wrote:
> On 03/03/14 11:13, Sören Brinkmann wrote:
> > On Mon, 2014-03-03 at 08:07PM +0100, Gerhard Sittig wrote:
> >> On Mon, Mar 03, 2014 at 09:35 -0800, Sören Brinkmann wrote:
> >>> It would be nice if we could use the logic provided in the mux, div etc
> >>> primitives independently of how the HW is accessed and what is
> >>> necessary to shift and mask those register values around, right? I
> >>> mean, at then end we want to model a clk-(div|mux) and not a
> >>> clk-(div|mux) which has only a single, memory-mapped control register,
> >>> that does not overlap with other things, ...
> >> Did you lookup the ll_ops discussion in the thread that
> >> originated from
> >> http://article.gmane.org/gmane.linux.ports.arm.kernel/289895 and
> >> did you see the outlined logic in
> >> http://article.gmane.org/gmane.linux.ports.arm.omap/109233 and
> >> http://article.gmane.org/gmane.linux.ports.arm.omap/109381 ?
> >>
> >> Support for regmap access instead of mere MMIO was one of the
> >> things you could do with this approach.  You appear to be in the
> >> situation where you need such an extension (or something similar,
> >> but you really should look into the ll_ops thing).
> > Thanks for those pointer, I have some reading to do. That seems to
> > go into the right direction.  What is the status of those patches?
> > Are they already merged or actively worked on?
> >
> 
> Ugh. The ll_ops design is a simplified form of regmap. Why not just use
> regmap? It seems like it would be possible to make a regmap per
> clk_register_{basic_type}() call via regmap_init_mmio() while still
> allowing those functions to take a void __iomem pointer. Then we could
> remove clk_readl/clk_writel (after providing *_be variants of the
> registration functions for PPC) and just use a regmap throughout the
> basic clock type code. Finally we can introduce *_regmap() registration
> functions that allow drivers to register basic clock types with regmaps.

Migrating everything to regmap would be a good step, IMHO. That would
accommodate most of my concerns. One remains though: Especially the I2C
clocks may have parameters like dividers stored in more than one register
(in my particular case there is a 10-bit divider which - obviously -
spans across two device registers).
So, replacing a readl() with regmap_read() would not be enough for such
a clock. Would be nice if we could have a solution for such HW as well.

	Sören



      reply	other threads:[~2014-03-03 19:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 23:34 [PATCH RFC 0/3] clk: CCF clock primitives + custom IO accessors Soren Brinkmann
2014-02-28 23:34 ` [PATCH RFC 1/3] clk: Introduce I2C clock primitives Soren Brinkmann
2014-02-28 23:34 ` [PATCH RFC 2/3] clk/i2c-div: Allow custom divider accessors Soren Brinkmann
2014-02-28 23:34 ` [PATCH RFC 3/3] clk: Add driver for TI CDCE913 Soren Brinkmann
2014-03-02 20:29 ` [PATCH RFC 0/3] clk: CCF clock primitives + custom IO accessors Gerhard Sittig
2014-03-03 17:35   ` Sören Brinkmann
2014-03-03 19:07     ` Gerhard Sittig
2014-03-03 19:13       ` Sören Brinkmann
2014-03-03 19:38         ` Stephen Boyd
2014-03-03 19:46           ` Sören Brinkmann [this message]

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=8d1a2e24-869d-4e77-aa73-d5c0ca36fe28@VA3EHSMHS011.ehs.local \
    --to=soren.brinkmann@xilinx.com \
    --cc=gsi@denx.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=mturquette@linaro.org \
    --cc=sboyd@codeaurora.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).