summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2021-06-24 11:11:13 -0400
committerTom Rini <[email protected]>2021-06-24 11:11:13 -0400
commit67edf2553f15e5148efca213af3f41cef3410680 (patch)
treec362fd9dc9446add0e24fd4d843dee32af2f299a /include
parent95eca8612b7ba790dfe5d72ce3269ef3a7cdae84 (diff)
parente41a2bc6b87397ef0aeda4132a8227d164cd592b (diff)
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-spi into next
- SPI NOT OF partitions (Marek BehĂșn) - Macronic SPI NAND (Jaime Liao) - Macronix MX66UW2G345G SPI NOR (zhengxun)
Diffstat (limited to 'include')
-rw-r--r--include/dm/ofnode.h27
-rw-r--r--include/linux/mtd/mtd.h10
-rw-r--r--include/mtd.h1
3 files changed, 37 insertions, 1 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 8a69fd87da7..3da05d8b217 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -459,6 +459,16 @@ ofnode ofnode_get_parent(ofnode node);
const char *ofnode_get_name(ofnode node);
/**
+ * ofnode_get_path() - get the full path of a node
+ *
+ * @node: valid node to look up
+ * @buf: buffer to write the node path into
+ * @buflen: buffer size
+ * @return 0 if OK, -ve on error
+ */
+int ofnode_get_path(ofnode node, char *buf, int buflen);
+
+/**
* ofnode_get_by_phandle() - get ofnode from phandle
*
* @phandle: phandle to look up
@@ -490,6 +500,23 @@ phys_addr_t ofnode_get_addr_size_index(ofnode node, int index,
fdt_size_t *size);
/**
+ * ofnode_get_addr_size_index_notrans() - get an address/size from a node
+ * based on index, without address
+ * translation
+ *
+ * This reads the register address/size from a node based on index.
+ * The resulting address is not translated. Useful for example for on-disk
+ * addresses.
+ *
+ * @node: node to read from
+ * @index: Index of address to read (0 for first)
+ * @size: Pointer to size of the address
+ * @return address, or FDT_ADDR_T_NONE if not present or invalid
+ */
+phys_addr_t ofnode_get_addr_size_index_notrans(ofnode node, int index,
+ fdt_size_t *size);
+
+/**
* ofnode_get_addr_index() - get an address from a node
*
* This reads the register address from a node
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 927854950a0..3b302fb8c31 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -581,6 +581,16 @@ static inline int del_mtd_partitions(struct mtd_info *mtd)
}
#endif
+#if defined(CONFIG_MTD_PARTITIONS) && CONFIG_IS_ENABLED(DM) && \
+ CONFIG_IS_ENABLED(OF_CONTROL)
+int add_mtd_partitions_of(struct mtd_info *master);
+#else
+static inline int add_mtd_partitions_of(struct mtd_info *master)
+{
+ return 0;
+}
+#endif
+
struct mtd_info *__mtd_next_device(int i);
#define mtd_for_each_device(mtd) \
for ((mtd) = __mtd_next_device(0); \
diff --git a/include/mtd.h b/include/mtd.h
index b0f8693386e..b569331edb0 100644
--- a/include/mtd.h
+++ b/include/mtd.h
@@ -8,7 +8,6 @@
#include <linux/mtd/mtd.h>
-int mtd_probe(struct udevice *dev);
int mtd_probe_devices(void);
void board_mtdparts_default(const char **mtdids, const char **mtdparts);