From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] SMDK5250: FDT: Retrieve board model via DT
Date: Tue, 12 Mar 2013 10:46:44 +0900 [thread overview]
Message-ID: <513E8904.7040303@samsung.com> (raw)
In-Reply-To: <1361191909-9565-1-git-send-email-rajeshwari.s@samsung.com>
On 18/02/13 21:51, Rajeshwari Shinde wrote:
> Print out the board model by parsing the device tree file.
>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
> ---
> board/samsung/smdk5250/smdk5250.c | 11 ++++++++++-
> 1 files changed, 10 insertions(+), 1 deletions(-)
>
> diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
> index 6f6f2c2..0097b3f 100644
> --- a/board/samsung/smdk5250/smdk5250.c
> +++ b/board/samsung/smdk5250/smdk5250.c
> @@ -336,8 +336,17 @@ int board_eth_init(bd_t *bis)
> #ifdef CONFIG_DISPLAY_BOARDINFO
> int checkboard(void)
> {
> - printf("\nBoard: SMDK5250\n");
> +#ifdef CONFIG_OF_CONTROL
> + const char *board_name;
>
> + board_name = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
> + if (board_name == NULL)
> + printf("\nUnknown Board\n");
> + else
> + printf("\nBoard: %s\n", board_name);
> +#else
> + printf("\nBoard: SMDK5250\n");
> +#endif
> return 0;
> }
> #endif
>
applied to u-boot-samsung.
Thanks,
Minkyu Kang.
prev parent reply other threads:[~2013-03-12 1:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-18 12:51 [U-Boot] [PATCH] SMDK5250: FDT: Retrieve board model via DT Rajeshwari Shinde
2013-02-25 4:39 ` Simon Glass
2013-03-12 1:46 ` Minkyu Kang [this message]
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=513E8904.7040303@samsung.com \
--to=mk7.kang@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox