* [U-Boot] flash_real_protect() and CFI_CMDSET_AMD_STANDARD
@ 2010-05-14 19:17 Timur Tabi
2010-05-17 8:49 ` Stefan Roese
0 siblings, 1 reply; 2+ messages in thread
From: Timur Tabi @ 2010-05-14 19:17 UTC (permalink / raw)
To: u-boot
I'm trying to add support for AMD manufacturer ID to flash_real_protect().
The code currently does this:
case CFI_CMDSET_AMD_EXTENDED:
case CFI_CMDSET_AMD_STANDARD:
/* U-Boot only checks the first byte */
if (info->manufacturer_id == (uchar)ATM_MANUFACT) {
...
}
break;
Unfortunately, I don't really understand CFI programming that well, but from
my research, it appears to me that AMD chips that implement the AMD standard
command set will work with this code:
case CFI_CMDSET_INTEL_PROG_REGIONS:
case CFI_CMDSET_INTEL_STANDARD:
case CFI_CMDSET_INTEL_EXTENDED:
flash_write_cmd (info, sector, 0,
FLASH_CMD_CLEAR_STATUS);
flash_write_cmd (info, sector, 0, FLASH_CMD_PROTECT);
if (prot)
flash_write_cmd (info, sector, 0,
FLASH_CMD_PROTECT_SET);
else
flash_write_cmd (info, sector, 0,
FLASH_CMD_PROTECT_CLEAR);
break;
So I don't understand the need for Rafael Campos' patch:
http://lists.denx.de/pipermail/u-boot/2008-July/037419.html
It looks as if Rafael removed support for hardware flash protection from all
AMD standard/extended flash chips that are not made by Atmel.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot] flash_real_protect() and CFI_CMDSET_AMD_STANDARD
2010-05-14 19:17 [U-Boot] flash_real_protect() and CFI_CMDSET_AMD_STANDARD Timur Tabi
@ 2010-05-17 8:49 ` Stefan Roese
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2010-05-17 8:49 UTC (permalink / raw)
To: u-boot
Hi Timur,
On Friday 14 May 2010 21:17:44 Timur Tabi wrote:
> I'm trying to add support for AMD manufacturer ID to flash_real_protect().
> The code currently does this:
>
> case CFI_CMDSET_AMD_EXTENDED:
> case CFI_CMDSET_AMD_STANDARD:
> /* U-Boot only checks the first byte */
> if (info->manufacturer_id == (uchar)ATM_MANUFACT) {
> ...
> }
> break;
>
> Unfortunately, I don't really understand CFI programming that well, but
> from my research, it appears to me that AMD chips that implement the AMD
> standard command set will work with this code:
>
> case CFI_CMDSET_INTEL_PROG_REGIONS:
> case CFI_CMDSET_INTEL_STANDARD:
> case CFI_CMDSET_INTEL_EXTENDED:
> flash_write_cmd (info, sector, 0,
> FLASH_CMD_CLEAR_STATUS);
> flash_write_cmd (info, sector, 0, FLASH_CMD_PROTECT);
> if (prot)
> flash_write_cmd (info, sector, 0,
> FLASH_CMD_PROTECT_SET);
> else
> flash_write_cmd (info, sector, 0,
> FLASH_CMD_PROTECT_CLEAR);
> break;
Yes, you might be correct here. I have to admit that I never used
CONFIG_SYS_FLASH_PROTECTION on AMD/Spansion type FLASH chips though.
> So I don't understand the need for Rafael Campos' patch:
>
> http://lists.denx.de/pipermail/u-boot/2008-July/037419.html
>
> It looks as if Rafael removed support for hardware flash protection from
> all AMD standard/extended flash chips that are not made by Atmel.
Yes, it definitely looks that way. I have missed this. Thanks for looking into
this. It would be great if you could send a patch fixing this.
Thanks.
Cheers,
Stefan
--
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-17 8:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-14 19:17 [U-Boot] flash_real_protect() and CFI_CMDSET_AMD_STANDARD Timur Tabi
2010-05-17 8:49 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox