linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] clk: ux500: Adapt PRCMU and PRCC clocks for common clk
Date: Sun, 26 Aug 2012 04:47:58 +0000	[thread overview]
Message-ID: <201208260447.58396.arnd@arndb.de> (raw)
In-Reply-To: <1345807565-7729-2-git-send-email-ulf.hansson@stericsson.com>

On Friday 24 August 2012, Ulf Hansson wrote:
> From: Ulf Hansson <ulf.hansson@linaro.org>
> 
> First version of common clock implementation of PRCMU clocks
> and PRCC clocks for ux500 platforms.
> 
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

Very nice, glad to see you got this working!

I only noticed one thing that you should improve:

> +#define to_clk_prcc(_hw) container_of(_hw, struct clk_prcc, hw)
> +
> +struct clk_prcc {
> +	struct clk_hw hw;
> +	unsigned int io_base;
> +	u32 cg_sel;
> +	int is_enabled;
> +};
> +
> +/* PRCC clock operations. */
> +
> +static int clk_prcc_pclk_enable(struct clk_hw *hw)
> +{
> +	struct clk_prcc *clk = to_clk_prcc(hw);
> +	void __iomem *io_base = __io_address(clk->io_base);

In a proper device driver, we should not use hacks like __io_address. Please
change the driver to ioremap the register area at initialization time, and
don't pass a physical io_base like above but instead pass an offset into
the register area.

	Arnd

  reply	other threads:[~2012-08-26  4:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-24 11:26 [PATCH 0/4] clk: Convert ARM ux500 to common clock Ulf Hansson
2012-08-24 11:26 ` [PATCH 1/4] clk: ux500: Adapt PRCMU and PRCC clocks for common clk Ulf Hansson
2012-08-26  4:47   ` Arnd Bergmann [this message]
2012-08-27  8:36     ` Ulf Hansson
2012-08-24 11:26 ` [PATCH 2/4] clk: ux500: First version of clock definitions for ux500 Ulf Hansson
2012-08-24 11:26 ` [PATCH 3/4] clk: ux500: Clock definitions for u8500 Ulf Hansson
2012-08-24 11:26 ` [PATCH 4/4] ARM: ux500: Switch to use common clock framework Ulf Hansson

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=201208260447.58396.arnd@arndb.de \
    --to=arnd@arndb.de \
    --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).