9 #include <linux/kernel.h>
11 #include <linux/module.h>
22 static struct clk *periph_clk;
24 static struct timer_data {
44 if (!timer_data[i].
cb) {
49 timer_data[
i].cb(timer_data[i].
data);
61 if (
id >= BCM63XX_TIMER_COUNT)
85 if (
id >= BCM63XX_TIMER_COUNT)
109 if (
id >= BCM63XX_TIMER_COUNT || !
callback)
114 if (timer_data[
id].
cb) {
120 timer_data[
id].data =
data;
133 if (
id >= BCM63XX_TIMER_COUNT)
145 return (
clk_get_rate(periph_clk) / (1000 * 1000)) * countdown_us;
155 if (
id >= BCM63XX_TIMER_COUNT)
192 if (IS_ERR(periph_clk))