From f92dd6d35730ac7d9a20609ea4afb60ea8414b87 Mon Sep 17 00:00:00 2001 From: Grant Ramsay Date: Wed, 1 Feb 2023 08:33:22 +1300 Subject: [PATCH] drivers: serial: Name the NS16550 variant Kconfig choice Naming this choice allows setting a default value in defconfig. Signed-off-by: Grant Ramsay --- .../phycore_am62x_a53/phycore_am62x_a53_defconfig | 2 -- drivers/serial/Kconfig.ns16550 | 2 +- soc/arm64/ti_sitara/am6x/Kconfig.defconfig.series | 11 +++++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/boards/arm64/phycore_am62x_a53/phycore_am62x_a53_defconfig b/boards/arm64/phycore_am62x_a53/phycore_am62x_a53_defconfig index 2fa65bd3b3..3f5893f674 100644 --- a/boards/arm64/phycore_am62x_a53/phycore_am62x_a53_defconfig +++ b/boards/arm64/phycore_am62x_a53/phycore_am62x_a53_defconfig @@ -22,8 +22,6 @@ CONFIG_XIP=n # Serial Drivers CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y -CONFIG_UART_NS16550=y -CONFIG_UART_NS16550_VARIANT_NS16750=y # Enable Console CONFIG_CONSOLE=y diff --git a/drivers/serial/Kconfig.ns16550 b/drivers/serial/Kconfig.ns16550 index eb18ed836e..5fe63642a6 100644 --- a/drivers/serial/Kconfig.ns16550 +++ b/drivers/serial/Kconfig.ns16550 @@ -30,7 +30,7 @@ config UART_NS16550_DRV_CMD Says n if not sure. -choice +choice UART_NS16550_VARIANT prompt "UART variant" default UART_NS16550_VARIANT_NS16550 help diff --git a/soc/arm64/ti_sitara/am6x/Kconfig.defconfig.series b/soc/arm64/ti_sitara/am6x/Kconfig.defconfig.series index 7b2a08588d..5e33d685dd 100644 --- a/soc/arm64/ti_sitara/am6x/Kconfig.defconfig.series +++ b/soc/arm64/ti_sitara/am6x/Kconfig.defconfig.series @@ -23,6 +23,17 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC int default 200000000 +if SERIAL + +config UART_NS16550 + default y + +choice UART_NS16550_VARIANT + default UART_NS16550_VARIANT_NS16750 +endchoice + +endif # SERIAL + source "soc/arm64/ti_sitara/am6x/Kconfig.defconfig.am62*" endif # SOC_SERIES_AM6X_A53