From 8819892bdbcfe8797bb1ebf45806d9b5ebb86674 Mon Sep 17 00:00:00 2001 From: Algapally Santosh Sagar Date: Thu, 21 Sep 2023 16:50:42 +0530 Subject: configs: Add support in Kconfig and convert for armada boards Move the DEFAULT_ENV_IS_RW to Kconfig for easier configuration. Hence, add the CONFIG_DEFAULT_ENV_IS_RW config to the defconfig files to allow enabling them for armada boards. Signed-off-by: Algapally Santosh Sagar Signed-off-by: Venkatesh Yadav Abbarapu Reviewed-by: Simon Glass Link: https://lore.kernel.org/r/20230921112043.3144726-2-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek --- include/env_default.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/env_default.h') diff --git a/include/env_default.h b/include/env_default.h index b16c22d5a28..227cad7c340 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -21,7 +21,7 @@ env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = { { #elif defined(DEFAULT_ENV_INSTANCE_STATIC) static char default_environment[] = { -#elif defined(DEFAULT_ENV_IS_RW) +#elif defined(CONFIG_DEFAULT_ENV_IS_RW) char default_environment[] = { #else const char default_environment[] = { -- cgit v1.2.3 From bd9ff681bdd1893d11ab8d4ea79a9f74d0fffdb7 Mon Sep 17 00:00:00 2001 From: Algapally Santosh Sagar Date: Thu, 21 Sep 2023 16:50:43 +0530 Subject: serial: zynqmp: Fetch baudrate from dtb and update The baudrate configured in .config is taken by default by serial. If change of baudrate is required then the .config needs to changed and u-boot recompilation is required or the u-boot environment needs to be updated. To avoid this, support is added to fetch the baudrate directly from the device tree file and update. The serial, prints the log with the configured baudrate in the dtb. The commit c4df0f6f315c ("arm: mvebu: Espressobin: Set default value for $fdtfile env variable") is taken as reference for changing the default environment variable. The default environment stores the default baudrate value, When default baudrate and dtb baudrate are not same glitches are seen on the serial. So, the environment also needs to be updated with the dtb baudrate to avoid the glitches on the serial. Also add test to cover this new function. Signed-off-by: Algapally Santosh Sagar Signed-off-by: Venkatesh Yadav Abbarapu Link: https://lore.kernel.org/r/20230921112043.3144726-3-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek --- include/env_default.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/env_default.h') diff --git a/include/env_default.h b/include/env_default.h index 227cad7c340..2ca4a087d3b 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -42,7 +42,7 @@ const char default_environment[] = { #if defined(CONFIG_BOOTDELAY) "bootdelay=" __stringify(CONFIG_BOOTDELAY) "\0" #endif -#if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0) +#if !defined(CONFIG_OF_SERIAL_BAUD) && defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0) "baudrate=" __stringify(CONFIG_BAUDRATE) "\0" #endif #ifdef CONFIG_LOADS_ECHO @@ -118,6 +118,10 @@ const char default_environment[] = { #endif #ifdef CFG_EXTRA_ENV_SETTINGS CFG_EXTRA_ENV_SETTINGS +#endif +#ifdef CONFIG_OF_SERIAL_BAUD + /* Padding for baudrate at the end when environment is writable */ + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" #endif "\0" #else /* CONFIG_USE_DEFAULT_ENV_FILE */ -- cgit v1.2.3