]> git.sur5r.net Git - u-boot/commit
timer: Support clocks via phandle
authorZakharov Vlad <Vladislav.Zakharov@synopsys.com>
Fri, 9 Dec 2016 14:18:32 +0000 (17:18 +0300)
committerTom Rini <trini@konsulko.com>
Tue, 27 Dec 2016 16:24:10 +0000 (11:24 -0500)
commita5acafb25598ef409f48a7884316a9a4e96c63a4
tree07dfbc12afa1c0ff70ec4731e6cb3b9e02afc995
parentbd2e9714c851770652253fab858cb50ecd95d329
timer: Support clocks via phandle

Earlier timer driver needed a clock-frequency property in compatible
device-tree nodes. Another way is to reference a clock via a phandle.

So now timer_pre_probe tries to get clock by reference through device
tree. In case it is impossible to get clock device through the
reference, clock-frequency property of the timer node is read to provide
backward compatibility.

Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/timer/timer-uclass.c