arm: a37xx: pci: Fix a3700_fdt_fix_pcie_regions() function
[pandora-u-boot.git] / tools / mkimage.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2000-2004
4  * DENX Software Engineering
5  * Wolfgang Denk, wd@denx.de
6  */
7
8 #ifndef _MKIIMAGE_H_
9 #define _MKIIMAGE_H_
10
11 #include "os_support.h"
12 #include <errno.h>
13 #include <fcntl.h>
14 #include <stdio.h>
15 #include <stdlib.h>
16 #include <string.h>
17 #include <sys/stat.h>
18 #include <time.h>
19 #include <unistd.h>
20 #include <u-boot/sha1.h>
21 #include "fdt_host.h"
22 #include "imagetool.h"
23
24 #undef MKIMAGE_DEBUG
25
26 #ifdef MKIMAGE_DEBUG
27 #define debug(fmt,args...)      printf (fmt ,##args)
28 #else
29 #define debug(fmt,args...)
30 #endif /* MKIMAGE_DEBUG */
31
32 #define log_debug(fmt, args...) debug(fmt, ##args)
33
34 static inline void *map_sysmem(ulong paddr, unsigned long len)
35 {
36         return (void *)(uintptr_t)paddr;
37 }
38
39 static inline ulong map_to_sysmem(void *ptr)
40 {
41         return (ulong)(uintptr_t)ptr;
42 }
43
44 #define MKIMAGE_TMPFILE_SUFFIX          ".tmp"
45 #define MKIMAGE_MAX_TMPFILE_LEN         256
46 #define MKIMAGE_DEFAULT_DTC_OPTIONS     "-I dts -O dtb -p 500"
47 #define MKIMAGE_MAX_DTC_CMDLINE_LEN     2 * MKIMAGE_MAX_TMPFILE_LEN + 35
48
49 #endif /* _MKIIMAGE_H_ */