summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-07-13 23:38:29 +0200
committerWolfgang Denk <wd@denx.de>2009-07-13 23:38:29 +0200
commit9833865a2b84ad2bddb54fa9d896f0890be71797 (patch)
tree9e96f503b1fa8bd79e3f988cb941319fc2d17d57 /drivers
parent4b96cb6777d1dd9e69eabf14d41d3bb4bfc908ba (diff)
parent227ad917c5510f595bed29c996a3411b50118959 (diff)
downloadu-boot-imx-9833865a2b84ad2bddb54fa9d896f0890be71797.zip
u-boot-imx-9833865a2b84ad2bddb54fa9d896f0890be71797.tar.gz
u-boot-imx-9833865a2b84ad2bddb54fa9d896f0890be71797.tar.bz2
Merge branch 'master' of /home/wd/git/u-boot/custodians
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/cfi_flash.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index d0732f5..81ac5d3 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -835,14 +835,19 @@ static int flash_write_cfiword (flash_info_t * info, ulong dest,
break;
case CFI_CMDSET_AMD_EXTENDED:
case CFI_CMDSET_AMD_STANDARD:
-#ifdef CONFIG_FLASH_CFI_LEGACY
- case CFI_CMDSET_AMD_LEGACY:
-#endif
sect = find_sector(info, dest);
flash_unlock_seq (info, sect);
flash_write_cmd (info, sect, info->addr_unlock1, AMD_CMD_WRITE);
sect_found = 1;
break;
+#ifdef CONFIG_FLASH_CFI_LEGACY
+ case CFI_CMDSET_AMD_LEGACY:
+ sect = find_sector(info, dest);
+ flash_unlock_seq (info, 0);
+ flash_write_cmd (info, 0, info->addr_unlock1, AMD_CMD_WRITE);
+ sect_found = 1;
+ break;
+#endif
}
switch (info->portwidth) {