From: Tolunay Orkun <listmember@orkun.us>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Where does U-Boot's CFI driver check for top/bottom boot?
Date: Sat, 04 Nov 2006 23:51:47 -0600 [thread overview]
Message-ID: <454D7BF3.2000400@orkun.us> (raw)
In-Reply-To: <454B6B23.1060702@freescale.com>
(Resending as original mail bounced by mail list)
Timur Tabi wrote:
> Can someone point me to the code where the CFI driver checks if the flash is
> top-boot or bottom boot? The spec says that that information is in offset 1E
> of the Primary Vendor-Specific Extension Query Table, but I don't see any code
> that references that. Do I need to add an entry into flash.h for my part
> (29LV640BT)?
>
The code that you should be looking is flash_get_size(). Take a look at
the section of code that reads 4 bytes at (FLASH_OFFSET_ERASE_REGIONS +
i * 4) and after a computation sets erase_region_size. If you enable
DEBUG in U-Boot you should see the debug output there which prints the
size of each erase region. Can you do make clean and #define DEBUG and
rebuilt and reflash debug build of u-boot. This should enable those
debug output.
The current CFI driver is checking vendor specific extension query
table. It is only working with standard CFI tables. Vendor specific
tables can vary greatly from manufacturer to manufacturer and even from
model to model for the same manufacturer. This table is not easily
usable. I personally wouldn't want to add code looking to vendor
specific tables unless there is no other means that we can find this
information from the primary tables. For example, the top/bottom boot
code is not available on Intel vendor specific table for
top/bottom/uniform boot sector parts.
I just looked at the datasheet of your flash part as well as datasheet
of a couple of intel flash parts as well as the current code. As I
suspected for your particular part, it looks like they are using the
same values for "Erase Bank Area 1" and "Erase Bank Area 2" irrespective
of top boot or bottom boot flash. I think, this is fundamentally wrong
and non-compliant with the general CFI standard.
I will look at some AMD part datasheets. If this is generally available
on all AMD and AMD like parts, we can add it as a patch for AMD only.
Otherwise, we will either add CONFIG_GEOMETRY_REVERSED definition or
restrict a patch to specific vendor ids (and possibly part ids) which is
then a pain to manage.
Best regards,
Tolunay
next prev parent reply other threads:[~2006-11-05 5:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-03 16:15 [U-Boot-Users] Where does U-Boot's CFI driver check for top/bottom boot? Timur Tabi
[not found] ` <454BC9B3.8030806@orkun.us>
2006-11-04 10:03 ` Stefan Roese
2006-11-05 7:56 ` Tolunay Orkun
2006-11-05 9:31 ` Wolfgang Denk
2006-11-05 5:51 ` Tolunay Orkun [this message]
2006-11-05 7:44 ` Tolunay Orkun
2006-11-06 19:13 ` Timur Tabi
2006-11-06 22:00 ` Timur Tabi
-- strict thread matches above, loose matches on Subject: below --
2006-11-06 22:27 Yogi
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=454D7BF3.2000400@orkun.us \
--to=listmember@orkun.us \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox