From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] imximage: header v2: Remove overwriting of flash_offset
Date: Wed, 22 Feb 2012 10:52:38 +0100 [thread overview]
Message-ID: <4F44BAE6.6030006@denx.de> (raw)
In-Reply-To: <4F44B81E.7070709@de.bosch.com>
On 22/02/2012 10:40, Dirk Behme wrote:
>> You must also fix this issue for V1 in set_imx_hdr_v1() as well, because
>> we do not want default value at all.
>
> Ok, the V1 topic is new.
>
> I can't touch V1 because I don't know anything about it. And I don't
> have any hardware to test anything V1 related.
>
It is enough if you add the same check in set_imx_hdr_v1() you want to
put in set_imx_hdr_v2().
> Even though the V1 code might have a similar issue, it's my
> understanding that it doesn't hurt there as in V1 there are no
> flash_offsets != FLASH_OFFSET_STANDARD.
This is not correct. For the MX51, there is a different offset for the
onenand device. But there is not a board booting from onenand in mainline.
However, we want that BOOT_FROM is mandatory to avoid confusion. All V1
boards in mainline have BOOT_FROM in their imximage file, so it is
enough to test if we can build the boards.
> Therefore in V1 the existing
> code works fine (?). Same as the V2 code before Freescale introduced
> flash offsets which are not FLASH_OFFSET_STANDARD (== 0x400).
It is the same with both versions - also with V1 there are different
offset, but SD / NAND / SPI share the same offset.
>
>> I suggest also you do not check
>> with if(imxhdr->flash_offset == 0), in case Freescale will put a SOC
>> without an offset in the future. But it is easy to add a value that is
>> not allowed. If we add something like
>>
>> FLASH_OFFSET_UNDEFINED = 0xFF
>>
>> or whatever you want that is not 32-bit aligned, we are on the safest
>> side.
>
> I will look where the correct location might be to add this.
Add it into imximage.h
Best regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
prev parent reply other threads:[~2012-02-22 9:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F44BAE6.6030006@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.