Commit 35058611 authored by Tokunori Ikegami's avatar Tokunori Ikegami Committed by Stefan Bader

mtd: cfi_cmdset_0002: Change definition naming to retry write operation

BugLink: https://bugs.launchpad.net/bugs/1784409

commit 85a82e28 upstream.

The definition can be used for other program and erase operations also.
So change the naming to MAX_RETRIES from MAX_WORD_RETRIES.
Signed-off-by: default avatarTokunori Ikegami <ikegami@allied-telesis.co.jp>
Reviewed-by: default avatarJoakim Tjernlund <Joakim.Tjernlund@infinera.com>
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
Cc: linux-mtd@lists.infradead.org
Cc: stable@vger.kernel.org
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 81c3fcaa
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#define AMD_BOOTLOC_BUG #define AMD_BOOTLOC_BUG
#define FORCE_WORD_WRITE 0 #define FORCE_WORD_WRITE 0
#define MAX_WORD_RETRIES 3 #define MAX_RETRIES 3
#define SST49LF004B 0x0060 #define SST49LF004B 0x0060
#define SST49LF040B 0x0050 #define SST49LF040B 0x0050
...@@ -1645,7 +1645,7 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip, ...@@ -1645,7 +1645,7 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
map_write( map, CMD(0xF0), chip->start ); map_write( map, CMD(0xF0), chip->start );
/* FIXME - should have reset delay before continuing */ /* FIXME - should have reset delay before continuing */
if (++retry_cnt <= MAX_WORD_RETRIES) if (++retry_cnt <= MAX_RETRIES)
goto retry; goto retry;
ret = -EIO; ret = -EIO;
...@@ -2104,7 +2104,7 @@ static int do_panic_write_oneword(struct map_info *map, struct flchip *chip, ...@@ -2104,7 +2104,7 @@ static int do_panic_write_oneword(struct map_info *map, struct flchip *chip,
map_write(map, CMD(0xF0), chip->start); map_write(map, CMD(0xF0), chip->start);
/* FIXME - should have reset delay before continuing */ /* FIXME - should have reset delay before continuing */
if (++retry_cnt <= MAX_WORD_RETRIES) if (++retry_cnt <= MAX_RETRIES)
goto retry; goto retry;
ret = -EIO; ret = -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment