[PATCH v1] vexpress_ca9x4: Enable DM_SERIAL

Ole P. Orhagen ole.orhagen at northern.tech
Fri Jan 26 13:47:50 CET 2024


This commit enables support for DM_SERIAL in the vexpress_ca9x4 boards.

When running the board with the DM_SERIAL driver, the board ran out of
memory in SPL when initialising the DM serial driver.

Thus this required an increase in the pre-allocated SRAM memory. I did
increase it to 0x800, and it now works graciously.

It could probably be set lower, but I do not see any reason not to use the
available SRAM at this point.

Also adds stdout-path to the 'chosen' node in the device tree.

Signed-off-by: Ole P. Orhagen <ole.orhagen at northern.tech>

---

 arch/arm/Kconfig                  | 2 +-
 arch/arm/dts/vexpress-v2p-ca9.dts | 4 +++-
 configs/vexpress_ca9x4_defconfig  | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index abd7c6c79a..8e9aaf70d2 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -678,7 +678,7 @@ config ARCH_BCMBCA
 config TARGET_VEXPRESS_CA9X4
 	bool "Support vexpress_ca9x4"
 	select CPU_V7A
-	select PL011_SERIAL
+	select PL01X_SERIAL
 
 config TARGET_BCMNS
 	bool "Support Broadcom Northstar"
diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts
index bf00c62bcf..e5b86c0d67 100644
--- a/arch/arm/dts/vexpress-v2p-ca9.dts
+++ b/arch/arm/dts/vexpress-v2p-ca9.dts
@@ -20,7 +20,9 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
-	chosen { };
+	chosen {
+		stdout-path = &v2m_serial0;
+	};
 
 	aliases {
 		serial0 = &v2m_serial0;
diff --git a/configs/vexpress_ca9x4_defconfig b/configs/vexpress_ca9x4_defconfig
index 2601e55ebf..f8e93bef4e 100644
--- a/configs/vexpress_ca9x4_defconfig
+++ b/configs/vexpress_ca9x4_defconfig
@@ -2,7 +2,7 @@ CONFIG_ARM=y
 CONFIG_SYS_L2CACHE_OFF=y
 CONFIG_TARGET_VEXPRESS_CA9X4=y
 CONFIG_TEXT_BASE=0x60800000
-CONFIG_SYS_MALLOC_F_LEN=0x400
+CONFIG_SYS_MALLOC_F_LEN=0x800
 CONFIG_NR_DRAM_BANKS=2
 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
 CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x60000f10
@@ -41,6 +41,7 @@ CONFIG_ARM_PL180_MMCI=y
 CONFIG_SYS_MMC_MAX_BLK_COUNT=127
 CONFIG_MTD=y
 CONFIG_DM_MTD=y
+CONFIG_DM_SERIAL=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_SYS_FLASH_CFI_WIDTH_32BIT=y
 CONFIG_FLASH_SHOW_PROGRESS=0
-- 
2.43.0



More information about the U-Boot mailing list