Thread (7 messages) flat view 7 messages, 3 authors, 2012-08-27
DORMANTno replies

Revision v1 of 4 in this series.

Revisions (4)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 current
  4. v2 [diff vs current]

[PATCH 1/4] clk: ux500: Adapt PRCMU and PRCC clocks for common clk

From: Ulf Hansson <hidden>
Date: 2012-08-27 08:36:56

On 26 August 2012 06:47, Arnd Bergmann [off-list ref] wrote:
On Friday 24 August 2012, Ulf Hansson wrote:
quoted
From: Ulf Hansson <redacted>

First version of common clock implementation of PRCMU clocks
and PRCC clocks for ux500 platforms.

Signed-off-by: Ulf Hansson <redacted>
Very nice, glad to see you got this working!

I only noticed one thing that you should improve:
Thanks for your input. I will send an updated patch.
quoted
+#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
Kind regards
Ulf Hansson
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help