Flattened Device Tree.
Definition in file fdt.h.
int fdt_mac |
( |
unsigned int |
offset, |
|
|
struct net_device * |
netdev |
|
) |
| |
Get MAC address from property.
- Parameters
-
offset | Starting node offset |
netdev | Network device |
- Return values
-
Definition at line 377 of file fdt.c.
392 DBGC ( &
fdt,
"FDT malformed MAC address \"%s\":\n",
struct arbelprm_rc_send_wqe rc
uint64_t desc
Microcode descriptor list physical address.
static int fdt_property(unsigned int offset, const char *name, struct fdt_descriptor *desc)
Find property.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
uint8_t hw_addr_len
Hardware address length.
static struct net_device * netdev
#define ERANGE
Result too large.
uint16_t offset
Offset to command line.
uint8_t hw_addr[MAX_HW_ADDR_LEN]
Hardware address.
struct ll_protocol * ll_protocol
Link-layer protocol.
References DBGC, DBGC_HDA, desc, ERANGE, fdt_property(), net_device::hw_addr, ll_protocol::hw_addr_len, len, net_device::ll_protocol, memcpy(), netdev, offset, and rc.
Referenced by smscusb_fdt_fetch_mac().
Register device tree.
- Parameters
-
- Return values
-
Definition at line 410 of file fdt.c.
416 DBGC ( &
fdt,
"FDT version %d at %p+%#04zx\n",
421 DBGC ( &
fdt,
"FDT has invalid magic value %#08x\n",
428 DBGC ( &
fdt,
"FDT unsupported version %d\n",
436 DBGC ( &
fdt,
"FDT structure block at +[%#04x,%#04zx)\n",
440 DBGC ( &
fdt,
"FDT structure block exceeds table\n" );
445 DBGC ( &
fdt,
"FDT structure block is misaligned\n" );
452 DBGC ( &
fdt,
"FDT strings block at +[%#04x,%#04zx)\n",
456 DBGC ( &
fdt,
"FDT strings block exceeds table\n" );
463 if ( *(--
end) ==
'\0' )
467 DBGC ( &
fdt,
"FDT strings block shrunk to +[%#04x,%#04zx)\n",
#define EINVAL
Invalid argument.
#define FDT_STRUCTURE_ALIGN
Alignment of structure block.
size_t len
Length of tree.
struct golan_inbox_hdr hdr
Message header.
const struct fdt_header * hdr
Tree header.
size_t strings_len
Length of strings block.
const char * fdt_string(unsigned int offset, const char *name)
Find string property.
#define be32_to_cpu(value)
#define FDT_MAGIC
Magic signature.
unsigned int structure
Offset to structure block.
#define FDT_VERSION
Expected device tree version.
size_t structure_len
Length of structure block.
#define cpu_to_be32(value)
const void * raw
Raw data.
uint32_t end
Ending offset.
#define NULL
NULL pointer (VOID *)
unsigned int strings
Offset to strings block.
References be32_to_cpu, cpu_to_be32, DBGC, DBGC_HDA, EINVAL, end, FDT_MAGIC, fdt_string(), FDT_STRUCTURE_ALIGN, FDT_VERSION, fdt::hdr, hdr, fdt::len, NULL, fdt::raw, fdt::strings, fdt::strings_len, fdt::structure, and fdt::structure_len.
Referenced by efi_fdt_init().