From: Peng Fan <[email protected]>

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 <[email protected]>
---
 drivers/rng/iproc_rng200.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rng/iproc_rng200.c b/drivers/rng/iproc_rng200.c
index 4c49aa9e444..aa211df28cd 100644
--- a/drivers/rng/iproc_rng200.c
+++ b/drivers/rng/iproc_rng200.c
@@ -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;
 
-- 
2.51.0

Reply via email to