diff options
| author | Tom Rini <[email protected]> | 2026-02-26 08:49:15 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-02-26 09:04:47 -0600 |
| commit | e2dfabcab02dd11942a23d43397b4b55a79b6c78 (patch) | |
| tree | 1e60d2c76c421bee801b39a826ecf4bce15005a6 | |
| parent | 7995bf8dea2d5b3eb7fcb836636f4773924ec35d (diff) | |
| parent | efc9be77d851b98b38afcfb4e46d17703057efad (diff) | |
Merge tag 'fsl-qoriq-next-2026-02-25' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq
For SCMI, Power Domain and IOMMU, validate device tree node before
continuing, to avoid boot failure.
| -rw-r--r-- | drivers/firmware/scmi/mailbox_agent.c | 2 | ||||
| -rw-r--r-- | drivers/firmware/scmi/optee_agent.c | 3 | ||||
| -rw-r--r-- | drivers/iommu/iommu-uclass.c | 3 | ||||
| -rw-r--r-- | drivers/power/domain/power-domain-uclass.c | 3 |
4 files changed, 9 insertions, 2 deletions
diff --git a/drivers/firmware/scmi/mailbox_agent.c b/drivers/firmware/scmi/mailbox_agent.c index 16a82f55ab7..cda94565de5 100644 --- a/drivers/firmware/scmi/mailbox_agent.c +++ b/drivers/firmware/scmi/mailbox_agent.c @@ -101,7 +101,7 @@ static int scmi_mbox_get_channel(struct udevice *dev, struct scmi_mbox_channel *chan; int ret; - if (!dev_read_prop(protocol, "shmem", NULL)) { + if (!dev_has_ofnode(protocol) || !dev_read_prop(protocol, "shmem", NULL)) { /* Uses agent base channel */ *channel = container_of(base_chan, struct scmi_channel, ref); diff --git a/drivers/firmware/scmi/optee_agent.c b/drivers/firmware/scmi/optee_agent.c index 631625d715b..7170bd1e682 100644 --- a/drivers/firmware/scmi/optee_agent.c +++ b/drivers/firmware/scmi/optee_agent.c @@ -331,7 +331,8 @@ static int scmi_optee_get_channel(struct udevice *dev, u32 channel_id; int ret; - if (dev_read_u32(protocol, "linaro,optee-channel-id", &channel_id)) { + if (!dev_has_ofnode(protocol) || + dev_read_u32(protocol, "linaro,optee-channel-id", &channel_id)) { /* Uses agent base channel */ *channel = container_of(base_chan, struct scmi_channel, ref); diff --git a/drivers/iommu/iommu-uclass.c b/drivers/iommu/iommu-uclass.c index bb31cd519d2..31b40e5713a 100644 --- a/drivers/iommu/iommu-uclass.c +++ b/drivers/iommu/iommu-uclass.c @@ -79,6 +79,9 @@ int dev_iommu_enable(struct udevice *dev) const struct iommu_ops *ops; int i, count, ret = 0; + if (!dev_has_ofnode(dev)) + return 0; + count = dev_count_phandle_with_args(dev, "iommus", "#iommu-cells", 0); for (i = 0; i < count; i++) { diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c index d9fa8ad4bd2..cea68945cbd 100644 --- a/drivers/power/domain/power-domain-uclass.c +++ b/drivers/power/domain/power-domain-uclass.c @@ -180,6 +180,9 @@ static int dev_power_domain_ctrl(struct udevice *dev, bool on) struct power_domain pd; int i, count, ret = 0; + if (!dev_has_ofnode(dev)) + return 0; + count = dev_count_phandle_with_args(dev, "power-domains", "#power-domain-cells", 0); for (i = 0; i < count; i++) { |
