mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
net: dc2114x: Use dev_remap_addr()
Use dev_remap_addr() to simplify code. dev_remap_addr() does same thing as dev_read_addr() + map_physmem(). And it supports both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers. No functional changes. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
committed by
Jerome Forissier
parent
0e2ba59bc5
commit
23532fcb7d
@@ -653,7 +653,7 @@ static int dc2114x_of_to_plat(struct udevice *dev)
|
||||
struct eth_pdata *plat = dev_get_plat(dev);
|
||||
struct dc2114x_priv *priv = dev_get_priv(dev);
|
||||
|
||||
plat->iobase = (phys_addr_t)map_physmem((phys_addr_t)devfdt_get_addr(dev), 0, MAP_NOCACHE);
|
||||
plat->iobase = (phys_addr_t)dev_remap_addr(dev);
|
||||
priv->iobase = (void *)plat->iobase;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user