Skip to content

Commit 8c8ff39

Browse files
glneonmenon
authored andcommitted
firmware: ti_sci: Unconditionally register reset handler
There was once a limitation that there could only be one system reset handler. Due to that we only would register this handler when a non-standard device tree property was found, else we left the default handler in place (usually PSCI). Now that we can have multiple handlers, and TI-SCI reset is always available in the firmware, register this handler unconditionally. This priority is left at the default so higher priority handlers (like PSCI) are still attempted first. Signed-off-by: Andrew Davis <[email protected]> Reviewed-by: Markus Schneider-Pargmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Nishanth Menon <[email protected]>
1 parent c0e5a43 commit 8c8ff39

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

drivers/firmware/ti_sci.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3299,7 +3299,6 @@ static int ti_sci_probe(struct platform_device *pdev)
32993299
struct mbox_client *cl;
33003300
int ret = -EINVAL;
33013301
int i;
3302-
int reboot = 0;
33033302
u32 h_id;
33043303

33053304
desc = device_get_match_data(dev);
@@ -3323,8 +3322,6 @@ static int ti_sci_probe(struct platform_device *pdev)
33233322
}
33243323
}
33253324

3326-
reboot = of_property_read_bool(dev->of_node,
3327-
"ti,system-reboot-controller");
33283325
INIT_LIST_HEAD(&info->node);
33293326
minfo = &info->minfo;
33303327

@@ -3395,14 +3392,10 @@ static int ti_sci_probe(struct platform_device *pdev)
33953392

33963393
ti_sci_setup_ops(info);
33973394

3398-
if (reboot) {
3399-
ret = devm_register_restart_handler(dev,
3400-
tisci_reboot_handler,
3401-
info);
3402-
if (ret) {
3403-
dev_err(dev, "reboot registration fail(%d)\n", ret);
3404-
goto out;
3405-
}
3395+
ret = devm_register_restart_handler(dev, tisci_reboot_handler, info);
3396+
if (ret) {
3397+
dev_err(dev, "reboot registration fail(%d)\n", ret);
3398+
goto out;
34063399
}
34073400

34083401
dev_info(dev, "ABI: %d.%d (firmware rev 0x%04x '%s')\n",

0 commit comments

Comments
 (0)