summaryrefslogtreecommitdiffstats
path: root/drivers/nor/cfi_flash_amd.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2010-11-27 00:59:39 +0800
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2010-12-03 01:53:14 +0800
commit0df2a8d2632715b3fa4d27a632c2527d99904180 (patch)
treeb346ddcf84098b9f494fad9e60215b2a9cb0e178 /drivers/nor/cfi_flash_amd.c
parent04191aa0fc14eb01a750641343e5e0b98d7725c6 (diff)
downloadbarebox-0df2a8d2632715b3fa4d27a632c2527d99904180.tar.gz
barebox-0df2a8d2632715b3fa4d27a632c2527d99904180.tar.xz
cfi_flash: move reset command assigment to specific chipset init function
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'drivers/nor/cfi_flash_amd.c')
-rw-r--r--drivers/nor/cfi_flash_amd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/nor/cfi_flash_amd.c b/drivers/nor/cfi_flash_amd.c
index 738389cce5..f2257571fa 100644
--- a/drivers/nor/cfi_flash_amd.c
+++ b/drivers/nor/cfi_flash_amd.c
@@ -16,6 +16,7 @@ static void flash_unlock_seq (struct flash_info *info)
*/
static void amd_read_jedec_ids (struct flash_info *info)
{
+ info->cmd_reset = AMD_CMD_RESET;
info->manufacturer_id = 0;
info->device_id = 0;
info->device_id2 = 0;
@@ -38,7 +39,7 @@ static void amd_read_jedec_ids (struct flash_info *info)
info->addr_unlock2 = 0x555;
}
- flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
+ flash_write_cmd(info, 0, 0, info->cmd_reset);
flash_unlock_seq(info);
flash_write_cmd(info, 0, info->addr_unlock1, FLASH_CMD_READ_ID);
udelay(1000); /* some flash are slow to respond */
@@ -54,7 +55,7 @@ static void amd_read_jedec_ids (struct flash_info *info)
info->device_id2 |= flash_read_uchar (info,
FLASH_OFFSET_DEVICE_ID3);
}
- flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
+ flash_write_cmd(info, 0, 0, info->cmd_reset);
}
static int flash_toggle (struct flash_info *info, flash_sect_t sect, uint offset, uchar cmd)