[PATCH 05/23] serial: Add a SERIAL config

Sean Anderson seanga2 at gmail.com
Fri Aug 13 03:11:34 CEST 2021


On 8/8/21 2:20 PM, Simon Glass wrote:
> At present we have SPL_SERIAL and TPL_SERIAL but not piain SERIAL. This

nit: plain

I believe this typo occurs in several other patches in this series as well, e.g. GPIO and POWER.

--Sean

> works because there is a special build rule in Makefile that always
> includes the drivers/serial directory.
> 
> It is better to have all driver directories included by drivers/Makefile
> and there is already a rule in there for this purpose. It just needs a
> Kconfig for U-Boot proper, so add one.
> 
> It is always enabled, for now, since that mimics the current behaviour.
> It should be possible to drop the strange 'SERIAL_PRESENT' option at some
> point and use SERIAL instead.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> 
>   Makefile               |  1 -
>   drivers/serial/Kconfig | 15 +++++++++++++--
>   2 files changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 269e353a28a..653df0d2731 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -829,7 +829,6 @@ libs-$(CONFIG_FMAN_ENET) += drivers/net/fm/
>   libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/
>   libs-$(CONFIG_SYS_FSL_MMDC) += drivers/ddr/fsl/
>   libs-$(CONFIG_$(SPL_)ALTERA_SDRAM) += drivers/ddr/altera/
> -libs-y += drivers/serial/
>   libs-y += drivers/usb/cdns3/
>   libs-y += drivers/usb/dwc3/
>   libs-y += drivers/usb/common/
> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> index 93348c0929c..205c9ddc442 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -2,7 +2,18 @@
>   # Serial device configuration
>   #
>   
> -menu "Serial drivers"
> +menuconfig SERIAL
> +	bool "Serial"
> +	default y
> +	help
> +	  Enable support for serial drivers. This allows use of a serial UART
> +	  for displaying messages while U-Boot is running. It also brings in
> +	  printf() and panic() functions. This should normally be enabled
> +	  unless there are space reasons not to. If you just need to disable
> +	  the console you can adjust the stdout environment variable or use
> +	  SILENT_CONSOLE.
> +
> +if SERIAL
>   
>   config BAUDRATE
>   	int "Default baudrate"
> @@ -939,4 +950,4 @@ config SYS_SDMR
>   	depends on MPC8XX_CONS
>   	default 0
>   
> -endmenu
> +endif
> 



More information about the U-Boot mailing list