diff mbox

[U-Boot] spl: fit: Fix non-matching DT names console output

Message ID 1464980704-26304-1-git-send-email-dannenberg@ti.com
State Accepted
Commit 8aa57a95a2efc8174c5482f9b3abc4920b479ff2
Delegated to: Tom Rini
Headers show

Commit Message

Andreas Dannenberg June 3, 2016, 7:05 p.m. UTC
When no DTB can be matched successfully to the board that's being used
a list of available FIT-embedded DTBs will be output to the console for
diagnostic purposes. But rather than the contents of the "description"
FDT property a non-existent property was accessed and as a result "NULL"
was output instead of the actual name(s) of the DTB(s). Fix this issue
by using the correct property which is also the exact same property
that's used earlier during the actual board matching process.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
---
 common/spl/spl_fit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lokesh Vutla June 5, 2016, 3:33 a.m. UTC | #1
On 6/4/2016 12:35 AM, Andreas Dannenberg wrote:
> When no DTB can be matched successfully to the board that's being used
> a list of available FIT-embedded DTBs will be output to the console for
> diagnostic purposes. But rather than the contents of the "description"
> FDT property a non-existent property was accessed and as a result "NULL"
> was output instead of the actual name(s) of the DTB(s). Fix this issue
> by using the correct property which is also the exact same property
> that's used earlier during the actual board matching process.

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

Thanks and regards,
Lokesh

>
> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
> ---
>   common/spl/spl_fit.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
> index c9eb020..9874708 100644
> --- a/common/spl/spl_fit.c
> +++ b/common/spl/spl_fit.c
> @@ -77,7 +77,7 @@ static int spl_fit_select_fdt(const void *fdt, int images, int *fdt_offsetp)
>   	for (node = fdt_first_subnode(fdt, conf);
>   	     node >= 0;
>   	     node = fdt_next_subnode(fdt, node)) {
> -		name = fdt_getprop(fdt, node, "name", &len);
> +		name = fdt_getprop(fdt, node, "description", &len);
>   		printf("   %s\n", name);
>   	}
>   #endif
>
Tom Rini June 6, 2016, 11:16 a.m. UTC | #2
On Fri, Jun 03, 2016 at 02:05:04PM -0500, Andreas Dannenberg wrote:

> When no DTB can be matched successfully to the board that's being used
> a list of available FIT-embedded DTBs will be output to the console for
> diagnostic purposes. But rather than the contents of the "description"
> FDT property a non-existent property was accessed and as a result "NULL"
> was output instead of the actual name(s) of the DTB(s). Fix this issue
> by using the correct property which is also the exact same property
> that's used earlier during the actual board matching process.
> 
> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini June 6, 2016, 11:16 a.m. UTC | #3
On Fri, Jun 03, 2016 at 02:05:04PM -0500, Andreas Dannenberg wrote:

> When no DTB can be matched successfully to the board that's being used
> a list of available FIT-embedded DTBs will be output to the console for
> diagnostic purposes. But rather than the contents of the "description"
> FDT property a non-existent property was accessed and as a result "NULL"
> was output instead of the actual name(s) of the DTB(s). Fix this issue
> by using the correct property which is also the exact same property
> that's used earlier during the actual board matching process.
> 
> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>

Applied to u-boot/master, thanks!
Simon Glass June 10, 2016, 12:35 a.m. UTC | #4
On 3 June 2016 at 13:05, Andreas Dannenberg <dannenberg@ti.com> wrote:
> When no DTB can be matched successfully to the board that's being used
> a list of available FIT-embedded DTBs will be output to the console for
> diagnostic purposes. But rather than the contents of the "description"
> FDT property a non-existent property was accessed and as a result "NULL"
> was output instead of the actual name(s) of the DTB(s). Fix this issue
> by using the correct property which is also the exact same property
> that's used earlier during the actual board matching process.
>
> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
> ---
>  common/spl/spl_fit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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

Patch

diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index c9eb020..9874708 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -77,7 +77,7 @@  static int spl_fit_select_fdt(const void *fdt, int images, int *fdt_offsetp)
 	for (node = fdt_first_subnode(fdt, conf);
 	     node >= 0;
 	     node = fdt_next_subnode(fdt, node)) {
-		name = fdt_getprop(fdt, node, "name", &len);
+		name = fdt_getprop(fdt, node, "description", &len);
 		printf("   %s\n", name);
 	}
 #endif