From: "Leon Woestenberg" <leon.woestenberg@gmail.com>
To: "Haavard Skinnemoen" <haavard.skinnemoen@atmel.com>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: AT49BV6416 has swapped erase regions
Date: Sat, 4 Oct 2008 13:41:50 +0200 [thread overview]
Message-ID: <c384c5ea0810040441u77ebf879i8c4a2be8675ca26c@mail.gmail.com> (raw)
In-Reply-To: <20080930142207.72d5edaa@hskinnemo-gx745.norway.atmel.com>
Hello Haavard, all,
this topic has now diverted to u-boot, as Linux is fixed. I am
posting in the existing thread to keep the information coherent.
On Tue, Sep 30, 2008 at 2:22 PM, Haavard Skinnemoen
<haavard.skinnemoen@atmel.com> wrote:
> "Leon Woestenberg" <leon.woestenberg@gmail.com> wrote:
>> Haavard,
>> On Tue, Sep 30, 2008 at 1:55 PM, Haavard Skinnemoen
>> <haavard.skinnemoen@atmel.com> wrote:
>> > The CFI information read from AT49BV6416 lists the erase regions in the
>> > wrong order, causing problems when trying to erase or update the first
>> > or last 64K block.
>> >
>> Are there other Atmel designs with this bug or only the chip with this CFI ID?
>
> That's a good question. I guess there may be others in the same family
> with the same bug. I don't really know.
>
> The replacement, AT49BV642D, does not have this bug.
>
>> I ask, because the check in u-boot is too generic; I found u-boot
>> wrongly assumes wrong order for another Atmel part, not checking on a
>> specific CFI ID.
>
> That's interesting...especially since u-boot only reads the low byte
> of the JEDEC ID, so adding a fixup for one particular ID may match tons
> of chips with 16-bit IDs.
>
> I'll have to check the latest u-boot and see if it breaks any of my
> boards.
>
I just checked on a custom design, AP7000 with AT49BV320DT, which
reports its top boot bit correctly.
info->device_id == c4 for this part.
The u-boot flash_fixup_atmel() currently reverses geometry whenever
the top boot bit is set, which seems wrong:
I have to force this to zero to make that custom board work in this
piece of code:
/* Check the "top boot" bit in the PRI */
if (info->ext_addr && !(flash_read_uchar(info, info->ext_addr + 6) & 1))
reverse_geometry = 1;
I was hesitating to come up with a patch, because some of the check is
#ifdef'd out, and I may have missed
a u-boot convention that I should layout my sectors as
bottom-boot-block in u-boot, and reverse_geometry if 'top'?
Indeed the single byte ID check may need attention. I have to lookup
the CFI specs to be sure.
Regards,
--
Leon
prev parent reply other threads:[~2008-10-04 11:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-30 11:55 Haavard Skinnemoen
2008-09-30 12:02 ` Leon Woestenberg
2008-09-30 12:22 ` Haavard Skinnemoen
2008-10-04 11:41 ` Leon Woestenberg [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=c384c5ea0810040441u77ebf879i8c4a2be8675ca26c@mail.gmail.com \
--to=leon.woestenberg@gmail.com \
--cc=haavard.skinnemoen@atmel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/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
all inboxes | Powered by JetHome®