42 #define FDT_MAGIC 0xd00dfeed 45 #define FDT_VERSION 16 51 #define FDT_BEGIN_NODE 0x00000001 54 #define FDT_END_NODE 0x00000002 57 #define FDT_PROP 0x00000003 68 #define FDT_NOP 0x00000004 71 #define FDT_END 0x00000009 74 #define FDT_STRUCTURE_ALIGN ( sizeof ( fdt_token_t ) ) 77 #define FDT_MAX_ALIGN 8 146 #define FDT_DEFAULT_ADDRESS_CELLS 2 149 #define FDT_DEFAULT_SIZE_CELLS 1 167 #define for_each_fdt_reservation( rsv, fdt ) \ 168 for ( rsv = fdt_reservations ( (fdt) ) ; \ 169 ( (rsv)->start || (rsv)->size ) ; rsv++ ) 174 unsigned int *parent );
const char * name
Node or property name (if applicable)
unsigned int reservations
Offset to memory reservation block.
unsigned int next
Next offset within structure block.
void fdt_reg_cells(struct fdt *fdt, unsigned int offset, struct fdt_reg_cells *regs)
Get region cell size specification.
int fdt_create(struct fdt_header **hdr, const char *cmdline, physaddr_t initrd, size_t initrd_len)
Create device tree.
int(* realloc)(struct fdt *fdt, size_t len)
Reallocate device tree.
static const struct fdt_reservation * fdt_reservations(struct fdt *fdt)
Get memory reservations.
size_t len
Length of tree.
struct golan_inbox_hdr hdr
Message header.
uint64_t address
Base address.
uint16_t size
Buffer size.
void fdt_remove(struct fdt_header *hdr)
Remove device tree.
A device tree region cell size specification.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
unsigned long long uint64_t
int fdt_reg_count(struct fdt *fdt, unsigned int offset, struct fdt_reg_cells *regs)
Get number of regions.
int fdt_reg(struct fdt *fdt, unsigned int offset, uint64_t *region)
Get unsized single-entry region address.
size_t strings_len
Length of strings block.
uint32_t fdt_token_t
Device tree token.
const char * fdt_string(struct fdt *fdt, unsigned int offset, const char *name)
Find string property.
int fdt_reg_size(struct fdt *fdt, unsigned int offset, struct fdt_reg_cells *regs, unsigned int index, uint64_t *size)
Get region size.
struct fdt_header * hdr
Tree header.
int fdt_u32(struct fdt *fdt, unsigned int offset, const char *name, uint32_t *value)
Get 32-bit integer property.
struct image_tag fdt_image __image_tag
The downloaded flattened device tree tag.
uint32_t address_cells
Number of address cells.
int fdt_u64(struct fdt *fdt, unsigned int offset, const char *name, uint64_t *value)
Get 64-bit integer property.
struct ena_llq_option desc
Descriptor counts.
unsigned int stride
Number of address cells plus number of size cells.
int fdt_alias(struct fdt *fdt, const char *name, unsigned int *offset)
Find node by alias.
pseudo_bit_t value[0x00020]
static struct net_device * netdev
int fdt_cells(struct fdt *fdt, unsigned int offset, const char *name, unsigned int index, unsigned int count, uint64_t *value)
Get integer property.
static unsigned int count
Number of entries.
uint32_t size_cells
Number of size cells.
size_t len
Length of property data (if applicable)
unsigned int structure
Offset to structure block.
uint64_t size
Length of reservation.
const char * fdt_strings(struct fdt *fdt, unsigned int offset, const char *name, unsigned int *count)
Find strings property.
int fdt_parent(struct fdt *fdt, unsigned int offset, unsigned int *parent)
Find parent node.
size_t used
Used length of tree.
size_t structure_len
Length of structure block.
int fdt_path(struct fdt *fdt, const char *path, unsigned int *offset)
Find node by path.
unsigned int offset
Offset within structure block.
int fdt_parent_reg_cells(struct fdt *fdt, unsigned int offset, struct fdt_reg_cells *regs)
Get parent region cell size specification.
uint32_t name_off
Name offset.
int fdt_describe(struct fdt *fdt, unsigned int offset, struct fdt_descriptor *desc)
Describe device tree token.
int fdt_reg_address(struct fdt *fdt, unsigned int offset, struct fdt_reg_cells *regs, unsigned int index, uint64_t *address)
Get region address.
uint64_t start
Starting address.
int fdt_parse(struct fdt *fdt, struct fdt_header *hdr, size_t max_len)
Parse device tree.
int fdt_mac(struct fdt *fdt, unsigned int offset, struct net_device *netdev)
Get MAC address from property.
A device tree token descriptor.
uint16_t offset
Offset to command line.
struct fdt sysfdt
The system flattened device tree (if present)
const void * data
Property data (if applicable)
uint32_t fdt_phandle(struct fdt *fdt, unsigned int offset)
Get package handle (phandle) property.
unsigned int strings
Offset to strings block.