diff options
| author | Jamie Gibbons <[email protected]> | 2026-05-18 15:17:09 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-06-08 15:38:25 -0600 |
| commit | a05adbb9b30115ef7d04668d35650f311458dd2d (patch) | |
| tree | 58fc860def5e8852a0a4abfbc1b5672472b12502 /drivers | |
| parent | 1296a428c67cf103eca482d4a63349661c1b799f (diff) | |
mailbox: mpfs-mbox: fix MMIO mapping calculation
Correct the MMIO mapping size calculation, which
previously relied on an invalid start/end subtraction.
This change corrects a functional bug and cleans up the driver without
altering its behavior.
Fixes: 111e9bf6a5ac ("mailbox: add PolarFire SoC mailbox driver")
Signed-off-by: Jamie Gibbons <[email protected]>
Reviewed-by: Conor Dooley <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/mailbox/mpfs-mbox.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mailbox/mpfs-mbox.c b/drivers/mailbox/mpfs-mbox.c index 55238847ecd..4a9465c7a72 100644 --- a/drivers/mailbox/mpfs-mbox.c +++ b/drivers/mailbox/mpfs-mbox.c @@ -145,7 +145,7 @@ static int mpfs_mbox_probe(struct udevice *dev) return ret; }; - mbox->ctrl_base = devm_ioremap(dev, regs.start, regs.start - regs.end); + mbox->ctrl_base = devm_ioremap(dev, res.start, resource_size(&res)); ret = ofnode_read_resource(node, 2, ®s); if (ret) { @@ -153,7 +153,7 @@ static int mpfs_mbox_probe(struct udevice *dev) return ret; }; - mbox->mbox_base = devm_ioremap(dev, regs.start, regs.start - regs.end); + mbox->mbox_base = devm_ioremap(dev, res.start, resource_size(&res)); mbox->dev = dev; dev_set_priv(dev, mbox); |
