Commit 17273395 authored by Daniel Lezcano's avatar Daniel Lezcano
Browse files

clocksource/drivers: Rename CLOCKSOURCE_OF_DECLARE to TIMER_OF_DECLARE



The CLOCKSOURCE_OF_DECLARE macro is used widely for the timers to declare the
clocksource at early stage. However, this macro is also used to initialize
the clockevent if any, or the clockevent only.

It was originally suggested to declare another macro to initialize a
clockevent, so in order to separate the two entities even they belong to the
same IP. This was not accepted because of the impact on the DT where splitting
a clocksource/clockevent definition does not make sense as it is a Linux
concept not a hardware description.

On the other side, the clocksource has not interrupt declared while the
clockevent has, so it is easy from the driver to know if the description is
for a clockevent or a clocksource, IOW it could be implemented at the driver
level.

So instead of dealing with a named clocksource macro, let's use a more generic
one: TIMER_OF_DECLARE.

The patch has not functional changes.

Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
Acked-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 8e093102
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -403,7 +403,7 @@ out:
	WARN(err, "twd_local_timer_of_register failed (%d)\n", err);
	WARN(err, "twd_local_timer_of_register failed (%d)\n", err);
	return err;
	return err;
}
}
CLOCKSOURCE_OF_DECLARE(arm_twd_a9, "arm,cortex-a9-twd-timer", twd_local_timer_of_register);
TIMER_OF_DECLARE(arm_twd_a9, "arm,cortex-a9-twd-timer", twd_local_timer_of_register);
CLOCKSOURCE_OF_DECLARE(arm_twd_a5, "arm,cortex-a5-twd-timer", twd_local_timer_of_register);
TIMER_OF_DECLARE(arm_twd_a5, "arm,cortex-a5-twd-timer", twd_local_timer_of_register);
CLOCKSOURCE_OF_DECLARE(arm_twd_11mp, "arm,arm11mp-twd-timer", twd_local_timer_of_register);
TIMER_OF_DECLARE(arm_twd_11mp, "arm,arm11mp-twd-timer", twd_local_timer_of_register);
#endif
#endif
+1 −1
Original line number Original line Diff line number Diff line
@@ -333,5 +333,5 @@ static int __init xilinx_timer_init(struct device_node *timer)
	return 0;
	return 0;
}
}


CLOCKSOURCE_OF_DECLARE(xilinx_timer, "xlnx,xps-timer-1.00.a",
TIMER_OF_DECLARE(xilinx_timer, "xlnx,xps-timer-1.00.a",
		       xilinx_timer_init);
		       xilinx_timer_init);
+1 −1
Original line number Original line Diff line number Diff line
@@ -152,4 +152,4 @@ static int __init ralink_systick_init(struct device_node *np)
	return 0;
	return 0;
}
}


CLOCKSOURCE_OF_DECLARE(systick, "ralink,cevt-systick", ralink_systick_init);
TIMER_OF_DECLARE(systick, "ralink,cevt-systick", ralink_systick_init);
+1 −1
Original line number Original line Diff line number Diff line
@@ -353,4 +353,4 @@ void __init time_init(void)
	clocksource_probe();
	clocksource_probe();
}
}


CLOCKSOURCE_OF_DECLARE(nios2_timer, ALTR_TIMER_COMPATIBLE, nios2_time_init);
TIMER_OF_DECLARE(nios2_timer, ALTR_TIMER_COMPATIBLE, nios2_time_init);
+3 −3
Original line number Original line Diff line number Diff line
@@ -99,7 +99,7 @@ static int __init arc_cs_setup_gfrc(struct device_node *node)


	return clocksource_register_hz(&arc_counter_gfrc, arc_timer_freq);
	return clocksource_register_hz(&arc_counter_gfrc, arc_timer_freq);
}
}
CLOCKSOURCE_OF_DECLARE(arc_gfrc, "snps,archs-timer-gfrc", arc_cs_setup_gfrc);
TIMER_OF_DECLARE(arc_gfrc, "snps,archs-timer-gfrc", arc_cs_setup_gfrc);


#define AUX_RTC_CTRL	0x103
#define AUX_RTC_CTRL	0x103
#define AUX_RTC_LOW	0x104
#define AUX_RTC_LOW	0x104
@@ -158,7 +158,7 @@ static int __init arc_cs_setup_rtc(struct device_node *node)


	return clocksource_register_hz(&arc_counter_rtc, arc_timer_freq);
	return clocksource_register_hz(&arc_counter_rtc, arc_timer_freq);
}
}
CLOCKSOURCE_OF_DECLARE(arc_rtc, "snps,archs-timer-rtc", arc_cs_setup_rtc);
TIMER_OF_DECLARE(arc_rtc, "snps,archs-timer-rtc", arc_cs_setup_rtc);


#endif
#endif


@@ -333,4 +333,4 @@ static int __init arc_of_timer_init(struct device_node *np)


	return ret;
	return ret;
}
}
CLOCKSOURCE_OF_DECLARE(arc_clkevt, "snps,arc-timer", arc_of_timer_init);
TIMER_OF_DECLARE(arc_clkevt, "snps,arc-timer", arc_of_timer_init);
Loading