All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] armv8: ls1012afrwy: update of env board variables
@ 2018-10-12 11:01 Pramod Kumar
  2018-11-02 15:03 ` York Sun
  0 siblings, 1 reply; 2+ messages in thread
From: Pramod Kumar @ 2018-10-12 11:01 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
---
Changes in v2:
 - fix subject and commit message

 board/freescale/ls1012afrdm/ls1012afrdm.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c
index 5db1027717..d149d489d5 100644
--- a/board/freescale/ls1012afrdm/ls1012afrdm.c
+++ b/board/freescale/ls1012afrdm/ls1012afrdm.c
@@ -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;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] armv8: ls1012afrwy: update of env board variables
  2018-10-12 11:01 [U-Boot] [PATCH] armv8: ls1012afrwy: update of env board variables Pramod Kumar
@ 2018-11-02 15:03 ` York Sun
  0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2018-11-02 15:03 UTC (permalink / raw)
  To: u-boot

On 10/12/18 4:01 AM, Pramod Kumar wrote:
> 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
> 
> Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
> ---
> Changes in v2:
>  - fix subject and commit message
> 
>  board/freescale/ls1012afrdm/ls1012afrdm.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c
> index 5db1027717..d149d489d5 100644
> --- a/board/freescale/ls1012afrdm/ls1012afrdm.c
> +++ b/board/freescale/ls1012afrdm/ls1012afrdm.c
> @@ -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;
> 

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-02 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-12 11:01 [U-Boot] [PATCH] armv8: ls1012afrwy: update of env board variables Pramod Kumar
2018-11-02 15:03 ` York Sun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.