aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-10-15 15:58:16 -0400
committerTom Rini <trini@konsulko.com>2021-10-15 18:30:33 -0400
commit6a86f1212656d4497b8980048907535f5294fabe (patch)
tree0b57b0ce989476384c052e75d8314f1bc6e232d4 /include
parent86acfc96642b5de98ab1df90ee57e17453f47079 (diff)
parenta0ba216ed420a8953f57f777256f310370b95338 (diff)
downloadu-boot-WIP/15Oct2021.tar.gz
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-tegraWIP/15Oct2021
On merge, fixup order of fdtdec_add_reserved_memory parameters in arch/arm/cpu/armv8/fsl-layerscape/soc.c Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/tegra210-common.h2
-rw-r--r--include/fdtdec.h39
2 files changed, 30 insertions, 11 deletions
diff --git a/include/configs/tegra210-common.h b/include/configs/tegra210-common.h
index c36bdb0bb96..3ba12bec0ee 100644
--- a/include/configs/tegra210-common.h
+++ b/include/configs/tegra210-common.h
@@ -44,7 +44,7 @@
"kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
"fdtfile=" FDTFILE "\0" \
"fdt_addr_r=0x83000000\0" \
- "ramdisk_addr_r=0x83200000\0"
+ "ramdisk_addr_r=0x83420000\0"
/* For USB EHCI controller */
#define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 23efbe710cb..f94d1f4f3ab 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -977,6 +977,9 @@ static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle)
return fdt_setprop_u32(blob, node, "phandle", phandle);
}
+/* add "no-map" property */
+#define FDTDEC_RESERVED_MEMORY_NO_MAP (1 << 0)
+
/**
* fdtdec_add_reserved_memory() - add or find a reserved-memory node
*
@@ -995,7 +998,8 @@ static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle)
* };
* uint32_t phandle;
*
- * fdtdec_add_reserved_memory(fdt, "framebuffer", &fb, &phandle, false);
+ * fdtdec_add_reserved_memory(fdt, "framebuffer", &fb, NULL, 0, &phandle,
+ * 0);
*
* This results in the following subnode being added to the top-level
* /reserved-memory node:
@@ -1020,14 +1024,17 @@ static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle)
* @param blob FDT blob
* @param basename base name of the node to create
* @param carveout information about the carveout region
+ * @param compatibles list of compatible strings for the carveout region
+ * @param count number of compatible strings for the carveout region
* @param phandlep return location for the phandle of the carveout region
* can be NULL if no phandle should be added
- * @param no_map add "no-map" property if true
+ * @param flags bitmask of flags to set for the carveout region
* @return 0 on success or a negative error code on failure
*/
int fdtdec_add_reserved_memory(void *blob, const char *basename,
const struct fdt_memory *carveout,
- uint32_t *phandlep, bool no_map);
+ const char **compatibles, unsigned int count,
+ uint32_t *phandlep, unsigned long flags);
/**
* fdtdec_get_carveout() - reads a carveout from an FDT
@@ -1038,14 +1045,21 @@ int fdtdec_add_reserved_memory(void *blob, const char *basename,
*
* @param blob FDT blob
* @param node name of a node
- * @param name name of the property in the given node that contains
+ * @param prop_name name of the property in the given node that contains
* the phandle for the carveout
* @param index index of the phandle for which to read the carveout
* @param carveout return location for the carveout information
+ * @param name return location for the carveout name
+ * @param compatiblesp return location for compatible strings
+ * @param countp return location for the number of compatible strings
+ * @param flags return location for the flags of the carveout
* @return 0 on success or a negative error code on failure
*/
-int fdtdec_get_carveout(const void *blob, const char *node, const char *name,
- unsigned int index, struct fdt_memory *carveout);
+int fdtdec_get_carveout(const void *blob, const char *node,
+ const char *prop_name, unsigned int index,
+ struct fdt_memory *carveout, const char **name,
+ const char ***compatiblesp, unsigned int *countp,
+ unsigned long *flags);
/**
* fdtdec_set_carveout() - sets a carveout region for a given node
@@ -1063,7 +1077,8 @@ int fdtdec_get_carveout(const void *blob, const char *node, const char *name,
* .end = 0x934b2fff,
* };
*
- * fdtdec_set_carveout(fdt, node, "memory-region", 0, "framebuffer", &fb);
+ * fdtdec_set_carveout(fdt, node, "memory-region", 0, "framebuffer", NULL,
+ * 0, &fb, 0);
*
* dc@54200000 is a display controller and was set up by the bootloader to
* scan out the framebuffer specified by "fb". This would cause the following
@@ -1100,13 +1115,17 @@ int fdtdec_get_carveout(const void *blob, const char *node, const char *name,
* @param prop_name name of the property in which to store the phandle of
* the carveout
* @param index index of the phandle to store
- * @param name base name of the reserved-memory node to create
* @param carveout information about the carveout to add
+ * @param name base name of the reserved-memory node to create
+ * @param compatibles compatible strings to set for the carveout
+ * @param count number of compatible strings
+ * @param flags bitmask of flags to set for the carveout
* @return 0 on success or a negative error code on failure
*/
int fdtdec_set_carveout(void *blob, const char *node, const char *prop_name,
- unsigned int index, const char *name,
- const struct fdt_memory *carveout);
+ unsigned int index, const struct fdt_memory *carveout,
+ const char *name, const char **compatibles,
+ unsigned int count, unsigned long flags);
/**
* Set up the device tree ready for use