On Thu, Mar 21, 2013 at 09:31:01PM -0500, Rob Herring wrote:
Perhaps re-writing it like this would be more clear:
if (irq_num == 2){
__sp804_clockevents_init(base + TIMER_2_BASE, irq, clk1, name);
__sp804_clocksource_and_sched_clock_init(base, name, clk0, 1);
} else {
On Wed, Mar 20, 2013 at 11:54 PM, Rob Herring robherri...@gmail.com wrote:
From: Rob Herring rob.herr...@calxeda.com
This adds CLKSRC_OF based init for sp804 timer. The clock initialization is
refactored to support retrieving the clock(s) from the DT.
Signed-off-by: Rob Herring
On Wed, Mar 20, 2013 at 05:54:03PM -0500, Rob Herring wrote:
+ clk0 = of_clk_get(np, 0);
+ if (IS_ERR(clk0))
+ clk0 = NULL;
+
+ /* Get the 2nd clock if the timer has 2 timer clocks */
+ if (of_count_phandle_with_args(np, clocks, #clock-cells) == 3) {
+
On 03/21/2013 02:35 PM, Russell King - ARM Linux wrote:
On Wed, Mar 20, 2013 at 05:54:03PM -0500, Rob Herring wrote:
+clk0 = of_clk_get(np, 0);
+if (IS_ERR(clk0))
+clk0 = NULL;
+
+/* Get the 2nd clock if the timer has 2 timer clocks */
+if
From: Rob Herring rob.herr...@calxeda.com
This adds CLKSRC_OF based init for sp804 timer. The clock initialization is
refactored to support retrieving the clock(s) from the DT.
Signed-off-by: Rob Herring rob.herr...@calxeda.com
---
arch/arm/Kconfig |1 +