Skip to contentSkip to conversation

firmware: ti_sci: Add Initialization of dev_info head node

PATCH In review Udit Kumar 3 participants 3 messages Apr 29, 2025 – May 5, 2025 Texas instruments' system control interface (TISCI) protocol driver

lore
Share & tools
lore

Udit Kumar

author
#0 lore raw

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.

Fixes 5d5a699855a7("firmware: ti_sci: Add support for Resoure Management at R5 SPL stage")

---
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
index 54d6689ce78..344df9454b3 100644
@@ -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
maintainer Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Udit Kumar

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.

Quoted 6 lines

So add head list init support for ti_sci_dm driver. 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")
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#2 lore raw
In reply to Udit Kumar
Quoted 10 lines · Udit Kumar

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.

[...]

Applied to u-boot/master, thanks!

[1/1] firmware: ti_sci: Add Initialization of dev_info head node

      commit: 1c26f91a224b7ce222314b38c068acd1833599f4
Signature · 1 line
Tom