Re: [PATCH 0/5] more clk-next fixes

2012-05-08 Thread Andrew Lunn
-clk.git v3.4-rc5-clk-next-orion-v2 Andrew Lunn (14): [ARM: Orion] Add clocks using the generic clk infrastructure. [ARM: Orion: SPI] Add clk/clkdev support. [ARM: Orion: Eth] Add clk/clkdev support. [ARM: Orion: WDT] Add clk/clkdev support [ARM: Orion: UART] Get

Re: [PATCH v6 3/3] clk: basic clock hardware types

2012-03-10 Thread Andrew Lunn
On Fri, Mar 09, 2012 at 11:54:24PM -0800, Mike Turquette wrote: Many platforms support simple gateable clocks, fixed-rate clocks, adjustable divider clocks and multi-parent multiplexer clocks. Hi Mike Please feel free to add: Reviewed-by: Andrew Lunn and...@lunn.ch Tested-by: Andrew Lunn

Re: [PATCH v6 2/3] clk: introduce the common clock framework

2012-03-10 Thread Andrew Lunn
On Fri, Mar 09, 2012 at 11:54:23PM -0800, Mike Turquette wrote: The common clock framework defines a common struct clk useful across most platforms as well as an implementation of the clk api that drivers can use safely for managing clocks. Hi Mike Please feel free to add: Tested-by: Andrew

Re: [PATCH v6 1/3] Documentation: common clk API

2012-03-10 Thread Andrew Lunn
On Fri, Mar 09, 2012 at 11:54:22PM -0800, Mike Turquette wrote: Provide documentation for the common clk structures and APIs. This code can be found in drivers/clk/ and include/linux/clk*.h. Hi Mike Please feel free to add: Reviewed-by: Andrew Lunn and...@lunn.ch Andrew

Re: [PATCH v5 3/4] clk: introduce the common clock framework

2012-03-09 Thread Andrew Lunn
I'd say use the nonstatic ones. I think using the static initializers will cause us much pain in the future. I've been through several rebases on the i.MX clock rework and everytime I wish my sed foo would be better. Now imagine what happens when it turns out that the internal struct clk

Re: [PATCH v5 3/4] clk: introduce the common clock framework

2012-03-08 Thread Andrew Lunn
Assuming that some day OMAP code can be refactored to allow for lazy (or at least initcall-based) registration of clocks then perhaps your suggestion can take root. Which leads me to this question: are there any other platforms out there that require the level of expose to struct clk present

Re: [PATCH v5 4/4] clk: basic clock hardware types

2012-03-05 Thread Andrew Lunn
On Sun, Mar 04, 2012 at 04:30:08PM -0800, Turquette, Mike wrote: On Sun, Mar 4, 2012 at 9:42 AM, Andrew Lunn and...@lunn.ch wrote: On Sat, Mar 03, 2012 at 12:29:01AM -0800, Mike Turquette wrote: Many platforms support simple gateable clocks, fixed-rate clocks, adjustable divider clocks

Re: [PATCH v5 4/4] clk: basic clock hardware types

2012-03-05 Thread Andrew Lunn
I think i can wrap your simple gate clock, to make my complex gate clock. What would help is if you would EXPORT_SYMBOL_GPL clk_gate_enable() and clk_gate_disable(), since they do exactly what i want. I can then build my own clk_ops structure, with my own unprepare() function. I would

Re: [PATCH v5 4/4] clk: basic clock hardware types

2012-03-04 Thread Andrew Lunn
+#define DEFINE_CLK_GATE(_name, _parent_name, _parent_ptr,\ + _flags, _reg, _bit_idx, \ + _gate_flags, _lock) \ + static struct clk _name;\ + static char

[PATCH] clk: Fix compile errors in DEFINE_CLK_GATE

2012-03-04 Thread Andrew Lunn
From 71e9a676b2b2f0dc2bb0cc395e8325cf38f4808b Mon Sep 17 00:00:00 2001 From: Andrew Lunn and...@lunn.ch Date: Sun, 4 Mar 2012 16:31:14 +0100 Subject: [PATCH] [clk] Fix compile errors in DEFINE_CLK_GATE() Signed-off-by: Andrew Lunn and...@lunn.ch --- include/linux/clk-private.h |4 ++-- 1

Re: [PATCH v5 4/4] clk: basic clock hardware types

2012-03-04 Thread Andrew Lunn
On Sat, Mar 03, 2012 at 12:29:01AM -0800, Mike Turquette wrote: Many platforms support simple gateable clocks, fixed-rate clocks, adjustable divider clocks and multi-parent multiplexer clocks. This patch introduces basic clock types for the above-mentioned hardware which share some common

Re: [PATCH v3 4/5] clk: basic gateable and fixed-rate clks

2011-12-12 Thread Andrew Lunn
Hi Mike +int clk_register_gate(struct device *dev, const char *name, unsigned long flags, + struct clk *fixed_parent, void __iomem *reg, u8 bit_idx, +int set_to_enable) + How do you suggest handling gated clocks which are already

Re: [PATCH v3 4/5] clk: basic gateable and fixed-rate clks

2011-12-12 Thread Andrew Lunn
I don't like this approach. If the bool for a particular clk is statically defined then it could be wrong (bootloader/kernel mismatch). I've been thinking of adding a clk-ops-init callback in clk_init, which is defined for a platform to use however the author sees fit. There have been a