From patchwork Thu Jan 10 14:58:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 211037 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 8CF232C00D8 for ; Fri, 11 Jan 2013 02:00:10 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 569DA4A1AE; Thu, 10 Jan 2013 16:00:01 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hXJkQspY3vu5; Thu, 10 Jan 2013 16:00:01 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4A6E04A174; Thu, 10 Jan 2013 15:59:11 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 02CE84A161 for ; Thu, 10 Jan 2013 15:59:02 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jvkRWUzIKxJi for ; Thu, 10 Jan 2013 15:59:01 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-we0-f201.google.com (mail-we0-f201.google.com [74.125.82.201]) by theia.denx.de (Postfix) with ESMTPS id BBA5B4A13B for ; Thu, 10 Jan 2013 15:58:57 +0100 (CET) Received: by mail-we0-f201.google.com with SMTP id t11so45841wey.0 for ; Thu, 10 Jan 2013 06:58:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=Kfr4ikzq3u0R/HUGkLf7A32APgk/9vWYl+pDGYQ0Lp0=; b=WP7o/DaIk8QH8cy4GtOrklHmQEARX12+3Xi858pV0bZHUywws8fjtPp2wQpoQXo6gn IGnoSRRtF14pc+PxFfY2TxE5wAEKXzVaXYHKMMgb1c5NW2oLqETd0zK4H+BZlXJniZJk t+x59y8+EaYfFJ0cL0CUTgpMGg+ntzePESoikuSeXfcs7j186TvfkiRMsI0zlTUcuSWm 2gHlEOo9vmHzn8eWlesy5+jv2WSGKCKTXonsHygrVyKe6/CactI7+hjQ3Wc5L786tfHA A5q+/DardeVaZRiri6sW46gyVJcTLu/wOHsBY45PJKQu9io46HTaqEsijU3yyUW1Pef2 0O0w== X-Received: by 10.14.224.201 with SMTP id x49mr90546408eep.5.1357829937146; Thu, 10 Jan 2013 06:58:57 -0800 (PST) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id g9si1223166eeo.1.2013.01.10.06.58.56 (version=TLSv1 cipher=AES128-SHA bits=128/128); Thu, 10 Jan 2013 06:58:57 -0800 (PST) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by hpza10.eem.corp.google.com (Postfix) with ESMTP id 9929A20006C; Thu, 10 Jan 2013 06:58:56 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id C00BD160EFE; Thu, 10 Jan 2013 06:58:55 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Thu, 10 Jan 2013 06:58:16 -0800 Message-Id: <1357829905-6579-14-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1357829905-6579-1-git-send-email-sjg@chromium.org> References: <1357829905-6579-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQmsEIVEc4fnBXbO5cqCqztK9I24BgT9y49AkQNx2p+dYzScCd3/aZZu0Yl5lVtttaip7RWriNzP9dIeGudTjX5HrfDEOFBQ9A+o0uxaHn/EgzcHdalneuE5YV2/Qd25PfnjGv8U5AV9Lq9laGxaJRvqwlAIgv53b7DrgpaLNXs8ufzS/JXVVhyrFvy/vjajfw0bUHdx Cc: Joe Hershberger , Tom Rini , Vadim Bendebury Subject: [U-Boot] [RFC PATCH 13/22] mkimage: Add map_sysmem() and IH_ARCH_DEFAULT to simplfy building X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- tools/mkimage.h | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/tools/mkimage.h b/tools/mkimage.h index d82be17..1d9984e 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