--- zzzz-none-000/linux-2.6.39.4/drivers/mtd/chips/cfi_cmdset_0001.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/drivers/mtd/chips/cfi_cmdset_0001.c 2021-11-10 13:23:10.000000000 +0000 @@ -17,6 +17,13 @@ * - auto unlock sectors on resume for auto locking flash on power up */ +/****************************************************************** + + Includes Intel Corporation's changes/modifications dated: 07/2011. + Changed/modified portions - Copyright(c) 2011, Intel Corporation. + +******************************************************************/ + #include #include #include @@ -765,6 +772,13 @@ case FL_STATUS: for (;;) { +#ifdef CONFIG_ARCH_GEN3 + /* Add issuing READ STATUS command before reading + * flash status to guarantee the status read is + * correct. + */ + map_write(map, CMD(0x70), adr); +#endif status = map_read(map, adr); if (map_word_andequal(map, status, status_OK, status_OK)) break; @@ -2090,6 +2104,12 @@ } xip_enable(map, chip, adr); + +#ifdef CONFIG_ARCH_GEN3 + // Intel specs require this call. Because I don't know how xip works I simply add this call. It shouldn't harm + map_write(map, CMD(0xFF), adr); +#endif + out: put_chip(map, chip, adr); mutex_unlock(&chip->mutex); return ret;