* [PATCH] rtc: pl031: Check for FDT_ADDR_T_NONE in pl031_of_to_plat()
@ 2026-12-03 2:20 Dan Holmes-Mitra
0 siblings, 0 replies; only message in thread
From: Dan Holmes-Mitra @ 2026-12-03 2:20 UTC (permalink / raw)
To: u-boot; +Cc: Tom Rini
pl031_of_to_plat() ignored a missing or untranslatable reg property from
dev_read_addr(), leaving pdata->base set to FDT_ADDR_T_NONE and faulting
on the first register access during probe. Return -EINVAL when no valid
base address is present.
Signed-off-by: Dan Holmes-Mitra <dholmesm@google.com>
---
Built cleanly with qemu_arm64_defconfig (CONFIG_RTC_PL031=y).
Checked with scripts/checkpatch.pl --strict --u-boot (0 errors, 0 warnings).
drivers/rtc/pl031.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/rtc/pl031.c b/drivers/rtc/pl031.c
index 6f189bc503..2e4f02d4d3 100644
--- a/drivers/rtc/pl031.c
+++ b/drivers/rtc/pl031.c
@@ -126,6 +126,8 @@ static int pl031_of_to_plat(struct udevice *dev)
struct pl031_plat *pdata = dev_get_plat(dev);
pdata->base = dev_read_addr(dev);
+ if (pdata->base == FDT_ADDR_T_NONE)
+ return -EINVAL;
return 0;
}
base-commit: d1caced3a435607435cb7969e34499051a4ac1e6
--
2.56.1.911.g883d8bcb20-goog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-03 5:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 2:20 [PATCH] rtc: pl031: Check for FDT_ADDR_T_NONE in pl031_of_to_plat() Dan Holmes-Mitra
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.