Explorar o código

Merge branch 'master' of /home/wd/git/u-boot/custodians

Wolfgang Denk %!s(int64=16) %!d(string=hai) anos
pai
achega
9833865a2b
Modificáronse 1 ficheiros con 8 adicións e 3 borrados
  1. 8 3
      drivers/mtd/cfi_flash.c

+ 8 - 3
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) {