[U-Boot] [PATCH 1/6] drivers: serial: serial_omap: populate default clock frequency when not found in dt
Lokesh Vutla
a0131933 at ti.com
Mon Sep 28 12:51:54 CEST 2015
On Monday 28 September 2015 04:17 PM, Mugunthan V N wrote:
> In some platforms like am437x, serial node is not populated with
> clock-frequency node. So in that case have a default clock-clock
> frequency.
Reviewed-by: Lokesh Vutla <lokeshvutla at ti.com>
Thanks and regards,
Lokesh
>
> Signed-off-by: Mugunthan V N <mugunthanvnm at ti.com>
> ---
> drivers/serial/serial_omap.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> 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;
>
More information about the U-Boot
mailing list