mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-14 07:13:28 +08:00
net: tsec: Use map_physmem() directly instead of dev_remap_addr()
dev_remap_addr() eventually calls dev_read_addr_index(), while pdata->iobase holds the return value of dev_read_addr() that calls dev_read_addr_index() too. Such duplication can be avoided by using map_physmem() directly. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
This commit is contained in:
parent
534c69b09a
commit
408f056e06
@ -833,7 +833,9 @@ int tsec_probe(struct udevice *dev)
|
||||
data = (struct tsec_data *)dev_get_driver_data(dev);
|
||||
|
||||
pdata->iobase = (phys_addr_t)dev_read_addr(dev);
|
||||
priv->regs = dev_remap_addr(dev);
|
||||
if (pdata->iobase == FDT_ADDR_T_NONE)
|
||||
return -ENOENT;
|
||||
priv->regs = map_physmem(pdata->iobase, 0, MAP_NOCACHE);
|
||||
|
||||
ret = dev_read_phandle_with_args(dev, "tbi-handle", NULL, 0, 0,
|
||||
&phandle_args);
|
||||
|
Loading…
Reference in New Issue
Block a user