MOS Source Code
Loading...
Searching...
No Matches
libfdt_env.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <mos_stdlib.h>
#include <mos_string.h>
#include <limits.h>
+ Include dependency graph for libfdt_env.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FDT_FORCE
 
#define FDT_BITWISE
 
#define EXTRACT_BYTE(x, n)
 
#define CPU_TO_FDT16(x)
 
#define CPU_TO_FDT32(x)
 
#define CPU_TO_FDT64(x)
 

Typedefs

typedef uint16_t fdt16_t
 
typedef uint32_t fdt32_t
 
typedef uint64_t fdt64_t
 

Functions

static uint16_t fdt16_to_cpu (fdt16_t x)
 
static fdt16_t cpu_to_fdt16 (uint16_t x)
 
static uint32_t fdt32_to_cpu (fdt32_t x)
 
static fdt32_t cpu_to_fdt32 (uint32_t x)
 
static uint64_t fdt64_to_cpu (fdt64_t x)
 
static fdt64_t cpu_to_fdt64 (uint64_t x)
 

Macro Definition Documentation

◆ FDT_FORCE

#define FDT_FORCE

◆ FDT_BITWISE

#define FDT_BITWISE

Definition at line 22 of file libfdt_env.h.

◆ EXTRACT_BYTE

#define EXTRACT_BYTE ( x,
n )
Value:
((unsigned long long)((uint8_t *)&x)[n])
unsigned char uint8_t
Definition pb_syshdr.h:20

Definition at line 29 of file libfdt_env.h.

◆ CPU_TO_FDT16

#define CPU_TO_FDT16 ( x)
Value:
((EXTRACT_BYTE(x, 0) << 8) | EXTRACT_BYTE(x, 1))
#define EXTRACT_BYTE(x, n)
Definition libfdt_env.h:29

Definition at line 30 of file libfdt_env.h.

Referenced by cpu_to_fdt16(), and fdt16_to_cpu().

◆ CPU_TO_FDT32

#define CPU_TO_FDT32 ( x)
Value:
((EXTRACT_BYTE(x, 0) << 24) | (EXTRACT_BYTE(x, 1) << 16) | \
(EXTRACT_BYTE(x, 2) << 8) | EXTRACT_BYTE(x, 3))

Definition at line 31 of file libfdt_env.h.

Referenced by cpu_to_fdt32(), and fdt32_to_cpu().

◆ CPU_TO_FDT64

#define CPU_TO_FDT64 ( x)
Value:
((EXTRACT_BYTE(x, 0) << 56) | (EXTRACT_BYTE(x, 1) << 48) | \
(EXTRACT_BYTE(x, 2) << 40) | (EXTRACT_BYTE(x, 3) << 32) | \
(EXTRACT_BYTE(x, 4) << 24) | (EXTRACT_BYTE(x, 5) << 16) | \
(EXTRACT_BYTE(x, 6) << 8) | EXTRACT_BYTE(x, 7))

Definition at line 33 of file libfdt_env.h.

Referenced by cpu_to_fdt64(), and fdt64_to_cpu().

Typedef Documentation

◆ fdt16_t

typedef uint16_t fdt16_t

Definition at line 25 of file libfdt_env.h.

◆ fdt32_t

typedef uint32_t fdt32_t

Definition at line 26 of file libfdt_env.h.

◆ fdt64_t

typedef uint64_t fdt64_t

Definition at line 27 of file libfdt_env.h.

Function Documentation

◆ fdt16_to_cpu()

static uint16_t fdt16_to_cpu ( fdt16_t x)
inlinestatic

Definition at line 38 of file libfdt_env.h.

◆ cpu_to_fdt16()

static fdt16_t cpu_to_fdt16 ( uint16_t x)
inlinestatic

Definition at line 42 of file libfdt_env.h.

◆ fdt32_to_cpu()

◆ cpu_to_fdt32()

◆ fdt64_to_cpu()

static uint64_t fdt64_to_cpu ( fdt64_t x)
inlinestatic

Definition at line 56 of file libfdt_env.h.

Referenced by fdt64_ld_(), and dt_property::get_u64().

◆ cpu_to_fdt64()