mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-04-27 16:51:31 +00:00
Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash
This commit is contained in:
commit
2141ece5c1
1 changed files with 10 additions and 3 deletions
|
@ -1357,6 +1357,7 @@ int flash_real_protect (flash_info_t * info, long sector, int prot)
|
||||||
switch (info->vendor) {
|
switch (info->vendor) {
|
||||||
case CFI_CMDSET_INTEL_PROG_REGIONS:
|
case CFI_CMDSET_INTEL_PROG_REGIONS:
|
||||||
case CFI_CMDSET_INTEL_STANDARD:
|
case CFI_CMDSET_INTEL_STANDARD:
|
||||||
|
case CFI_CMDSET_INTEL_EXTENDED:
|
||||||
flash_write_cmd (info, sector, 0,
|
flash_write_cmd (info, sector, 0,
|
||||||
FLASH_CMD_CLEAR_STATUS);
|
FLASH_CMD_CLEAR_STATUS);
|
||||||
flash_write_cmd (info, sector, 0, FLASH_CMD_PROTECT);
|
flash_write_cmd (info, sector, 0, FLASH_CMD_PROTECT);
|
||||||
|
@ -1369,9 +1370,6 @@ int flash_real_protect (flash_info_t * info, long sector, int prot)
|
||||||
break;
|
break;
|
||||||
case CFI_CMDSET_AMD_EXTENDED:
|
case CFI_CMDSET_AMD_EXTENDED:
|
||||||
case CFI_CMDSET_AMD_STANDARD:
|
case CFI_CMDSET_AMD_STANDARD:
|
||||||
#ifdef CONFIG_FLASH_CFI_LEGACY
|
|
||||||
case CFI_CMDSET_AMD_LEGACY:
|
|
||||||
#endif
|
|
||||||
/* U-Boot only checks the first byte */
|
/* U-Boot only checks the first byte */
|
||||||
if (info->manufacturer_id == (uchar)ATM_MANUFACT) {
|
if (info->manufacturer_id == (uchar)ATM_MANUFACT) {
|
||||||
if (prot) {
|
if (prot) {
|
||||||
|
@ -1392,6 +1390,15 @@ int flash_real_protect (flash_info_t * info, long sector, int prot)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#ifdef CONFIG_FLASH_CFI_LEGACY
|
||||||
|
case CFI_CMDSET_AMD_LEGACY:
|
||||||
|
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);
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((retcode =
|
if ((retcode =
|
||||||
|
|
Loading…
Add table
Reference in a new issue