diff mbox series

[v2,2/2] rockchip: spl-boot-order: show DT path for missing device

Message ID 20240314115801.241575-3-chris.obbard@collabora.com
State Accepted
Delegated to: Kever Yang
Headers show
Series Trivial fixes for Rockchip SPL boot order | expand

Commit Message

Christopher Obbard March 14, 2024, 11:57 a.m. UTC
When debugging the SPL boot order, the node ID of a device which hasn't
been found is printed but it can be quite hard to relate that to the
specific devicetree node. To aid debugging, print the node path instead of
the cryptic node ID.

Original debug message:

    board_boot_order: could not map node @73c to a boot-device

With this patch applied this becomes e.g:

   board_boot_order: could not map node /spi@ff1d0000/flash@0 to a boot-device

Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
---

Changes in v2:
- Improve patch subject (suggested by Dragan S).
- Print node path instead of node ID (suggested by Quentin S).
- Collect Reviewed-by tag from Dragan S.

 arch/arm/mach-rockchip/spl-boot-order.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Philipp Tomsich March 14, 2024, 12:32 p.m. UTC | #1
On Thu, 14 Mar 2024 at 12:58, Christopher Obbard
<chris.obbard@collabora.com> wrote:
>
> When debugging the SPL boot order, the node ID of a device which hasn't
> been found is printed but it can be quite hard to relate that to the
> specific devicetree node. To aid debugging, print the node path instead of
> the cryptic node ID.
>
> Original debug message:
>
>     board_boot_order: could not map node @73c to a boot-device
>
> With this patch applied this becomes e.g:
>
>    board_boot_order: could not map node /spi@ff1d0000/flash@0 to a boot-device
>
> Reviewed-by: Dragan Simic <dsimic@manjaro.org>
> Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>

Reviewed-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
Quentin Schulz March 14, 2024, 1:49 p.m. UTC | #2
Hi Christopher,

On 3/14/24 12:57, Christopher Obbard wrote:
> When debugging the SPL boot order, the node ID of a device which hasn't
> been found is printed but it can be quite hard to relate that to the
> specific devicetree node. To aid debugging, print the node path instead of
> the cryptic node ID.
> 
> Original debug message:
> 
>      board_boot_order: could not map node @73c to a boot-device
> 
> With this patch applied this becomes e.g:
> 
>     board_boot_order: could not map node /spi@ff1d0000/flash@0 to a boot-device
> 
> Reviewed-by: Dragan Simic <dsimic@manjaro.org>
> Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>

Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>

Thanks,
Quentin
diff mbox series

Patch

diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c
index 8f479ac0ec0..3543267aa57 100644
--- a/arch/arm/mach-rockchip/spl-boot-order.c
+++ b/arch/arm/mach-rockchip/spl-boot-order.c
@@ -148,8 +148,8 @@  void board_boot_order(u32 *spl_boot_list)
 		/* Try to map this back onto SPL boot devices */
 		boot_device = spl_node_to_boot_device(node);
 		if (boot_device < 0) {
-			debug("%s: could not map node @%x to a boot-device\n",
-			      __func__, node);
+			debug("%s: could not map node %s to a boot-device\n",
+			      __func__, conf);
 			continue;
 		}