All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pramod Kumar <pramod.kumar_1@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ls1012afrwy:update ls1012afrwy env board variable
Date: Thu, 11 Oct 2018 12:10:37 +0530	[thread overview]
Message-ID: <20181011064037.28839-1-pramod.kumar_1@nxp.com> (raw)

ls1012afrwy and ls1012afrdm both boards are varinat of ls1012a based
SoC board.
By default board and board_name uboot env variables are set as
ls1012afrdm.
whenever board is detected as ls1012afrwy, uboot env
variables are upadted to ls1012afrwy if it set as ls1012afrdm.

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
---
 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

             reply	other threads:[~2018-10-11  6:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11  6:40 Pramod Kumar [this message]
2018-10-11 15:43 ` [U-Boot] [PATCH] ls1012afrwy:update ls1012afrwy env board variable York Sun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181011064037.28839-1-pramod.kumar_1@nxp.com \
    --to=pramod.kumar_1@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.