]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
rng: rproc_rng200: Use dev_remap_addr()
authorPeng Fan <peng.fan@nxp.com>
Tue, 26 May 2026 07:52:18 +0000 (15:52 +0800)
committerTom Rini <trini@konsulko.com>
Tue, 9 Jun 2026 20:53:34 +0000 (14:53 -0600)
Use dev_remap_addr() which supports both live device tree and flat DT
backends, avoiding direct dependency on devfdt_* helpers.

And only mapping sizeof(void *) is wrong, RNG_FIFO_COUNT_OFFSET(0x24) is
accessed in this driver. So dev_remap_addr() could also fix the mapping
size.

No functional changes.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/rng/iproc_rng200.c

index 4c49aa9e4446278f571ae5127f11d244448b2edb..aa211df28cd85bfe7eac1e07f7e67ac3794a8829 100644 (file)
@@ -155,7 +155,7 @@ static int iproc_rng200_of_to_plat(struct udevice *dev)
 {
        struct iproc_rng200_plat *pdata = dev_get_plat(dev);
 
-       pdata->base = devfdt_map_physmem(dev, sizeof(void *));
+       pdata->base = dev_remap_addr(dev);
        if (!pdata->base)
                return -ENODEV;