[U-Boot] [PATCH 3/4 V2] S5P: Serial: Add fdt support to driver
Simon Glass
sjg at chromium.org
Sun Mar 3 01:46:48 CET 2013
Hi Rajeshwari,
On Fri, Mar 1, 2013 at 2:16 AM, Rajeshwari Shinde
<rajeshwari.s at samsung.com> wrote:
> This patch adds FDT support to the serial s5p driver.
> At present disabling the serial console (from the device tree) crashes
> U-Boot. Add checks for this case, so that execution can continue without
> a serial console.
> It also enables the serial_s5p driver recognize the silent_console option.
>
> Signed-off-by: Abhilash Kesavan <a.kesavan at samsung.com>
> Signed-off-by: Gabe Black <gabeblack at google.com>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s at samsung.com>
> Acked-by: Simon Glass <sjg at chromium.org>
> ---
> Changes in V2:
> - None
> drivers/serial/serial_s5p.c | 80 +++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 80 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
> index 3c41242..4502ffb 100644
> --- a/drivers/serial/serial_s5p.c
> +++ b/drivers/serial/serial_s5p.c
[snip]
> @@ -87,6 +104,16 @@ int serial_init_dev(const int dev_index)
> {
> struct s5p_uart *const uart = s5p_get_base_uart(dev_index);
>
> +#if defined(CONFIG_SILENT_CONSOLE) && \
> + defined(CONFIG_OF_CONTROL) && \
> + !defined(CONFIG_SPL_BUILD)
> + if (fdtdec_get_config_int(gd->fdt_blob, "silent_console", 0))
> + gd->flags |= GD_FLG_SILENT;
One more thing - can you please use 'silent-console' for this instead?
We should try to use hyphen in FDT except for phandles.
> +#endif
> +
> + if (!config.enabled)
> + return 0;
> +
> /* reset and enable FIFOs, set triggers to the maximum */
> writel(0, &uart->ufcon);
> writel(0, &uart->umcon);
Regards,
Simon
More information about the U-Boot
mailing list