diff options
author | Tom Rini <trini@konsulko.com> | 2017-10-10 20:14:38 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-10-10 20:14:38 -0400 |
commit | 2ee87b0c1a5439e4ad6467cb8d5e8fb58922ca4b (patch) | |
tree | 96138b4bbe7b06ae10aae41ab1aac2a58dc5148d /drivers/serial | |
parent | 45c9d96ae40b0c4292eb67d687f0bf698a0ce72b (diff) | |
parent | 17cf99a5bb904a6e7c8797db2632bbe65ae1cfb5 (diff) | |
download | u-boot-2ee87b0c1a5439e4ad6467cb8d5e8fb58922ca4b.tar.gz u-boot-2ee87b0c1a5439e4ad6467cb8d5e8fb58922ca4b.tar.xz u-boot-2ee87b0c1a5439e4ad6467cb8d5e8fb58922ca4b.zip |
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/serial_sh.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c index 087785f9a2..d9db702803 100644 --- a/drivers/serial/serial_sh.c +++ b/drivers/serial/serial_sh.c @@ -226,11 +226,14 @@ static int sh_serial_ofdata_to_platdata(struct udevice *dev) plat->base = addr; ret = clk_get_by_name(dev, "fck", &sh_serial_clk); - if (!ret) - plat->clk = clk_get_rate(&sh_serial_clk); - else + if (!ret) { + ret = clk_enable(&sh_serial_clk); + if (!ret) + plat->clk = clk_get_rate(&sh_serial_clk); + } else { plat->clk = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "clock", 1); + } plat->type = dev_get_driver_data(dev); return 0; |