Re: [PATCH v1 2/2] rockchip: spl-boot-order: Improve debugging message when device isn't found

2024-03-04 Thread Quentin Schulz

Hi Christopher,

On 3/2/24 15:50, Christopher Obbard wrote:

[You don't often get email from chris.obb...@collabora.com. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification ]

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 as well as
the 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 @73c (/spi@ff1d/flash@0) to a 
boot-device



Does it actually make sense to print the node "number" here (I have no 
clue what it represents and if it's useful for debugging)? Can't we just 
replace @%x with the node path (conf) directly instead?


Cheers,
Quentin


Re: [PATCH v1 2/2] rockchip: spl-boot-order: Improve debugging message when device isn't found

2024-03-02 Thread Dragan Simic

Hello Christopher,

On 2024-03-02 15:50, 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 as well 
as

the 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 @73c (/spi@ff1d/flash@0)
to a boot-device


I'd suggest that the main part of the patch subject is adjusted
a bit, e.g. to something like "show DT path for missing device".

Otherwise, looking good to me.

Reviewed-by: Dragan Simic 


Signed-off-by: Christopher Obbard 
---

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

diff --git a/arch/arm/mach-rockchip/spl-boot-order.c
b/arch/arm/mach-rockchip/spl-boot-order.c
index e548a7dc718..b23666fb017 100644
--- a/arch/arm/mach-rockchip/spl-boot-order.c
+++ b/arch/arm/mach-rockchip/spl-boot-order.c
@@ -151,8 +151,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 @%x (%s) to a 
boot-device\n",
+ __func__, node, conf);
continue;
}


[PATCH v1 2/2] rockchip: spl-boot-order: Improve debugging message when device isn't found

2024-03-02 Thread Christopher Obbard
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 as well as
the 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 @73c (/spi@ff1d/flash@0) to a 
boot-device

Signed-off-by: Christopher Obbard 
---

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

diff --git a/arch/arm/mach-rockchip/spl-boot-order.c 
b/arch/arm/mach-rockchip/spl-boot-order.c
index e548a7dc718..b23666fb017 100644
--- a/arch/arm/mach-rockchip/spl-boot-order.c
+++ b/arch/arm/mach-rockchip/spl-boot-order.c
@@ -151,8 +151,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 @%x (%s) to a 
boot-device\n",
+ __func__, node, conf);
continue;
}
 
-- 
2.43.0