Merge git://git.denx.de/u-boot-fdt

This commit is contained in:
Tom Rini
2017-09-15 22:34:34 -04:00
42 changed files with 1662 additions and 138 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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 */

View File

@@ -593,6 +593,31 @@ int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images,
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
*

View File

@@ -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);
/**

View File

@@ -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