18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _ARCH_POWERPC_BOOT_LIBFDT_ENV_H
38c2ecf20Sopenharmony_ci#define _ARCH_POWERPC_BOOT_LIBFDT_ENV_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <types.h>
68c2ecf20Sopenharmony_ci#include <string.h>
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#define INT_MAX			((int)(~0U>>1))
98c2ecf20Sopenharmony_ci#define UINT32_MAX		((u32)~0U)
108c2ecf20Sopenharmony_ci#define INT32_MAX		((s32)(UINT32_MAX >> 1))
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#include "of.h"
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_citypedef unsigned long uintptr_t;
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_citypedef __be16 fdt16_t;
178c2ecf20Sopenharmony_citypedef __be32 fdt32_t;
188c2ecf20Sopenharmony_citypedef __be64 fdt64_t;
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#define fdt16_to_cpu(x)		be16_to_cpu(x)
218c2ecf20Sopenharmony_ci#define cpu_to_fdt16(x)		cpu_to_be16(x)
228c2ecf20Sopenharmony_ci#define fdt32_to_cpu(x)		be32_to_cpu(x)
238c2ecf20Sopenharmony_ci#define cpu_to_fdt32(x)		cpu_to_be32(x)
248c2ecf20Sopenharmony_ci#define fdt64_to_cpu(x)		be64_to_cpu(x)
258c2ecf20Sopenharmony_ci#define cpu_to_fdt64(x)		cpu_to_be64(x)
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#endif /* _ARCH_POWERPC_BOOT_LIBFDT_ENV_H */
28