2017-11-01 15:07:57 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2018-02-27 17:40:38 -06:00
|
|
|
#ifndef LIBFDT_ENV_H
|
|
|
|
|
#define LIBFDT_ENV_H
|
2012-07-05 18:12:38 +02:00
|
|
|
|
2019-06-18 01:21:23 +09:00
|
|
|
#include <linux/limits.h> /* For INT_MAX */
|
2012-07-05 18:12:38 +02:00
|
|
|
#include <linux/string.h>
|
|
|
|
|
|
|
|
|
|
#include <asm/byteorder.h>
|
|
|
|
|
|
2019-11-13 16:12:02 +09:00
|
|
|
#define INT32_MAX S32_MAX
|
|
|
|
|
#define UINT32_MAX U32_MAX
|
|
|
|
|
|
2015-04-29 16:02:30 -05:00
|
|
|
typedef __be16 fdt16_t;
|
|
|
|
|
typedef __be32 fdt32_t;
|
|
|
|
|
typedef __be64 fdt64_t;
|
|
|
|
|
|
2012-07-05 18:12:38 +02:00
|
|
|
#define fdt32_to_cpu(x) be32_to_cpu(x)
|
|
|
|
|
#define cpu_to_fdt32(x) cpu_to_be32(x)
|
|
|
|
|
#define fdt64_to_cpu(x) be64_to_cpu(x)
|
|
|
|
|
#define cpu_to_fdt64(x) cpu_to_be64(x)
|
|
|
|
|
|
2018-02-27 17:40:38 -06:00
|
|
|
#endif /* LIBFDT_ENV_H */
|