SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Macros | Functions
fdt_wrapper.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __packed   __attribute__((__packed__))
 
#define __aligned(x)   __attribute__((__aligned__(x)))
 
#define MAX_LEVEL   32 /* how deeply nested we will go */
 
#define SCRATCHPAD   1024 /* bytes of scratchpad memory */
 
#define CMD_FDT_MAX_DUMP   64
 

Functions

int fdt_print (unsigned char *working_fdt, const char *pathp, char *prop, int depth)
 Print the contents of the device tree at the specified path with a given property and depth.
 
int fdt_parse_prop (char const **newval, int count, char *data, int *len)
 Parse the property values in the data buffer and return the new value pointers and lengths.
 
int fdt_increase_size (void *fdt, int add_len)
 Increase the size of the flattened device tree by adding additional length.
 
: name of the subnode to locate

fdt_find_or_add_subnode() - find or possibly add a subnode of a given node

@fdt: pointer to the device tree blob @parentoffset: structure block offset of a node

fdt_subnode_offset() finds a subnode of the node with a given name. If the subnode does not exist, it will be created.

int fdt_find_or_add_subnode (void *fdt, int parentoffset, const char *name)
 
int fdt_overlay_apply_verbose (void *fdt, void *fdto)
 fdt_overlay_apply_verbose - Apply an overlay with verbose error reporting
 

Macro Definition Documentation

◆ __aligned

#define __aligned (   x)    __attribute__((__aligned__(x)))

◆ __packed

#define __packed   __attribute__((__packed__))

◆ CMD_FDT_MAX_DUMP

#define CMD_FDT_MAX_DUMP   64

◆ MAX_LEVEL

#define MAX_LEVEL   32 /* how deeply nested we will go */

◆ SCRATCHPAD

#define SCRATCHPAD   1024 /* bytes of scratchpad memory */

Function Documentation

◆ fdt_find_or_add_subnode()

int fdt_find_or_add_subnode ( void *  fdt,
int  parentoffset,
const char *  name 
)

◆ fdt_increase_size()

int fdt_increase_size ( void *  fdt,
int  add_len 
)

Increase the size of the flattened device tree by adding additional length.

Parameters
fdtThe pointer to the flattened device tree.
add_lenThe additional length to be added to the device tree.
Returns
0 success, other fail

◆ fdt_overlay_apply_verbose()

int fdt_overlay_apply_verbose ( void *  fdt,
void *  fdto 
)

fdt_overlay_apply_verbose - Apply an overlay with verbose error reporting

@fdt: ptr to device tree @fdto: ptr to device tree overlay

Convenience function to apply an overlay and display helpful messages in the case of an error

◆ fdt_parse_prop()

int fdt_parse_prop ( char const **  newval,
int  count,
char *  data,
int *  len 
)

Parse the property values in the data buffer and return the new value pointers and lengths.

Parameters
newvalThe pointer to store the new value pointers.
countThe number of properties in the data buffer.
dataThe buffer containing the property values.
lenThe pointer to store the length of each property value.
Returns
The number of parsed properties.

◆ fdt_print()

int fdt_print ( unsigned char *  working_fdt,
const char *  pathp,
char *  prop,
int  depth 
)

Print the contents of the device tree at the specified path with a given property and depth.

Parameters
working_fdtThe pointer to the device tree.
pathpThe path of the node to start printing from.
propThe property name to print.
depthThe maximum depth to traverse while printing.
Returns
The number of printed properties.