[PATCH v5 13/13] rockchip: serial: Kconfig: allow ROCKCHIP_SERIAL enabled in TPL

Kever Yang kever.yang at rock-chips.com
Mon Apr 11 04:26:16 CEST 2022


On 2022/4/10 00:55, Johan Jonker wrote:
> The serial_rockchip.c driver converts platdata to the data structure
> used in the ns16550.c file and then calls the function
> ns16550_serial_probe().
> When compiled with OF_REAL the serial_rockchip.c driver returns
> now -ENODEV when probed and does no harm.
> The config ROCKCHIP_SERIAL is currently depends on SPL_OF_PLATDATA.
> Allow serial port use for both SPL and TPL by removing this
> dependency and SPL_BUILD restriction.
>
> Signed-off-by: Johan Jonker <jbx6244 at gmail.com>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>

Thanks,
- Kever
> ---
>   drivers/serial/Kconfig  | 4 ++--
>   drivers/serial/Makefile | 2 --
>   2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> index 06a69e78de..9bf83b29ca 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -762,11 +762,11 @@ config PL01X_SERIAL
>   
>   config ROCKCHIP_SERIAL
>   	bool "Rockchip on-chip UART support"
> -	depends on DM_SERIAL && SPL_OF_PLATDATA
> +	depends on DM_SERIAL
>   	select SYS_NS16550
>   	help
>   	  Select this to enable a debug UART for Rockchip devices when using
> -	  CONFIG_SPL_OF_PLATDATA (i.e. a compiled-in device tree replacemenmt).
> +	  OF_PLATDATA (i.e. a compiled-in device tree replacemenmt).
>   	  This uses the ns16550 driver, converting the platdata from of-platdata
>   	  to the ns16550 format.
>   
> diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
> index b68b5e7b2b..d8e26d72ea 100644
> --- a/drivers/serial/Makefile
> +++ b/drivers/serial/Makefile
> @@ -46,9 +46,7 @@ obj-$(CONFIG_MXC_UART) += serial_mxc.o
>   obj-$(CONFIG_PXA_SERIAL) += serial_pxa.o
>   obj-$(CONFIG_MESON_SERIAL) += serial_meson.o
>   obj-$(CONFIG_INTEL_MID_SERIAL) += serial_intel_mid.o
> -ifdef CONFIG_SPL_BUILD
>   obj-$(CONFIG_ROCKCHIP_SERIAL) += serial_rockchip.o
> -endif
>   obj-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
>   obj-$(CONFIG_SANDBOX_SERIAL) += sandbox.o
>   obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o


More information about the U-Boot mailing list