common: fit: add fit_image_is_preload()
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com> Change-Id: I3c3001a347ae59fcfd186156382c04b4b8a77546
This commit is contained in:
parent
4d62a7e032
commit
2201a451d5
|
|
@ -711,6 +711,23 @@ int fit_image_get_comp(const void *fit, int noffset, uint8_t *comp)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool fit_image_is_preload(const void *fit, int noffset)
|
||||||
|
{
|
||||||
|
int len;
|
||||||
|
int *data;
|
||||||
|
|
||||||
|
data = (int *)fdt_getprop(fit, noffset, FIT_PRE_LOAD_PROP, &len);
|
||||||
|
if (data == NULL || len != sizeof(int)) {
|
||||||
|
fit_get_debug(fit, noffset, FIT_PRE_LOAD_PROP, len);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*data != 1)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static int fit_image_get_address(const void *fit, int noffset, char *name,
|
static int fit_image_get_address(const void *fit, int noffset, char *name,
|
||||||
ulong *load)
|
ulong *load)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -930,6 +930,7 @@ int bootz_setup(ulong image, ulong *start, ulong *end);
|
||||||
#define FIT_COMP_ADDR_PROP "comp"
|
#define FIT_COMP_ADDR_PROP "comp"
|
||||||
#define FIT_ENTRY_PROP "entry"
|
#define FIT_ENTRY_PROP "entry"
|
||||||
#define FIT_LOAD_PROP "load"
|
#define FIT_LOAD_PROP "load"
|
||||||
|
#define FIT_PRE_LOAD_PROP "preload"
|
||||||
#define FIT_ROLLBACK_PROP "rollback-index"
|
#define FIT_ROLLBACK_PROP "rollback-index"
|
||||||
|
|
||||||
/* configuration node */
|
/* configuration node */
|
||||||
|
|
@ -1011,6 +1012,7 @@ int fit_image_get_os(const void *fit, int noffset, uint8_t *os);
|
||||||
int fit_image_get_arch(const void *fit, int noffset, uint8_t *arch);
|
int fit_image_get_arch(const void *fit, int noffset, uint8_t *arch);
|
||||||
int fit_image_get_type(const void *fit, int noffset, uint8_t *type);
|
int fit_image_get_type(const void *fit, int noffset, uint8_t *type);
|
||||||
int fit_image_get_comp(const void *fit, int noffset, uint8_t *comp);
|
int fit_image_get_comp(const void *fit, int noffset, uint8_t *comp);
|
||||||
|
bool fit_image_is_preload(const void *fit, int noffset);
|
||||||
int fit_image_get_load(const void *fit, int noffset, ulong *load);
|
int fit_image_get_load(const void *fit, int noffset, ulong *load);
|
||||||
int fit_image_get_entry(const void *fit, int noffset, ulong *entry);
|
int fit_image_get_entry(const void *fit, int noffset, ulong *entry);
|
||||||
int fit_image_get_comp_addr(const void *fit, int noffset, ulong *comp);
|
int fit_image_get_comp_addr(const void *fit, int noffset, ulong *comp);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue