forked from Imagelibrary/rtems
pylibfdt: Add functions to update properties
Allow updating and creating properties, including special methods for integers. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
committed by
Sebastian Huber
parent
0d851d49c5
commit
3848f14be4
@@ -1345,10 +1345,13 @@ static inline int fdt_property_u64(void *fdt, const char *name, uint64_t val)
|
|||||||
fdt64_t tmp = cpu_to_fdt64(val);
|
fdt64_t tmp = cpu_to_fdt64(val);
|
||||||
return fdt_property(fdt, name, &tmp, sizeof(tmp));
|
return fdt_property(fdt, name, &tmp, sizeof(tmp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SWIG /* Not available in Python */
|
||||||
static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val)
|
static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val)
|
||||||
{
|
{
|
||||||
return fdt_property_u32(fdt, name, val);
|
return fdt_property_u32(fdt, name, val);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fdt_property_placeholder - add a new property and return a ptr to its value
|
* fdt_property_placeholder - add a new property and return a ptr to its value
|
||||||
|
|||||||
Reference in New Issue
Block a user