Skip to contentSkip to conversation

armv8: ls1012afrwy: update of env board variables

PATCH New Pramod Kumar 2 participants 2 messages Oct 12, 2018 – Nov 2, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 armv8: ls1012afrwy: update of env board variables

ls1012afrwy and ls1012afrdm both boards are variant of ls1012a based SoC, by default board and board_name uboot env variables are set as ls1012afrdm. whenever board is detected as ls1012afrwy, uboot env variables are updated to ls1012afrwy if it set as other than ls1012afrwy

---
Changes in v2:
- fix subject and commit message

 board/freescale/ls1012afrdm/ls1012afrdm.c | 9 +++++++++
 1 file changed, 9 insertions(+)
board/freescale/ls1012afrdm/ls1012afrdm.c +9 -0
index 5db1027717..d149d489d5 100644
@@ -42,6 +42,7 @@ int checkboard(void)
 	puts("Board: LS1012AFRDM ");
 #else
 	int rev;
+	const char *b_name, *board;
 
 	rev = get_board_version();
 
@@ -60,6 +61,14 @@ int checkboard(void)
 		puts(": unknown");
 		break;
 	}
+
+	board = env_get("board");
+	if (strncmp(board, "ls1012afrwy", strlen("ls1012afrwy")) != 0)
+		env_set("board", "ls1012afrwy");
+
+	b_name = env_get("board_name");
+	if (strncmp(b_name, "ls1012afrwy", strlen("ls1012afrwy")) != 0)
+		env_set("board_name", "ls1012afrwy");
 #endif
 
 	return 0;
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 armv8: ls1012afrwy: update of env board variables

Quoted 32 lines · Pramod Kumar

ls1012afrwy and ls1012afrdm both boards are variant of ls1012a based SoC, by default board and board_name uboot env variables are set as ls1012afrdm. whenever board is detected as ls1012afrwy, uboot env variables are updated to ls1012afrwy if it set as other than ls1012afrwy

---
Changes in v2:
- fix subject and commit message

 board/freescale/ls1012afrdm/ls1012afrdm.c | 9 +++++++++
 1 file changed, 9 insertions(+)
board/freescale/ls1012afrdm/ls1012afrdm.c +2 -0
index 5db1027717..d149d489d5 100644
@@ -42,6 +42,7 @@ int checkboard(void)
 	puts("Board: LS1012AFRDM ");
 #else
 	int rev;
+	const char *b_name, *board;
 
 	rev = get_board_version();
 
@@ -60,6 +61,14 @@ int checkboard(void)
 		puts(": unknown");
 		break;
 	}
+

board/freescale/ls1012afrdm/ls1012afrdm.c int checkboard(void) · line 74

Quoted 10 lines
board/freescale/ls1012afrdm/ls1012afrdm.c +7 -0
+	board = env_get("board");
+	if (strncmp(board, "ls1012afrwy", strlen("ls1012afrwy")) != 0)
+		env_set("board", "ls1012afrwy");
+
+	b_name = env_get("board_name");
+	if (strncmp(b_name, "ls1012afrwy", strlen("ls1012afrwy")) != 0)
+		env_set("board_name", "ls1012afrwy");
 #endif
 
 	return 0;

I don't see how you detect the board. You only check if the variables were set. By the way, where do you use "board_name"?

York