lkml.org 
[lkml]   [2018]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 12/16] clocksource: Add clock driver for RDA8810PL SoC
From
Date

Hi Manivannan,


On 19/11/2018 18:09, Manivannan Sadhasivam wrote:
> Add clock driver for RDA Micro RDA8810PL SoC supporting OSTIMER
> and HWTIMER.

As it is a new driver, can you elaborate the log and describe the timer.

> Signed-off-by: Andreas Färber <afaerber@suse.de>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---

[ ... ]

> +static int __init rda_timer_init(struct device_node *node)
> +{
> + unsigned long rate = 2000000;
> + int ostimer_irq, ret;
> +
> + rda_timer_base = of_io_request_and_map(node, 0, "rda-timer");
> + if (IS_ERR(rda_timer_base)) {
> + pr_err("Can't map timer registers");
> + return PTR_ERR(rda_timer_base);
> + }
> +
> + ostimer_irq = of_irq_get_byname(node, "ostimer");
> + if (ostimer_irq <= 0) {
> + pr_err("Can't parse ostimer IRQ");
> + return -EINVAL;
> + }
> +
> + clocksource_register_hz(&rda_clocksource, rate);
> +
> + ret = request_irq(ostimer_irq, rda_ostimer_interrupt, IRQF_TIMER,
> + "rda-ostimer", &rda_clockevent);
> + if (ret) {
> + pr_err("failed to request irq %d\n", ostimer_irq);
> + return ret;
> + }
> +

Use the timer-of API.

> +
> +TIMER_OF_DECLARE(rda8810pl, "rda,8810pl-timer", rda_timer_init);


Thanks

-- Daniel


--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

\
 
 \ /
  Last update: 2018-11-20 11:33    [W:0.614 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site