From: Tolunay Orkun <listmember@orkun.us>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] flash protection code in cfi_flash
Date: Wed, 15 Mar 2006 19:13:05 -0600 [thread overview]
Message-ID: <4418BBA1.7090102@orkun.us> (raw)
In-Reply-To: <4dd15d180603150807x3ca2ab0bj7fec61d17d03cf6a@mail.gmail.com>
David Ho wrote:
>>> I'm looking at the flash protection code in the cfi_flash driver, can
>>> anyone tell me why it claims intel's unprotect unprotects all locking?
>>> Certainly my K3 flash can unlock on a per block basis.
>> Which exactl line(s) of code are you alking about?
>
> Inside flash_real_protect in cfi_flash.c from your gitweb.
> Line# 671 to 679
>
> If you haven't noticed this function has not changed since the intial commit.
> 5653fc335a450fa46d89989e1afe5e8bb9a0a52e
>
> If no one has any objection, I will remove the part of the code that
> relock each sector, for submission.
I do object!
First, That behavior is required because some Intel flash parts
incorrectly unlock all sectors (not just current sector) so after
unlocking the current sector we must redo the locking of all others that
were supposed to remain locked. Again, the comment in that code reflects
and explains this.
Secondly, AMD parts did not previously support real locking/unlocking so
CFG_FLASH_PROTECTION option (which is needed to get the code you are
talking) was not applicable for those parts. If that code now needs to
be fixed for other parts that has this capability, fix it without
breaking existing code.
Thirdly, even in its current form, has this code caused any problem at
all? It just unnecessarily re-locks all those sectors/blocks that are
supposed to remain locked wasting some time at the execution of "protect
off" command.
Best regards,
Tolunay
next prev parent reply other threads:[~2006-03-16 1:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-14 19:15 [U-Boot-Users] flash protection code in cfi_flash David Ho
2006-03-14 20:58 ` Wolfgang Denk
2006-03-15 16:07 ` David Ho
2006-03-16 1:13 ` Tolunay Orkun [this message]
2006-03-16 17:17 ` David Ho
2006-03-16 17:57 ` Tolunay Orkun
2006-03-16 18:55 ` David Ho
2006-03-16 19:10 ` David Ho
2006-03-16 19:59 ` David Ho
2006-03-17 9:00 ` Stefan Roese
2006-03-30 22:43 ` David Ho
2006-03-17 22:38 ` Tolunay Orkun
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=4418BBA1.7090102@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