diff options
author | Simon Glass <sjg@chromium.org> | 2013-05-16 13:53:20 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-06-04 16:06:31 -0400 |
commit | 2434c66da041d3c79addde0077eeccb8fceee6e1 (patch) | |
tree | d28715662d09b110975e40e502da69dbfad6d0b9 | |
parent | a2cc9bf4c121c3ab7be73a9e12f3d3abab6fa81d (diff) | |
download | u-boot-imx-2434c66da041d3c79addde0077eeccb8fceee6e1.zip u-boot-imx-2434c66da041d3c79addde0077eeccb8fceee6e1.tar.gz u-boot-imx-2434c66da041d3c79addde0077eeccb8fceee6e1.tar.bz2 |
mkimage: Add map_sysmem() and IH_ARCH_DEFAULT to simplfy building
These are not actually used in mkimage itself, but the image code (which
is common with mkimage) does use them. To avoid #ifdefs in the image code
just for mkimage, define dummy version of these here. The compiler will
eliminate the dead code anyway.
A better way to handle this might be to split out more things from common.h
so that mkimage can include them. At present any file that mkimage uses
has to be very careful what headers it includes.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | tools/mkimage.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/mkimage.h b/tools/mkimage.h index e07a615..03c6c8f 100644 --- a/tools/mkimage.h +++ b/tools/mkimage.h @@ -44,12 +44,24 @@ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +static inline void *map_sysmem(ulong paddr, unsigned long len) +{ + return (void *)(uintptr_t)paddr; +} + +static inline ulong map_to_sysmem(void *ptr) +{ + return (ulong)(uintptr_t)ptr; +} + #define MKIMAGE_TMPFILE_SUFFIX ".tmp" #define MKIMAGE_MAX_TMPFILE_LEN 256 #define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500" #define MKIMAGE_MAX_DTC_CMDLINE_LEN 512 #define MKIMAGE_DTC "dtc" /* assume dtc is in $PATH */ +#define IH_ARCH_DEFAULT IH_ARCH_INVALID + /* * This structure defines all such variables those are initialized by * mkimage main core and need to be referred by image type specific |