All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] SMDK5250: FDT: Retrieve board model via DT
@ 2013-02-18 12:51 Rajeshwari Shinde
  2013-02-25  4:39 ` Simon Glass
  2013-03-12  1:46 ` Minkyu Kang
  0 siblings, 2 replies; 3+ messages in thread
From: Rajeshwari Shinde @ 2013-02-18 12:51 UTC (permalink / raw)
  To: u-boot

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
-- 
1.7.4.4

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

* [U-Boot] [PATCH] SMDK5250: FDT: Retrieve board model via DT
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2013-02-25  4:39 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 18, 2013 at 4:51 AM, Rajeshwari Shinde
<rajeshwari.s@samsung.com> wrote:
> Print out the board model by parsing the device tree file.
>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>

Acked-by: Simon Glass <sjg@chromium.org>

> ---
>  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
> --
> 1.7.4.4
>

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

* [U-Boot] [PATCH] SMDK5250: FDT: Retrieve board model via DT
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Minkyu Kang @ 2013-03-12  1:46 UTC (permalink / raw)
  To: u-boot

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.

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

end of thread, other threads:[~2013-03-12  1:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.