mirror of
https://github.com/ipxe/ipxe
synced 2025-12-12 06:22:01 +03:00
[fdt] Use phandle as device location
Consumption of phandles will be in the form of locating a functional device (e.g. a GPIO device, or an I2C device, or a reset controller) by phandle, rather than locating the device tree node to which the phandle refers. Repurpose fdt_phandle() to obtain the phandle value (instead of searching by phandle), and record this value as the bus location within the generic device structure. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -176,8 +176,6 @@ extern int fdt_path ( struct fdt *fdt, const char *path,
|
||||
unsigned int *offset );
|
||||
extern int fdt_alias ( struct fdt *fdt, const char *name,
|
||||
unsigned int *offset );
|
||||
extern int fdt_phandle ( struct fdt *fdt, uint32_t phandle,
|
||||
unsigned int *offset );
|
||||
extern const char * fdt_strings ( struct fdt *fdt, unsigned int offset,
|
||||
const char *name, unsigned int *count );
|
||||
extern const char * fdt_string ( struct fdt *fdt, unsigned int offset,
|
||||
@@ -189,6 +187,7 @@ extern int fdt_u64 ( struct fdt *fdt, unsigned int offset, const char *name,
|
||||
uint64_t *value );
|
||||
extern int fdt_u32 ( struct fdt *fdt, unsigned int offset, const char *name,
|
||||
uint32_t *value );
|
||||
extern uint32_t fdt_phandle ( struct fdt *fdt, unsigned int offset );
|
||||
extern void fdt_reg_cells ( struct fdt *fdt, unsigned int offset,
|
||||
struct fdt_reg_cells *regs );
|
||||
extern int fdt_reg_count ( struct fdt *fdt, unsigned int offset,
|
||||
|
||||
Reference in New Issue
Block a user