mirror of
https://xff.cz/git/u-boot/
synced 2025-09-30 15:01:27 +02:00
firmware: PSCI: Fix PSCI support for OF live trees
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 81ea00838c
("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>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
This commit is contained in:
@@ -67,11 +67,9 @@ static int psci_bind(struct udevice *dev)
|
|||||||
|
|
||||||
static int psci_probe(struct udevice *dev)
|
static int psci_probe(struct udevice *dev)
|
||||||
{
|
{
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
|
||||||
const char *method;
|
const char *method;
|
||||||
|
|
||||||
method = fdt_stringlist_get(gd->fdt_blob, dev_of_offset(dev), "method",
|
method = ofnode_read_string(dev_ofnode(dev), "method");
|
||||||
0, NULL);
|
|
||||||
if (!method) {
|
if (!method) {
|
||||||
pr_warn("missing \"method\" property\n");
|
pr_warn("missing \"method\" property\n");
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
Reference in New Issue
Block a user