From: Andrew Davis <afd@ti.com>
To: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Santosh Shilimkar <ssantosh@kernel.org>,
Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>
Cc: <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, Andrew Davis <afd@ti.com>
Subject: [PATCH 2/4] firmware: ti_sci: Unconditionally register reset handler
Date: Tue, 26 Mar 2024 17:37:28 -0500 [thread overview]
Message-ID: <20240326223730.54639-3-afd@ti.com> (raw)
In-Reply-To: <20240326223730.54639-1-afd@ti.com>
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 <afd@ti.com>
---
drivers/firmware/ti_sci.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 9885e1763591b..160968301b1fb 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -3299,7 +3299,6 @@ static int ti_sci_probe(struct platform_device *pdev)
struct mbox_client *cl;
int ret = -EINVAL;
int i;
- int reboot = 0;
u32 h_id;
desc = device_get_match_data(dev);
@@ -3323,8 +3322,6 @@ static int ti_sci_probe(struct platform_device *pdev)
}
}
- reboot = of_property_read_bool(dev->of_node,
- "ti,system-reboot-controller");
INIT_LIST_HEAD(&info->node);
minfo = &info->minfo;
@@ -3395,14 +3392,10 @@ static int ti_sci_probe(struct platform_device *pdev)
ti_sci_setup_ops(info);
- if (reboot) {
- ret = devm_register_restart_handler(dev,
- tisci_reboot_handler,
- info);
- if (ret) {
- dev_err(dev, "reboot registration fail(%d)\n", ret);
- goto out;
- }
+ ret = devm_register_restart_handler(dev, tisci_reboot_handler, info);
+ if (ret) {
+ dev_err(dev, "reboot registration fail(%d)\n", ret);
+ goto out;
}
dev_info(dev, "ABI: %d.%d (firmware rev 0x%04x '%s')\n",
--
2.39.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-03-26 22:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 22:37 [PATCH 0/4] Unconditionally register TI-SCI reset handler Andrew Davis
2024-03-26 22:37 ` [PATCH 1/4] firmware: ti_sci: Use devm_register_restart_handler() Andrew Davis
2024-04-02 8:14 ` Markus Schneider-Pargmann
2024-03-26 22:37 ` Andrew Davis [this message]
2024-04-02 8:19 ` [PATCH 2/4] firmware: ti_sci: Unconditionally register reset handler Markus Schneider-Pargmann
2024-03-26 22:37 ` [PATCH 3/4] ARM: dts: ti: keystone: k2g: Remove ti,system-reboot-controller property Andrew Davis
2024-03-26 22:37 ` [PATCH 4/4] dt-bindings: arm: keystone: " Andrew Davis
2024-03-27 8:08 ` Krzysztof Kozlowski
2024-04-09 19:53 ` [PATCH 0/4] Unconditionally register TI-SCI reset handler Nishanth Menon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240326223730.54639-3-afd@ti.com \
--to=afd@ti.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nm@ti.com \
--cc=robh+dt@kernel.org \
--cc=ssantosh@kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox