summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2006-12-12 00:22:42 +0100
committerWolfgang Denk <wd@denx.de>2006-12-24 01:27:41 +0100
commitd784fdb05900ada3686d5778783e1fb328e9fb66 (patch)
treeb609504b10dcb45619f585a6d4bf6b3641f9a20b /drivers
parent1b3c360c235dc684ec06c2d5f183f0a282ce45e2 (diff)
downloadu-boot-imx-d784fdb05900ada3686d5778783e1fb328e9fb66.zip
u-boot-imx-d784fdb05900ada3686d5778783e1fb328e9fb66.tar.gz
u-boot-imx-d784fdb05900ada3686d5778783e1fb328e9fb66.tar.bz2
Fix cfi failure with Spansion Flash (Spansion Flash Devices have a different offset to go into CFI mode)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cfi_flash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/cfi_flash.c b/drivers/cfi_flash.c
index 9b10220..68a2c71 100644
--- a/drivers/cfi_flash.c
+++ b/drivers/cfi_flash.c
@@ -1149,6 +1149,7 @@ static int flash_detect_cfi (flash_info_t * info)
&& flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 1, 'R')
&& flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 2, 'Y')) {
info->interface = flash_read_ushort (info, 0, FLASH_OFFSET_INTERFACE);
+ info->cfi_offset=flash_offset_cfi[cfi_offset];
debug ("device interface is %d\n",
info->interface);
debug ("found port %d chip %d ",
@@ -1193,7 +1194,7 @@ ulong flash_get_size (ulong base, int banknum)
info->vendor = flash_read_ushort (info, 0,
FLASH_OFFSET_PRIMARY_VENDOR);
flash_read_jedec_ids (info);
- flash_write_cmd (info, 0, FLASH_OFFSET_CFI, FLASH_CMD_CFI);
+ flash_write_cmd (info, 0, info->cfi_offset, FLASH_CMD_CFI);
num_erase_regions = flash_read_uchar (info,
FLASH_OFFSET_NUM_ERASE_REGIONS);
info->ext_addr = flash_read_ushort (info, 0,