rng: rproc_rng200: Use dev_remap_addr()
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user