All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] firmware: PSCI: Fix PSCI support for OF live trees
@ 2020-06-18 11:54 Jon Hunter
  2020-06-18 11:54 ` [PATCH 2/2] ARM: tegra: Enable PSCI support for Tegra210 and Tegra186 Jon Hunter
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jon Hunter @ 2020-06-18 11:54 UTC (permalink / raw)
  To: u-boot

When CONFIG_OF_LIVE is enabled, dev_of_offset() cannot be used and
if used returns an invalid offset. This causes the call to
fdt_stringlist_get() in the psci_probe() to fail to read the 'method'
property from the PSCI node for the device and hence prevents PSCI
from working. Fix this by using the ofnode_read_string() API instead
of the fdt_stringlist_get() because this will handle reading the
property both when CONFIG_OF_LIVE is enabled or disabled.

Due to the above problem and since commit 81ea00838c68 ("efi_loader:
PSCI reset and shutdown") was added, the EFI system reset has been
broken for Tegra210 and Tegra196 platforms. This also fixes the EFI
system reset for these Tegra platforms.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/firmware/psci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index e0d66d74f54d..23cf807591c4 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -67,11 +67,9 @@ static int psci_bind(struct udevice *dev)
 
 static int psci_probe(struct udevice *dev)
 {
-	DECLARE_GLOBAL_DATA_PTR;
 	const char *method;
 
-	method = fdt_stringlist_get(gd->fdt_blob, dev_of_offset(dev), "method",
-				    0, NULL);
+	method = ofnode_read_string(dev_ofnode(dev), "method");
 	if (!method) {
 		pr_warn("missing \"method\" property\n");
 		return -ENXIO;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-06-22 19:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 11:54 [PATCH 1/2] firmware: PSCI: Fix PSCI support for OF live trees Jon Hunter
2020-06-18 11:54 ` [PATCH 2/2] ARM: tegra: Enable PSCI support for Tegra210 and Tegra186 Jon Hunter
2020-06-18 15:44   ` Peter Robinson
2020-06-22 19:04   ` Stephen Warren
2020-06-18 15:44 ` [PATCH 1/2] firmware: PSCI: Fix PSCI support for OF live trees Peter Robinson
2020-06-18 15:47 ` Jon Hunter
2020-06-18 16:19   ` Tom Warren
2020-06-18 16:27     ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.