SMDK5250: FDT: Retrieve board model via DT
PATCH 1/1 SMDK5250: FDT: Retrieve board model via DT
Print out the board model by parsing the device tree file.
Signed-off-by Rajeshwari Shinde <[email protected]>
--- board/samsung/smdk5250/smdk5250.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)
board/samsung/smdk5250/smdk5250.c +10 -1
@@ -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
Signature · 1 line
1.7.4.4
PATCH 1/1 SMDK5250: FDT: Retrieve board model via DT
Quoted 3 lines · Rajeshwari Shinde
Print out the board model by parsing the device tree file.
Signed-off-by Rajeshwari Shinde <[email protected]>
Acked-by Simon Glass <[email protected]>
Quoted 30 lines
--- board/samsung/smdk5250/smdk5250.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)board/samsung/smdk5250/smdk5250.c +10
-2@@ -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
PATCH 1/1 SMDK5250: FDT: Retrieve board model via DT
In reply to Rajeshwari ShindeQuoted 21 lines · Rajeshwari Shinde
Print out the board model by parsing the device tree file.
Signed-off-by Rajeshwari Shinde <[email protected]>--- board/samsung/smdk5250/smdk5250.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)board/samsung/smdk5250/smdk5250.c +3
-1@@ -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 );
board/samsung/smdk5250/smdk5250.c int board_eth_init(bd_t *bis) · line 352
Quoted 10 lines
board/samsung/smdk5250/smdk5250.c +7
-0+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.