diff options
author | Tom Rini <trini@konsulko.com> | 2019-10-08 18:45:26 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-10-08 18:45:26 -0400 |
commit | efea5a34bb5be542630ce7161bd3b9cc26a0bcf3 (patch) | |
tree | fb747d83d81f9c3400a561782114e4c6ecd61a07 /include/dm/read.h | |
parent | 9d536fe8ae7672bdee091f9100389b6f3e53cfc6 (diff) | |
parent | cc2d27dcdc3e1c76d09d54015e3992380bd7e0fa (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
- Rename existing FSP code to fsp1
- Add fsp2 directory in preparation to support FSP 2.0
- Various x86 platform codes update
- Various bug fixes and updates in dm core, sandbox and spl
Diffstat (limited to 'include/dm/read.h')
-rw-r--r-- | include/dm/read.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/dm/read.h b/include/dm/read.h index 803daf7620..d37fcb504d 100644 --- a/include/dm/read.h +++ b/include/dm/read.h @@ -249,6 +249,26 @@ fdt_addr_t dev_read_addr(struct udevice *dev); void *dev_read_addr_ptr(struct udevice *dev); /** + * dev_read_addr_pci() - Read an address and handle PCI address translation + * + * At present U-Boot does not have address translation logic for PCI in the + * livetree implementation (of_addr.c). This special function supports this for + * the flat tree implementation. + * + * This function should be removed (and code should use dev_read() instead) + * once: + * + * 1. PCI address translation is added; and either + * 2. everything uses livetree where PCI translation is used (which is feasible + * in SPL and U-Boot proper) or PCI address translation is added to + * fdtdec_get_addr() and friends. + * + * @dev: Device to read from + * @return address or FDT_ADDR_T_NONE if not found + */ +fdt_addr_t dev_read_addr_pci(struct udevice *dev); + +/** * dev_remap_addr() - Get the reg property of a device as a * memory-mapped I/O pointer * @@ -691,6 +711,11 @@ static inline void *dev_read_addr_ptr(struct udevice *dev) return devfdt_get_addr_ptr(dev); } +static inline fdt_addr_t dev_read_addr_pci(struct udevice *dev) +{ + return devfdt_get_addr_pci(dev); +} + static inline void *dev_remap_addr(struct udevice *dev) { return devfdt_remap_addr(dev); |