Re: [RFC work-in-progress 5/7] !WIP ARM: davinci: convert da850 to using the davinci clocksource driver

From: Sekhar Nori
Date: Tue Apr 24 2018 - 04:11:53 EST


On Tuesday 24 April 2018 12:08 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
> ---
> arch/arm/mach-davinci/da850.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
> index 3f27d46ca43f..712964383bc2 100644
> --- a/arch/arm/mach-davinci/da850.c
> +++ b/arch/arm/mach-davinci/da850.c
> @@ -757,13 +757,28 @@ void __init da850_init(void)
> WARN(!da8xx_syscfg1_base, "Unable to map syscfg1 module");
> }
>
> +static struct platform_device da850_timer_device = {
> + .name = "timer-davinci",
> + .id = -1,
> +};
> +
> void __init da850_init_time(void)
> {
> struct clk *clk;
> + int ret;
>
> clk = clk_register_fixed_rate(NULL, "ref_clk", NULL, 0, DA850_REF_FREQ);
>
> davinci_timer_init(clk);
> +
> + ret = clk_register_clkdev(clk, NULL, "timer-davinci");
> + if (ret) {
> + pr_err("%s: error registering ref_clk: %d", __func__, ret);
> + return;
> + }

This part had to be added because you don't have clocks converted to
early platform devices in your branch, right?

Thanks,
Sekhar