[Uclinux-h8-devel] [PATCH 7/7] clocksource/drivers/integrator-ap: parse the chosen node

Back to archive index
Linus Walleij linus****@linar*****
2019年 9月 11日 (水) 08:48:33 JST


On Tue, Sep 10, 2019 at 2:50 PM Claudiu Beznea
<claud****@micro*****> wrote:
> From: Alexandre Belloni <alexa****@bootl*****>
>
> The driver currently uses aliases to know whether the timer is the
> clocksource or the clockevent.

OK maybe that wasn't the most elegant solution.

> Add the /chosen/linux,clocksource and
> /chosen/linux,clockevent parsing while keeping backward compatibility.

This is not how I would solve this today.

I would simply remove/comment out the IRQ from the timer
that cannot be used for clockevent from the device tree
(apparently it doesn't work anyway), and make the code only
pick a timer with a valid interrupt assigned as clock event,
while a timer without interrupt can be used for clock source.

This has the upside of not needing any special aliases or
chosen things.

Yours,
Linus Walleij



Uclinux-h8-devel メーリングリストの案内
Back to archive index