From ea08eeccae9297f7aabd2ef7f0c2517ac4549acc Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Tue, 20 Feb 2024 01:18:26 +0000
Subject: [PATCH] write in 30M
---
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