diff options
author | Tom Rini <trini@konsulko.com> | 2017-09-15 22:34:34 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-09-15 22:34:34 -0400 |
commit | 08cebeeaadd9192dd501308ac6a8b858ffa255c1 (patch) | |
tree | 65e037590914a47d0f3352afeb596c5cd6f238e8 /include | |
parent | 110ba62519909df7042cbe71824dfe3844557a85 (diff) | |
parent | ea28e488f743520f7f83b341f28818c32dae1ee3 (diff) | |
download | u-boot-08cebeeaadd9192dd501308ac6a8b858ffa255c1.tar.gz |
Merge git://git.denx.de/u-boot-fdt
Diffstat (limited to 'include')
-rw-r--r-- | include/clk.h | 4 | ||||
-rw-r--r-- | include/dt-structs.h | 16 | ||||
-rw-r--r-- | include/fdt_support.h | 2 | ||||
-rw-r--r-- | include/fdtdec.h | 2 | ||||
-rw-r--r-- | include/image.h | 25 | ||||
-rw-r--r-- | include/regmap.h | 2 | ||||
-rw-r--r-- | include/syscon.h | 6 |
7 files changed, 50 insertions, 7 deletions
diff --git a/include/clk.h b/include/clk.h index c5988f78a8..e7ce3e8576 100644 --- a/include/clk.h +++ b/include/clk.h @@ -61,9 +61,9 @@ struct clk { }; #if CONFIG_IS_ENABLED(OF_CONTROL) && CONFIG_IS_ENABLED(CLK) -struct phandle_2_cell; +struct phandle_1_arg; int clk_get_by_index_platdata(struct udevice *dev, int index, - struct phandle_2_cell *cells, struct clk *clk); + struct phandle_1_arg *cells, struct clk *clk); /** * clock_get_by_index - Get/request a clock by integer index. diff --git a/include/dt-structs.h b/include/dt-structs.h index 0732c442ff..c0f56951b5 100644 --- a/include/dt-structs.h +++ b/include/dt-structs.h @@ -9,11 +9,21 @@ /* These structures may only be used in SPL */ #if CONFIG_IS_ENABLED(OF_PLATDATA) -struct phandle_2_cell { +struct phandle_0_arg { const void *node; - int id; + int arg[0]; }; -#include <generated/dt-structs.h> + +struct phandle_1_arg { + const void *node; + int arg[1]; +}; + +struct phandle_2_arg { + const void *node; + int arg[2]; +}; +#include <generated/dt-structs-gen.h> #endif #endif diff --git a/include/fdt_support.h b/include/fdt_support.h index 5ef78cce6e..2bca4d7889 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -264,6 +264,8 @@ int arch_fixup_memory_node(void *blob); int fdt_setup_simplefb_node(void *fdt, int node, u64 base_address, u32 width, u32 height, u32 stride, const char *format); +int fdt_overlay_apply_verbose(void *fdt, void *fdto); + #endif /* ifdef CONFIG_OF_LIBFDT */ #ifdef USE_HOSTCC diff --git a/include/fdtdec.h b/include/fdtdec.h index 4a0947c626..1ba02be8e1 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -27,10 +27,12 @@ typedef phys_size_t fdt_size_t; #define FDT_ADDR_T_NONE (-1ULL) #define fdt_addr_to_cpu(reg) be64_to_cpu(reg) #define fdt_size_to_cpu(reg) be64_to_cpu(reg) +typedef fdt64_t fdt_val_t; #else #define FDT_ADDR_T_NONE (-1U) #define fdt_addr_to_cpu(reg) be32_to_cpu(reg) #define fdt_size_to_cpu(reg) be32_to_cpu(reg) +typedef fdt32_t fdt_val_t; #endif /* Information obtained about memory from the FDT */ diff --git a/include/image.h b/include/image.h index 339f79c6dc..af98ed9f25 100644 --- a/include/image.h +++ b/include/image.h @@ -594,6 +594,31 @@ int boot_get_setup_fit(bootm_headers_t *images, uint8_t arch, ulong *setup_start, ulong *setup_len); /** + * boot_get_fdt_fit() - load a DTB from a FIT file (applying overlays) + * + * This deals with all aspects of loading an DTB from a FIT. + * The correct base image based on configuration will be selected, and + * then any overlays specified will be applied (as present in fit_uname_configp). + * + * @param images Boot images structure + * @param addr Address of FIT in memory + * @param fit_unamep On entry this is the requested image name + * (e.g. "kernel@1") or NULL to use the default. On exit + * points to the selected image name + * @param fit_uname_configp On entry this is the requested configuration + * name (e.g. "conf@1") or NULL to use the default. On + * exit points to the selected configuration name. + * @param arch Expected architecture (IH_ARCH_...) + * @param datap Returns address of loaded image + * @param lenp Returns length of loaded image + * + * @return node offset of base image, or -ve error code on error + */ +int boot_get_fdt_fit(bootm_headers_t *images, ulong addr, + const char **fit_unamep, const char **fit_uname_configp, + int arch, ulong *datap, ulong *lenp); + +/** * fit_image_load() - load an image from a FIT * * This deals with all aspects of loading an image from a FIT, including diff --git a/include/regmap.h b/include/regmap.h index 1eed94e47a..493a5d8eff 100644 --- a/include/regmap.h +++ b/include/regmap.h @@ -69,7 +69,7 @@ int regmap_init_mem(struct udevice *dev, struct regmap **mapp); * @count: Number of pairs (e.g. 1 if the regmap has a single entry) * @mapp: Returns allocated map */ -int regmap_init_mem_platdata(struct udevice *dev, u32 *reg, int count, +int regmap_init_mem_platdata(struct udevice *dev, fdt_val_t *reg, int count, struct regmap **mapp); /** diff --git a/include/syscon.h b/include/syscon.h index 34842aa470..5d52b1cc3c 100644 --- a/include/syscon.h +++ b/include/syscon.h @@ -8,6 +8,8 @@ #ifndef __SYSCON_H #define __SYSCON_H +#include <fdtdec.h> + /** * struct syscon_uc_info - Information stored by the syscon UCLASS_UCLASS * @@ -28,9 +30,11 @@ struct syscon_ops { * We don't support 64-bit machines. If they are so resource-contrained that * they need to use OF_PLATDATA, something is horribly wrong with the * education of our hardware engineers. + * + * Update: 64-bit is now supported and we have an education crisis. */ struct syscon_base_platdata { - u32 reg[2]; + fdt_val_t reg[2]; }; #endif |