From 9df731a176aab8e03b984b681b1bea01ccff6644 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 06 Nov 2023 07:23:06 +0000 Subject: [PATCH] rk3568 rt uboot init --- u-boot/include/dm/read.h | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/u-boot/include/dm/read.h b/u-boot/include/dm/read.h index 5f3738f..7c1d2f6 100644 --- a/u-boot/include/dm/read.h +++ b/u-boot/include/dm/read.h @@ -271,6 +271,18 @@ int dev_read_addr_cells(struct udevice *dev); /** + * dev_remap_addr_index() - Get the indexed reg property of a device + * as a memory-mapped I/O pointer + * + * @dev: Device to read from + * @index: the 'reg' property can hold a list of <addr, size> pairs + * and @index is used to select which one is required + * + * Return: pointer or NULL if not found + */ +void *dev_remap_addr_index(struct udevice *dev, int index); + +/** * dev_read_size_cells() - Get the number of size cells for a device's node * * This walks back up the tree to find the closest #size-cells property @@ -588,6 +600,11 @@ return fdt_address_cells(gd->fdt_blob, dev_of_offset(dev)); } +static inline void *dev_remap_addr_index(struct udevice *dev, int index) +{ + return devfdt_remap_addr_index(dev, index); +} + static inline int dev_read_size_cells(struct udevice *dev) { /* NOTE: this call should walk up the parent stack */ -- Gitblit v1.6.2