Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fdt.c File Reference
#include "libfdt_env.h"
#include <fdt.h>
#include <libfdt.h>
#include "libfdt_internal.h"

Go to the source code of this file.


int fdt_check_header (const void *fdt)
const voidfdt_offset_ptr (const void *fdt, int offset, unsigned int len)
uint32_t fdt_next_tag (const void *fdt, int startoffset, int *nextoffset)
int _fdt_check_node_offset (const void *fdt, int offset)
int _fdt_check_prop_offset (const void *fdt, int offset)
int fdt_next_node (const void *fdt, int offset, int *depth)
const char_fdt_find_string (const char *strtab, int tabsize, const char *s)
int fdt_move (const void *fdt, void *buf, int bufsize)

Function Documentation

int _fdt_check_node_offset ( const void fdt,
int  offset 

Definition at line 143 of file fdt.c.

int _fdt_check_prop_offset ( const void fdt,
int  offset 

Definition at line 152 of file fdt.c.

const char* _fdt_find_string ( const char strtab,
int  tabsize,
const char s 

Definition at line 201 of file fdt.c.

int fdt_check_header ( const void fdt)

fdt_check_header - sanity check a device tree or possible device tree : pointer to data which might be a flattened device tree

fdt_check_header() checks that the given buffer contains what appears to be a flattened device tree with sane information in its header.

returns: 0, if the buffer appears to contain a valid device tree -FDT_ERR_BADMAGIC, -FDT_ERR_BADVERSION, -FDT_ERR_BADSTATE, standard meanings, as above

Definition at line 58 of file fdt.c.

int fdt_move ( const void fdt,
void buf,
int  bufsize 

fdt_move - move a device tree around in memory : pointer to the device tree to move : pointer to memory where the device is to be moved : size of the memory space at buf

fdt_move() relocates, if possible, the device tree blob located at fdt to the buffer at buf of size bufsize. The buffer may overlap with the existing device tree blob at fdt. Therefore, fdt_move(fdt, fdt, fdt_totalsize(fdt)) should always succeed.

returns: 0, on success -FDT_ERR_NOSPACE, bufsize is insufficient to contain the device tree -FDT_ERR_BADMAGIC, -FDT_ERR_BADVERSION, -FDT_ERR_BADSTATE, standard meanings

Definition at line 213 of file fdt.c.

int fdt_next_node ( const void fdt,
int  offset,
int depth 

Definition at line 161 of file fdt.c.

uint32_t fdt_next_tag ( const void fdt,
int  startoffset,
int nextoffset 

Definition at line 93 of file fdt.c.

const void* fdt_offset_ptr ( const void fdt,
int  offset,
unsigned int  len 

Definition at line 77 of file fdt.c.