.. | .. |
---|
271 | 271 | int dev_read_addr_cells(struct udevice *dev); |
---|
272 | 272 | |
---|
273 | 273 | /** |
---|
| 274 | + * dev_remap_addr_index() - Get the indexed reg property of a device |
---|
| 275 | + * as a memory-mapped I/O pointer |
---|
| 276 | + * |
---|
| 277 | + * @dev: Device to read from |
---|
| 278 | + * @index: the 'reg' property can hold a list of <addr, size> pairs |
---|
| 279 | + * and @index is used to select which one is required |
---|
| 280 | + * |
---|
| 281 | + * Return: pointer or NULL if not found |
---|
| 282 | + */ |
---|
| 283 | +void *dev_remap_addr_index(struct udevice *dev, int index); |
---|
| 284 | + |
---|
| 285 | +/** |
---|
274 | 286 | * dev_read_size_cells() - Get the number of size cells for a device's node |
---|
275 | 287 | * |
---|
276 | 288 | * This walks back up the tree to find the closest #size-cells property |
---|
.. | .. |
---|
588 | 600 | return fdt_address_cells(gd->fdt_blob, dev_of_offset(dev)); |
---|
589 | 601 | } |
---|
590 | 602 | |
---|
| 603 | +static inline void *dev_remap_addr_index(struct udevice *dev, int index) |
---|
| 604 | +{ |
---|
| 605 | + return devfdt_remap_addr_index(dev, index); |
---|
| 606 | +} |
---|
| 607 | + |
---|
591 | 608 | static inline int dev_read_size_cells(struct udevice *dev) |
---|
592 | 609 | { |
---|
593 | 610 | /* NOTE: this call should walk up the parent stack */ |
---|