From patchwork Tue Feb 21 09:02:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Behme Dirk (CM/ESO2)" X-Patchwork-Id: 142268 X-Patchwork-Delegate: sbabic@denx.de 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 13AF6B6FAB for ; Tue, 21 Feb 2012 20:02:29 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 789022810B; Tue, 21 Feb 2012 10:02:27 +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 sS4jiTaiDeB1; Tue, 21 Feb 2012 10:02:27 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 70D9F28115; Tue, 21 Feb 2012 10:02:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9188328115 for ; Tue, 21 Feb 2012 10:02:20 +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 E8umFFOdwxgs for ; Tue, 21 Feb 2012 10:02:20 +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 smtp2-v.fe.bosch.de (smtp2-v.fe.bosch.de [139.15.237.6]) by theia.denx.de (Postfix) with ESMTPS id 10D722810B for ; Tue, 21 Feb 2012 10:02:18 +0100 (CET) Received: from vsmta12.fe.internet.bosch.com (unknown [10.4.98.30]) by imta23.fe.bosch.de (Postfix) with ESMTP id EC142582081C for ; Tue, 21 Feb 2012 10:02:17 +0100 (CET) Received: from localhost (vsgw1.fe.internet.bosch.com [10.4.98.15]) by vsmta12.fe.internet.bosch.com (Postfix) with SMTP id D3B2612102A0 for ; Tue, 21 Feb 2012 10:02:17 +0100 (CET) Received: from SI-PUB1000.de.bosch.com (10.3.153.157) by si-hub03.de.bosch.com (10.3.144.92) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 21 Feb 2012 10:02:03 +0100 Received: from SI-HUB1001.de.bosch.com (10.4.103.108) by SI-PUB1000.de.bosch.com (10.3.153.157) with Microsoft SMTP Server (TLS) id 14.1.355.2; Tue, 21 Feb 2012 10:02:03 +0100 Received: from hi-z5661.hi.de.bosch.com (10.34.217.179) by SI-HUB1001.de.bosch.com (10.4.103.108) with Microsoft SMTP Server id 14.1.355.2; Tue, 21 Feb 2012 10:02:02 +0100 Received: from localhost.localdomain (localhost [127.0.0.1]) by hi-z5661.hi.de.bosch.com (Postfix) with ESMTP id 548FB42F51; Tue, 21 Feb 2012 10:02:02 +0100 (CET) From: Dirk Behme To: Date: Tue, 21 Feb 2012 10:02:00 +0100 Message-ID: <1329814920-12295-1-git-send-email-dirk.behme@de.bosch.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 Cc: Dirk Behme Subject: [U-Boot] [PATCH] imximage: header v2: Remove overwriting of flash_offset 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The flash header v2 supports different flash offsets for different boot devices. E.g. parallel NOR or OneNAND use a different offset than FLASH_OFFSET_STANDARD (== 0x400). The flash offset is correctly read from the configuration in parse_cfg_cmd(). But is then overwritten wrongly in set_imx_hdr_v2(). Fix this by removing this overwriting. Use the flash offset correclty read from the configuration, instead. Signed-off-by: Dirk Behme CC: Jason Liu CC: Stefano Babic --- tools/imximage.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/tools/imximage.c b/tools/imximage.c index 1e0f5d4..e9947f1 100644 --- a/tools/imximage.c +++ b/tools/imximage.c @@ -253,9 +253,6 @@ static void set_imx_hdr_v2(struct imx_header *imxhdr, uint32_t dcd_len, imx_header_v2_t *hdr_v2 = &imxhdr->header.hdr_v2; flash_header_v2_t *fhdr_v2 = &hdr_v2->fhdr; - /* Set default offset */ - imxhdr->flash_offset = FLASH_OFFSET_STANDARD; - /* Set magic number */ fhdr_v2->header.tag = IVT_HEADER_TAG; /* 0xD1 */ fhdr_v2->header.length = cpu_to_be16(sizeof(flash_header_v2_t));