2007-04-06 14:17:14 -04:00
|
|
|
/*
|
|
|
|
* libfdt - Flat Device Tree manipulation (build/run environment adaptation)
|
|
|
|
* Copyright (C) 2007 Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com
|
|
|
|
* Original version written by David Gibson, IBM Corporation.
|
|
|
|
*
|
2013-07-08 11:48:07 +02:00
|
|
|
* SPDX-License-Identifier: LGPL-2.1+
|
2007-04-06 14:17:14 -04:00
|
|
|
*/
|
|
|
|
|
2007-03-31 11:59:59 -04:00
|
|
|
#ifndef _LIBFDT_ENV_H
|
|
|
|
#define _LIBFDT_ENV_H
|
|
|
|
|
2009-07-02 19:23:25 -04:00
|
|
|
#include "compiler.h"
|
2013-01-16 13:59:34 +00:00
|
|
|
#include "linux/types.h"
|
2007-03-31 11:59:59 -04:00
|
|
|
|
2008-06-10 11:06:17 -05:00
|
|
|
extern struct fdt_header *working_fdt; /* Pointer to the working fdt */
|
2007-03-31 12:05:39 -04:00
|
|
|
|
2013-01-16 13:59:34 +00:00
|
|
|
typedef __be16 fdt16_t;
|
|
|
|
typedef __be32 fdt32_t;
|
|
|
|
typedef __be64 fdt64_t;
|
|
|
|
|
2009-07-02 19:23:25 -04: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)
|
2008-07-07 10:10:48 +10:00
|
|
|
|
2013-05-04 22:17:49 -04:00
|
|
|
/* adding a ramdisk needs 0x44 bytes in version 2008.10 */
|
|
|
|
#define FDT_RAMDISK_OVERHEAD 0x80
|
|
|
|
|
2007-03-31 11:59:59 -04:00
|
|
|
#endif /* _LIBFDT_ENV_H */
|