blob: bd0a55821177a3a210be8b1abec86626915ca3bb [file] [log] [blame]
David Daneyab253832012-07-05 18:12:38 +02001#ifndef _LIBFDT_ENV_H
2#define _LIBFDT_ENV_H
3
Rob Herring63ce52b2018-09-13 15:16:22 -05004#include <linux/kernel.h> /* For INT_MAX */
David Daneyab253832012-07-05 18:12:38 +02005#include <linux/string.h>
6
7#include <asm/byteorder.h>
8
Masahiro Yamada6a60df82019-11-13 16:12:02 +09009#define INT32_MAX S32_MAX
10#define UINT32_MAX U32_MAX
11
Rob Herringf1ec7182015-04-29 16:02:30 -050012typedef __be16 fdt16_t;
13typedef __be32 fdt32_t;
14typedef __be64 fdt64_t;
15
David Daneyab253832012-07-05 18:12:38 +020016#define fdt32_to_cpu(x) be32_to_cpu(x)
17#define cpu_to_fdt32(x) cpu_to_be32(x)
18#define fdt64_to_cpu(x) be64_to_cpu(x)
19#define cpu_to_fdt64(x) cpu_to_be64(x)
20
21#endif /* _LIBFDT_ENV_H */