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

Bartosz Golaszewski brgl at bgdev.pl
Tue Apr 24 09:12:48 PDT 2018


2018-04-24 10:10 GMT+02:00 Sekhar Nori <nsekhar at ti.com>:
> On Tuesday 24 April 2018 12:08 AM, Bartosz Golaszewski wrote:
>> From: Bartosz Golaszewski <bgolaszewski at baylibre.com>
>>
>> Signed-off-by: Bartosz Golaszewski <bgolaszewski at baylibre.com>
>> ---
>>  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

Yes. Also: I've stumbled upon some problems with the current
implementation of early platform drivers making simple conversion of
psc and pll to early devices impossible. I've mostly fixed them and
hope to be able to send something today or early tomorrow.

Bart



More information about the linux-arm-kernel mailing list