On 09/08/2019 14:38, Paul Cercueil wrote:
> From: Maarten ter Huurne <[email protected]>
> 
> OST is the OS Timer, a 64-bit timer/counter with buffered reading.
> 
> SoCs before the JZ4770 had (if any) a 32-bit OST; the JZ4770 and
> JZ4780 have a 64-bit OST.
> 
> This driver will register both a clocksource and a sched_clock to the
> system.
> 
> Signed-off-by: Maarten ter Huurne <[email protected]>
> Signed-off-by: Paul Cercueil <[email protected]>
> Tested-by: Mathieu Malaterre <[email protected]>
> Tested-by: Artur Rojek <[email protected]>
> ---
> 

[ ... ]

> +     err = clocksource_register_hz(cs, rate);
> +     if (err) {
> +             dev_err(dev, "clocksource registration failed: %d\n", err);
> +             clk_disable_unprepare(ost->clk);
> +             return err;
> +     }
> +
> +     /* Cannot register a sched_clock with interrupts on */

Aren't they already disabled?

> +     local_irq_save(flags);
> +     if (soc_info->is64bit)
> +             sched_clock_register(ingenic_ost_read_cntl, 32, rate);
> +     else
> +             sched_clock_register(ingenic_ost_read_cnth, 32, rate);
> +     local_irq_restore(flags);
> +
> +     return 0;
> +}
> +



-- 
 <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

Reply via email to