diff options
author | Mugunthan V N <mugunthanvnm@ti.com> | 2015-09-28 16:17:47 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-10-22 14:43:58 -0400 |
commit | 3a64845e9d52d77b711b36a282e36f637f33d66b (patch) | |
tree | 5e96eaa86bb1fa1e3f90bd72cf22732bf55e55f8 | |
parent | 1778d7f3e65b2401455c872273a34900b3caab67 (diff) | |
download | u-boot-imx-3a64845e9d52d77b711b36a282e36f637f33d66b.zip u-boot-imx-3a64845e9d52d77b711b36a282e36f637f33d66b.tar.gz u-boot-imx-3a64845e9d52d77b711b36a282e36f637f33d66b.tar.bz2 |
drivers: serial: serial_omap: populate default clock frequency when not found in dt
In some platforms like am437x, serial node is not populated with
clock-frequency node. So in that case have a default clock-clock
frequency.
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
-rw-r--r-- | drivers/serial/serial_omap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c index e8d544f..9709444 100644 --- a/drivers/serial/serial_omap.c +++ b/drivers/serial/serial_omap.c @@ -12,6 +12,8 @@ DECLARE_GLOBAL_DATA_PTR; +#define DEFAULT_CLK_SPEED 48000000 /* 48Mhz */ + #if CONFIG_IS_ENABLED(OF_CONTROL) static const struct udevice_id omap_serial_ids[] = { { .compatible = "ti,omap3-uart" }, @@ -28,7 +30,7 @@ static int omap_serial_ofdata_to_platdata(struct udevice *dev) if (ret) return ret; plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset, - "clock-frequency", -1); + "clock-frequency", DEFAULT_CLK_SPEED); plat->reg_shift = 2; return 0; |