cfi_flash: return device into read array mode after reading status
authorVasily Khoruzhick <anarsoul@gmail.com>
Mon, 21 Mar 2016 01:37:10 +0000 (18:37 -0700)
committerTom Rini <trini@konsulko.com>
Sun, 27 Mar 2016 13:13:02 +0000 (09:13 -0400)
Otherwise flash remains in read status mode and it's not possible
to access data on flash.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
drivers/mtd/cfi_flash.c

index 39932f46478eff7253720538443cc1279884a3af..18831c62e75527ac6f19a2bb12d1d81698ae3d62 100644 (file)
@@ -2203,6 +2203,8 @@ ulong flash_get_size (phys_addr_t base, int banknum)
                                                flash_isset (info, sect_cnt,
                                                             FLASH_OFFSET_PROTECT,
                                                             FLASH_STATUS_PROTECT);
+                                       flash_write_cmd(info, sect_cnt, 0,
+                                                       FLASH_CMD_RESET);
                                        break;
                                case CFI_CMDSET_AMD_EXTENDED:
                                case CFI_CMDSET_AMD_STANDARD: