On Wed, Nov 08, 2023 at 08:40:25AM +0800, Jim Liu wrote:

> If CONFIG_SYS_SKIP_UART_INIT is enabled, calculate the
> current baud rate and update the "console" environment
> variable.
> 
> Signed-off-by: Jim Liu <jjl...@nuvoton.com>
> ---
>  board/nuvoton/arbel_evb/Kconfig |  1 +
>  board/nuvoton/common/Kconfig    |  9 +++++
>  board/nuvoton/common/Makefile   |  1 +
>  board/nuvoton/common/common.c   | 71 +++++++++++++++++++++++++++++++++
>  board/nuvoton/common/common.h   | 11 +++++
>  board/nuvoton/poleg_evb/Kconfig |  1 +
>  6 files changed, 94 insertions(+)
>  create mode 100644 board/nuvoton/common/Kconfig
>  create mode 100644 board/nuvoton/common/Makefile
>  create mode 100644 board/nuvoton/common/common.c
>  create mode 100644 board/nuvoton/common/common.h

Please:
- Don't include <common.h> in code, and audit the rest of the includes
  in your new file
- Don't name the new file common.c (and common.h) but instead something
  about UART, and then only build it with your new CONFIG option
  enabled, so you don't need a build-time check in the function itself.

Also:
[snip]
> +int board_set_console(void)

This function only ever return 0, make it void?

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to