baseport/src/cedar/generic/base/syborg/svpplatform/libfdt/libfdt_env.h
changeset 2 d55eb581a87c
parent 1 2fb8b9db1c86
child 3 c2946f91d81f
equal deleted inserted replaced
1:2fb8b9db1c86 2:d55eb581a87c
     1 #ifndef _LIBFDT_ENV_H
       
     2 #define _LIBFDT_ENV_H
       
     3 
       
     4 #include <stddef.h>
       
     5 #include <stdint.h>
       
     6 #include <string.h>
       
     7 #include "bswap.h"
       
     8 
       
     9 #ifdef WORDS_BIGENDIAN
       
    10 #define fdt32_to_cpu(x)		(x)
       
    11 #define cpu_to_fdt32(x)		(x)
       
    12 #define fdt64_to_cpu(x)		(x)
       
    13 #define cpu_to_fdt64(x)		(x)
       
    14 #else
       
    15 #define fdt32_to_cpu(x)		(bswap_32((x)))
       
    16 #define cpu_to_fdt32(x)		(bswap_32((x)))
       
    17 #define fdt64_to_cpu(x)		(bswap_64((x)))
       
    18 #define cpu_to_fdt64(x)		(bswap_64((x)))
       
    19 #endif
       
    20 
       
    21 #endif /* _LIBFDT_ENV_H */