public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] imximage: header v2: Remove overwriting of flash_offset
@ 2012-02-21  9:02 Dirk Behme
  2012-02-21 17:57 ` Stefano Babic
  0 siblings, 1 reply; 8+ messages in thread
From: Dirk Behme @ 2012-02-21  9:02 UTC (permalink / raw)
  To: u-boot

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 <dirk.behme@de.bosch.com>
CC: Jason Liu <liu.h.jason@gmail.com>
CC: Stefano Babic <sbabic@denx.de>
---
 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));
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-02-22  9:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-21  9:02 [U-Boot] [PATCH] imximage: header v2: Remove overwriting of flash_offset Dirk Behme
2012-02-21 17:57 ` Stefano Babic
2012-02-21 19:18   ` Dirk Behme
2012-02-21 21:49     ` stefano babic
2012-02-22  8:14       ` Dirk Behme
2012-02-22  9:29         ` Stefano Babic
2012-02-22  9:40           ` Dirk Behme
2012-02-22  9:52             ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox