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:
@@ -364,7 +364,7 @@ int ns16550_serial_ofdata_to_platdata(struct udevice *dev)
|
||||
fdt_addr_t addr;
|
||||
|
||||
/* try Processor Local Bus device first */
|
||||
addr = fdtdec_get_addr(gd->fdt_blob, dev->of_offset, "reg");
|
||||
addr = dev_get_addr(dev);
|
||||
#ifdef CONFIG_PCI
|
||||
if (addr == FDT_ADDR_T_NONE) {
|
||||
/* then try pci device */
|
||||
|
||||
Reference in New Issue
Block a user