]> git.dujemihanovic.xyz Git - u-boot.git/commit
dm: timer: handle being called before dm_root is ready
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Mon, 11 Sep 2017 20:04:11 +0000 (22:04 +0200)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Mon, 18 Sep 2017 18:40:33 +0000 (20:40 +0200)
commitaf823151641b1a9a8eae8c3b111f5fa27e6873ac
treeab1c2cc6793ab8511b5f66bea2b95d38cbb5e4c7
parentb61e8b0c9e76dacf0b670c3948c3cd738b2379a3
dm: timer: handle being called before dm_root is ready

When used with bootstage recording, dm_timer_init may be called
surprisingly early: i.e. before dm_root is ready. To deal with
this case, we explicitly check for this condition and return
-EAGAIN to the caller (refer to drivers/timer/rockchip_timer.c
for a case where this is needed/used).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
drivers/timer/timer-uclass.c