misc: qcom-geni: add DM_FLAG_PRE_RELOC to geni-se-qup driver
Subsystems (2)
PATCH 1/1 misc: qcom-geni: add DM_FLAG_PRE_RELOC to geni-se-qup driver
The GENI SE QUP wrapper driver (geni-se-qup) needs to be bound during pre-relocation to allow its child devices (such as the debug UART) to be discovered and probed before relocation.
Without DM_FLAG_PRE_RELOC, the qupv3 device is skipped during the pre-relocation DM scan, which prevents early serial devices from being bound. This causes serial_find_console_or_panic() to fail with "No serial driver found" during serial_init().
Add DM_FLAG_PRE_RELOC to the geni_se_qup driver so that the GENI SE QUP wrapper and its children are bound during pre-relocation, enabling the serial console to be initialized correctly.
--- drivers/misc/qcom_geni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/qcom_geni.c +1 -1
@@ -576,5 +576,5 @@ U_BOOT_DRIVER(geni_se_qup) = { .of_match = geni_ids, .of_to_plat = geni_se_of_to_plat, .plat_auto = sizeof(struct geni_se_plat), - .flags = DM_FLAG_DEFAULT_PD_CTRL_OFF, + .flags = DM_FLAG_PRE_RELOC | DM_FLAG_DEFAULT_PD_CTRL_OFF, };
Signature · 1 line
2.34.1
Hi Gurumoorthy,
Quoted 31 lines · Gurumoorthy Santhakumar
The GENI SE QUP wrapper driver (geni-se-qup) needs to be bound during pre-relocation to allow its child devices (such as the debug UART) to be discovered and probed before relocation.
Without
DM_FLAG_PRE_RELOC, the qupv3 device is skipped during the pre-relocation DM scan, which prevents early serial devices from being bound. This causesserial_find_console_or_panic()to fail with "No serial driver found" duringserial_init().Add
DM_FLAG_PRE_RELOCto thegeni_se_qupdriver so that the GENI SE QUP wrapper and its children are bound during pre-relocation, enabling the serial console to be initialized correctly.Signed-off-by Gurumoorthy Santhakumar <[email protected]>--- drivers/misc/qcom_geni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/qcom_geni.c +1
-2@@ -576,5 +576,5 @@ U_BOOT_DRIVER(geni_se_qup) = { .of_match = geni_ids, .of_to_plat = geni_se_of_to_plat, .plat_auto = sizeof(struct geni_se_plat), - .flags = DM_FLAG_DEFAULT_PD_CTRL_OFF, + .flags = DM_FLAG_PRE_RELOC | DM_FLAG_DEFAULT_PD_CTRL_OFF, }; --
Quoted 2 lines
2.34.1
Should this use a bootph tag?
Regards,
Simon
Quoted 4 lines · Gurumoorthy Santhakumar
The GENI SE QUP wrapper driver (geni-se-qup) needs to be bound during pre-relocation to allow its child devices (such as the debug UART) to be discovered and probed before relocation.
Quoted 8 lines
Without
DM_FLAG_PRE_RELOC, the qupv3 device is skipped during the pre-relocation DM scan, which prevents early serial devices from being bound. This causesserial_find_console_or_panic()to fail with "No serial driver found" duringserial_init().Add
DM_FLAG_PRE_RELOCto thegeni_se_qupdriver so that the GENI SE QUP wrapper and its children are bound during pre-relocation, enabling the serial console to be initialized correctly.
This is a non-issue if you correctly set /chosen/stdout-path in your DTB. I'd rather minimise the devices we probe pre-reloc and skip this whole dance which we will do once we get
https://lore.kernel.org/u-boot/[email protected]/
Kind regards,
Quoted 17 lines
Signed-off-by Gurumoorthy Santhakumar <[email protected]>--- drivers/misc/qcom_geni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/qcom_geni.c +1
-1@@ -576,5 +576,5 @@ U_BOOT_DRIVER(geni_se_qup) = { .of_match = geni_ids, .of_to_plat = geni_se_of_to_plat, .plat_auto = sizeof(struct geni_se_plat), - .flags = DM_FLAG_DEFAULT_PD_CTRL_OFF, + .flags = DM_FLAG_PRE_RELOC | DM_FLAG_DEFAULT_PD_CTRL_OFF, };
Signature · 1 line
// Casey (she/her)
Hi Casey,
Thanks for the feedback, please find my reply below,
Quoted 11 lines · Casey Connolly
Quoted 9 lines · Gurumoorthy Santhakumar
The GENI SE QUP wrapper driver (geni-se-qup) needs to be bound during pre-relocation to allow its child devices (such as the debug UART) to be discovered and probed before relocation.
Without
DM_FLAG_PRE_RELOC, the qupv3 device is skipped during the pre-relocation DM scan, which prevents early serial devices from being bound. This causesserial_find_console_or_panic()to fail with "No serial driver found" duringserial_init().
Quoted 7 lines
Quoted 3 lines
Add
DM_FLAG_PRE_RELOCto thegeni_se_qupdriver so that the GENI SE QUP wrapper and its children are bound during pre-relocation, enabling the serial console to be initialized correctly.This is a non-issue if you correctly set /chosen/stdout-path in your DTB. I'd rather minimise the devices we probe pre-reloc and skip this whole dance which we will do once we get
https://lore.kernel.org/u-boot/[email protected]/
I've addressed in v2 patch
Quoted 19 lines
Kind regards,
Quoted 16 lines
Signed-off-by Gurumoorthy Santhakumar <[email protected]>--- drivers/misc/qcom_geni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/qcom_geni.c +1
-1@@ -576,5 +576,5 @@ U_BOOT_DRIVER(geni_se_qup) = { .of_match = geni_ids, .of_to_plat = geni_se_of_to_plat, .plat_auto = sizeof(struct geni_se_plat), - .flags = DM_FLAG_DEFAULT_PD_CTRL_OFF, + .flags = DM_FLAG_PRE_RELOC | DM_FLAG_DEFAULT_PD_CTRL_OFF, };