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

Linus Walleij linus.walleij at linaro.org
Tue Sep 10 16:48:33 PDT 2019


On Tue, Sep 10, 2019 at 2:50 PM Claudiu Beznea
<claudiu.beznea at microchip.com> wrote:
> From: Alexandre Belloni <alexandre.belloni at bootlin.com>
>
> 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



More information about the linux-amlogic mailing list