forked from OERV-BSP/u-boot
dm: Use dev_get_addr() where possible
This is a convenient way for a driver to get the hardware address of a device, when regmap or syscon are not being used. Change existing callers to use it as an example to others. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
This commit is contained in:
@@ -133,8 +133,7 @@ static int arc_serial_ofdata_to_platdata(struct udevice *dev)
|
||||
struct arc_serial_platdata *plat = dev_get_platdata(dev);
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
plat->reg = (struct arc_serial_regs *)fdtdec_get_addr(gd->fdt_blob,
|
||||
dev->of_offset, "reg");
|
||||
plat->reg = (struct arc_serial_regs *)dev_get_addr(dev);
|
||||
plat->uartclk = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
|
||||
"clock-frequency", 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user