From: Tom Rini Date: Wed, 24 Jan 2018 16:28:44 +0000 (-0500) Subject: Merge git://git.denx.de/u-boot-mmc X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=fb4413295c765aa8c013650984dc2d908964c81d;p=u-boot.git Merge git://git.denx.de/u-boot-mmc --- fb4413295c765aa8c013650984dc2d908964c81d diff --cc include/dm/read.h index 2551e5f0dc,5cacec8000..f1f0dfd4a3 --- a/include/dm/read.h +++ b/include/dm/read.h @@@ -410,20 -420,14 +420,26 @@@ int dev_read_resource(struct udevice *d int dev_read_resource_byname(struct udevice *dev, const char *name, struct resource *res); +/** + * dev_translate_address() - Tranlate a device-tree address + * + * Translate an address from the device-tree into a CPU physical address. This + * function walks up the tree and applies the various bus mappings along the + * way. + * + * @dev: device giving the context in which to translate the address + * @in_addr: pointer to the address to translate + * @return the translated address; OF_BAD_ADDR on error + */ +u64 dev_translate_address(struct udevice *dev, const fdt32_t *in_addr); #else /* CONFIG_DM_DEV_READ_INLINE is enabled */ + static inline int dev_read_u32(struct udevice *dev, + const char *propname, u32 *outp) + { + return ofnode_read_u32(dev_ofnode(dev), propname, outp); + } + static inline int dev_read_u32_default(struct udevice *dev, const char *propname, int def) {