Make FEATURE_LONG_RESET a proper feature bit
This will make it possible to see at runtime if a chip
actually supports both reset methods.
Change-Id: Id5fb5af743215435dfc289105bdfcc5fd739eabb
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/435
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
diff --git a/jedec.c b/jedec.c
index d97736d..f3dfdd0 100644
--- a/jedec.c
+++ b/jedec.c
@@ -195,7 +195,7 @@
if (probe_timing_enter)
programmer_delay(probe_timing_enter);
/* Reset chip to a clean slate */
- if ((chip->feature_bits & FEATURE_RESET_MASK) == FEATURE_LONG_RESET)
+ if (chip->feature_bits & FEATURE_LONG_RESET)
{
chip_writeb(flash, 0xAA, bios + ((shifted ? 0x2AAA : 0x5555) & mask));
if (probe_timing_exit)
@@ -238,7 +238,7 @@
}
/* Issue JEDEC Product ID Exit command */
- if ((chip->feature_bits & FEATURE_RESET_MASK) == FEATURE_LONG_RESET)
+ if (chip->feature_bits & FEATURE_LONG_RESET)
{
chip_writeb(flash, 0xAA, bios + ((shifted ? 0x2AAA : 0x5555) & mask));
if (probe_timing_exit)