mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
serial: ns16550: Handle -ENOENT when requesting clock
When calling clk_get_by_index(), fall back to the legacy method of getting the clock if -ENOENT is returned. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
53fec16206
commit
ab895d6af2
1 changed files with 1 additions and 1 deletions
|
@ -408,7 +408,7 @@ int ns16550_serial_ofdata_to_platdata(struct udevice *dev)
|
|||
err = clk_get_rate(&clk);
|
||||
if (!IS_ERR_VALUE(err))
|
||||
plat->clock = err;
|
||||
} else if (err != -ENODEV && err != -ENOSYS) {
|
||||
} else if (err != -ENOENT && err != -ENODEV && err != -ENOSYS) {
|
||||
debug("ns16550 failed to get clock\n");
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue