1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef _ARCH_POWERPC_BOOT_LIBFDT_ENV_H 3*4882a593Smuzhiyun #define _ARCH_POWERPC_BOOT_LIBFDT_ENV_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun #include <types.h> 6*4882a593Smuzhiyun #include <string.h> 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun #define INT_MAX ((int)(~0U>>1)) 9*4882a593Smuzhiyun #define UINT32_MAX ((u32)~0U) 10*4882a593Smuzhiyun #define INT32_MAX ((s32)(UINT32_MAX >> 1)) 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun #include "of.h" 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun typedef unsigned long uintptr_t; 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun typedef __be16 fdt16_t; 17*4882a593Smuzhiyun typedef __be32 fdt32_t; 18*4882a593Smuzhiyun typedef __be64 fdt64_t; 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun #define fdt16_to_cpu(x) be16_to_cpu(x) 21*4882a593Smuzhiyun #define cpu_to_fdt16(x) cpu_to_be16(x) 22*4882a593Smuzhiyun #define fdt32_to_cpu(x) be32_to_cpu(x) 23*4882a593Smuzhiyun #define cpu_to_fdt32(x) cpu_to_be32(x) 24*4882a593Smuzhiyun #define fdt64_to_cpu(x) be64_to_cpu(x) 25*4882a593Smuzhiyun #define cpu_to_fdt64(x) cpu_to_be64(x) 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun #endif /* _ARCH_POWERPC_BOOT_LIBFDT_ENV_H */ 28