提交 3a64845e 编写于 作者: M Mugunthan V N 提交者: Tom Rini

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: NMugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: NLokesh Vutla <lokeshvutla@ti.com>
上级 1778d7f3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册