firmware: ti_sci: Add Initialization of dev_info head node
PATCH v2 1/1 firmware: ti_sci: Add Initialization of dev_info head node
On K3 devices two drivers ti_sci and ti_sci_dm are supporting firmware functions. At run time one of driver is used.
Driver ti_sci already initializing head for dev_list in its probe function, but it was missed in ti_sci_dm driver.
So add head list init support for ti_sci_dm driver. While at this, move init of list before usages in both functions.
---
Changes in v2:
1) moved init of list before adding node
2) collected R/B of v1
Link to v1 https://lore.kernel.org/all/[email protected]/
drivers/firmware/ti_sci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/firmware/ti_sci.c +4 -2
@@ -2845,11 +2845,11 @@ static int ti_sci_probe(struct udevice *dev) info->dev = dev; info->seq =0xA ; +INIT_LIST_HEAD (&info->dev_list); +list_add_tail (&info->list, &ti_sci_list);ti_sci_setup_ops (info); -INIT_LIST_HEAD (&info->dev_list); -if (IS_ENABLED (CONFIG_SYSRESET_TI_SCI )) { ret =device_bind_driver (dev,"ti-sci-sysreset" ,"sysreset" ,NULL );if (ret)
@@ -2889,6 +2889,8 @@ static __maybe_unused int ti_sci_dm_probe(struct udevice *dev) info->dev = dev; info->seq =0xA ; +INIT_LIST_HEAD (&info->dev_list); +list_add_tail (&info->list, &ti_sci_list); ops = &info->handle.ops;
Signature · 1 line
2.34.1
Quoted 6 lines · Udit Kumar
On K3 devices two drivers
ti_sciandti_sci_dmare supporting firmware functions. At run time one of driver is used.Driver
ti_scialready initializing head fordev_listin its probe function, but it was missed inti_sci_dmdriver.
Quoted 6 lines
So add head list init support for
ti_sci_dmdriver. While at this, move init of list before usages in both functions.Fixes 5d5a699855a7("firmware: ti_sci: Add support for Resoure Management at R5 SPL stage")Reviewed-by Neha Malcom Francis <[email protected]>Signed-off-by Udit Kumar <[email protected]>
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Quoted 10 lines · Udit Kumar
On K3 devices two drivers
ti_sciandti_sci_dmare supporting firmware functions. At run time one of driver is used.Driver
ti_scialready initializing head fordev_listin its probe function, but it was missed inti_sci_dmdriver.So add head list init support for
ti_sci_dmdriver. While at this, move init of list before usages in both functions.[...]
Applied to u-boot/master, thanks!
[1/1] firmware: ti_sci: Add Initialization of dev_info head node
commit: 1c26f91a224b7ce222314b38c068acd1833599f4
Signature · 1 line
Tom