Commit d784fdb05900ada3686d5778783e1fb328e9fb66
Committed by
Wolfgang Denk
1 parent
1b3c360c23
Exists in
master
and in
54 other branches
Fix cfi failure with Spansion Flash (Spansion Flash Devices have a different off…
…set to go into CFI mode)
Showing 2 changed files with 3 additions and 1 deletions Side-by-side Diff
drivers/cfi_flash.c
... | ... | @@ -1149,6 +1149,7 @@ |
1149 | 1149 | && flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 1, 'R') |
1150 | 1150 | && flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 2, 'Y')) { |
1151 | 1151 | info->interface = flash_read_ushort (info, 0, FLASH_OFFSET_INTERFACE); |
1152 | + info->cfi_offset=flash_offset_cfi[cfi_offset]; | |
1152 | 1153 | debug ("device interface is %d\n", |
1153 | 1154 | info->interface); |
1154 | 1155 | debug ("found port %d chip %d ", |
... | ... | @@ -1193,7 +1194,7 @@ |
1193 | 1194 | info->vendor = flash_read_ushort (info, 0, |
1194 | 1195 | FLASH_OFFSET_PRIMARY_VENDOR); |
1195 | 1196 | flash_read_jedec_ids (info); |
1196 | - flash_write_cmd (info, 0, FLASH_OFFSET_CFI, FLASH_CMD_CFI); | |
1197 | + flash_write_cmd (info, 0, info->cfi_offset, FLASH_CMD_CFI); | |
1197 | 1198 | num_erase_regions = flash_read_uchar (info, |
1198 | 1199 | FLASH_OFFSET_NUM_ERASE_REGIONS); |
1199 | 1200 | info->ext_addr = flash_read_ushort (info, 0, |
include/flash.h