On 4/25/23 14:04, Venkatesh Yadav Abbarapu wrote:
From: Algapally Santosh Sagar <santoshsagar.algapa...@amd.com>
The SERIAL_DT_BAUD is added to Kconfig and the DEFAULT_ENV_IS_RW is moved
to the Kconfig for easier configuration.
Hence, the CONFIG_DEFAULT_ENV_IS_RW config is added to the defconfig files
to allow enabling them for armada boards.
Signed-off-by: Algapally Santosh Sagar <santoshsagar.algapa...@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbar...@amd.com>
---
configs/mvebu_db-88f3720_defconfig | 1 +
configs/mvebu_espressobin-88f3720_defconfig | 1 +
configs/mvebu_mcbin-88f8040_defconfig | 1 +
drivers/serial/Kconfig | 16 ++++++++++++++++
include/configs/mvebu_armada-37xx.h | 1 -
5 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/configs/mvebu_db-88f3720_defconfig
b/configs/mvebu_db-88f3720_defconfig
index ed0d28fd7d..e3bbaa2173 100644
--- a/configs/mvebu_db-88f3720_defconfig
+++ b/configs/mvebu_db-88f3720_defconfig
@@ -21,6 +21,7 @@ CONFIG_USE_PREBOOT=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_DEFAULT_ENV_IS_RW=y
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_ARCH_EARLY_INIT_R=y
CONFIG_BOARD_EARLY_INIT_F=y
diff --git a/configs/mvebu_espressobin-88f3720_defconfig
b/configs/mvebu_espressobin-88f3720_defconfig
index ce696787e8..a06eb2dd42 100644
--- a/configs/mvebu_espressobin-88f3720_defconfig
+++ b/configs/mvebu_espressobin-88f3720_defconfig
@@ -22,6 +22,7 @@ CONFIG_USE_PREBOOT=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_DEFAULT_ENV_IS_RW=y
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_ARCH_EARLY_INIT_R=y
CONFIG_BOARD_EARLY_INIT_F=y
diff --git a/configs/mvebu_mcbin-88f8040_defconfig
b/configs/mvebu_mcbin-88f8040_defconfig
index 058c04333a..4ee5f242f7 100644
--- a/configs/mvebu_mcbin-88f8040_defconfig
+++ b/configs/mvebu_mcbin-88f8040_defconfig
@@ -22,6 +22,7 @@ CONFIG_USE_PREBOOT=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_DEFAULT_ENV_IS_RW=y
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_ARCH_EARLY_INIT_R=y
CONFIG_BOARD_EARLY_INIT_F=y
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 10d07daf27..96cea87f45 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -24,6 +24,22 @@ config BAUDRATE
in the SPL stage (most drivers) or for choosing a default baudrate
in the absence of an environment setting (serial_mxc.c).
+config SERIAL_DT_BAUD
+ bool "Fetch serial baudrate from device tree"
+ depends on DM_SERIAL && SPL_ENV_SUPPORT
+ select DEFAULT_ENV_IS_RW
+ help
+ Select this to enable fetching and setting of the baudrate
+ configured in the DT. Replace the default baudrate with the DT
+ baudrate and also set it to the environment.
This should be in 1/2.
And the whole patch itself should be the first one in this series.
M