summaryrefslogtreecommitdiff
path: root/drivers/cfi_flash.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2005-01-09 17:12:27 +0000
committerwdenk <wdenk>2005-01-09 17:12:27 +0000
commita1191902cab72b9f7127365fac39a1e1d5c9abda (patch)
tree2baffb8ff9c965e0bdaaa4f047a4a3b21aff27a3 /drivers/cfi_flash.c
parent15c7a8efd2f7275e5b3249aac305f2598a998645 (diff)
downloadu-boot-imx-a1191902cab72b9f7127365fac39a1e1d5c9abda.zip
u-boot-imx-a1191902cab72b9f7127365fac39a1e1d5c9abda.tar.gz
u-boot-imx-a1191902cab72b9f7127365fac39a1e1d5c9abda.tar.bz2
* Patch by Jon Loeliger, 02 Sep 2004:
Reset monitor size back to 256 so environment can be written to flash on MPC85xx ADS and CDS releases. * Patch by Paolo Broggini, 02 Sep 2004: Make BSS clearing on ARM systems more robust * Patch by Yue Hu and Joe, 01 Sep 2004: - add PCI support for ixp425; - add EEPRO100 suppor tfor ixdp425 board. * Fix problem with protected sector detection in driver/cfi_flash.c
Diffstat (limited to 'drivers/cfi_flash.c')
-rw-r--r--drivers/cfi_flash.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/cfi_flash.c b/drivers/cfi_flash.c
index 4ced810..101eb74 100644
--- a/drivers/cfi_flash.c
+++ b/drivers/cfi_flash.c
@@ -1066,10 +1066,22 @@ static ulong flash_get_size (ulong base, int banknum)
for (j = 0; j < erase_region_count; j++) {
info->start[sect_cnt] = sector;
sector += (erase_region_size * size_ratio);
- info->protect[sect_cnt] =
- flash_isset (info, sect_cnt,
- FLASH_OFFSET_PROTECT,
- FLASH_STATUS_PROTECT);
+
+ /*
+ * Only read protection status from supported devices (intel...)
+ */
+ switch (info->vendor) {
+ case CFI_CMDSET_INTEL_EXTENDED:
+ case CFI_CMDSET_INTEL_STANDARD:
+ info->protect[sect_cnt] =
+ flash_isset (info, sect_cnt,
+ FLASH_OFFSET_PROTECT,
+ FLASH_STATUS_PROTECT);
+ break;
+ default:
+ info->protect[sect_cnt] = 0; /* default: not protected */
+ }
+
sect_cnt++;
}
}