mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user