[PATCH] board: ti: am65x: Update fdt fixup logic for interconnect nodes

Suman Anna s-anna at ti.com
Fri Jul 24 00:56:09 CEST 2020


The DT nodes on AM65x SoCs currently use a node name "interconnect" for
the various interconnects. This name is not following the DT schema, and
should simply be "bus". Update the fdt fixup logic to use both the
current and the expected corrected path names so that this logic won't
be broken with newer kernels.

The logic also corrects the crypto node name as the DT node
unit-addresses are all expected to be lower case.

Signed-off-by: Suman Anna <s-anna at ti.com>
---
Hi Lokesh,

This patch provides backward compatibility while adjusting for the
new node names, and is needed for the equivalent kernel dts updates.

regards
Suman

 board/ti/am65x/evm.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index 2eb8235c6988..119859d5f565 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -100,8 +100,13 @@ int board_fit_config_name_match(const char *name)
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
 	int ret;
+	bool legacy_path = false;
 
-	ret = fdt_fixup_msmc_ram(blob, "/interconnect at 100000", "sram at 70000000");
+	ret = fdt_fixup_msmc_ram(blob, "/bus at 100000", "sram at 70000000");
+	if (ret < 0) {
+		ret = fdt_fixup_msmc_ram(blob, "/interconnect at 100000", "sram at 70000000");
+		legacy_path = true;
+	}
 	if (ret) {
 		printf("%s: fixing up msmc ram failed %d\n", __func__, ret);
 		return ret;
@@ -109,7 +114,10 @@ int ft_board_setup(void *blob, struct bd_info *bd)
 
 #if defined(CONFIG_TI_SECURE_DEVICE)
 	/* Make Crypto HW reserved for secure world use */
-	ret = fdt_disable_node(blob, "/interconnect at 100000/crypto at 4E00000");
+	if (legacy_path)
+		ret = fdt_disable_node(blob, "/interconnect at 100000/crypto at 4E00000");
+	else
+		ret = fdt_disable_node(blob, "/bus at 100000/crypto at 4e00000");
 	if (ret)
 		printf("%s: disabling SA2UL failed %d\n", __func__, ret);
 #endif
-- 
2.26.0



More information about the U-Boot mailing list