Skip to contentSkip to conversation

octeontx: do not require cavium BDK node to be present

PATCH In review Tim Harvey 2 participants 3 messages Jun 17, 2021 – Jul 9, 2021

lore
Share & tools
lore

Tim Harvey

author
#0 lore raw

PATCH 1/1 octeontx: do not require cavium BDK node to be present

The cavium,bdk node is a non-standard dt node used by the BDK and therefore it is removed from the dt before booting Linux. Do not require this node to exist as it won't for standard dt's.

---
 board/Marvell/octeontx/board-fdt.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
board/Marvell/octeontx/board-fdt.c +8 -12
index 0b05ef11e9..1db2a4a267 100644
@@ -281,20 +281,16 @@ int ft_board_setup(void *blob, struct bd_info *bd)
 	}
 
 	if (blob) {
+		/* delete cavium,bdk node if it exists */
 		offset = fdt_path_offset(blob, "/cavium,bdk");
-		if (offset < 0) {
-			printf("ERROR: FDT BDK node not found\n");
-			return offset;
-		}
-
-		/* delete node */
-		ret = fdt_del_node(blob, offset);
-		if (ret < 0) {
-			printf("WARNING : could not remove bdk node\n");
-			return ret;
+		if (offset >= 0) {
+			ret = fdt_del_node(blob, offset);
+			if (ret < 0) {
+				printf("WARNING : could not remove bdk node\n");
+				return ret;
+			}
+			debug("%s deleted bdk node\n", __func__);
 		}
-
-		debug("%s deleted bdk node\n", __func__);
 	}
 
 	return 0;
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Tim Harvey

The cavium,bdk node is a non-standard dt node used by the BDK and therefore it is removed from the dt before booting Linux. Do not require this node to exist as it won't for standard dt's.

Thanks,
Stefan

Quoted 28 lines
---
  board/Marvell/octeontx/board-fdt.c | 20 ++++++++------------
  1 file changed, 8 insertions(+), 12 deletions(-)
board/Marvell/octeontx/board-fdt.c +4 -10
index 0b05ef11e9..1db2a4a267 100644
@@ -281,20 +281,16 @@ int ft_board_setup(void *blob, struct bd_info *bd)
  	}
 
  	if (blob) {
+		/* delete cavium,bdk node if it exists */
  		offset = fdt_path_offset(blob, "/cavium,bdk");
-		if (offset < 0) {
-			printf("ERROR: FDT BDK node not found\n");
-			return offset;
-		}
-
-		/* delete node */
-		ret = fdt_del_node(blob, offset);
-		if (ret < 0) {
-			printf("WARNING : could not remove bdk node\n");
-			return ret;
+		if (offset >= 0) {
+			ret = fdt_del_node(blob, offset);
+			if (ret < 0) {

board/Marvell/octeontx/board-fdt.c int ft_board_setup(void *blob, struct bd_info *bd) · line 296

Quoted 10 lines
board/Marvell/octeontx/board-fdt.c +4 -2
+				printf("WARNING : could not remove bdk node\n");
+				return ret;
+			}
+			debug("%s deleted bdk node\n", __func__);
  		}
-
-		debug("%s deleted bdk node\n", __func__);
  	}
 
  	return 0;

Viele Grüße,
Stefan

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#2 lore raw
In reply to Tim Harvey
Quoted 5 lines · Tim Harvey

The cavium,bdk node is a non-standard dt node used by the BDK and therefore it is removed from the dt before booting Linux. Do not require this node to exist as it won't for standard dt's.

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 28 lines
---
  board/Marvell/octeontx/board-fdt.c | 20 ++++++++------------
  1 file changed, 8 insertions(+), 12 deletions(-)
board/Marvell/octeontx/board-fdt.c +4 -10
index 0b05ef11e9..1db2a4a267 100644
@@ -281,20 +281,16 @@ int ft_board_setup(void *blob, struct bd_info *bd)
  	}
 
  	if (blob) {
+		/* delete cavium,bdk node if it exists */
  		offset = fdt_path_offset(blob, "/cavium,bdk");
-		if (offset < 0) {
-			printf("ERROR: FDT BDK node not found\n");
-			return offset;
-		}
-
-		/* delete node */
-		ret = fdt_del_node(blob, offset);
-		if (ret < 0) {
-			printf("WARNING : could not remove bdk node\n");
-			return ret;
+		if (offset >= 0) {
+			ret = fdt_del_node(blob, offset);
+			if (ret < 0) {

board/Marvell/octeontx/board-fdt.c int ft_board_setup(void *blob, struct bd_info *bd) · line 296

Quoted 10 lines
board/Marvell/octeontx/board-fdt.c +4 -2
+				printf("WARNING : could not remove bdk node\n");
+				return ret;
+			}
+			debug("%s deleted bdk node\n", __func__);
  		}
-
-		debug("%s deleted bdk node\n", __func__);
  	}
 
  	return 0;

Viele Grüße,
Stefan

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]