Anastasia Klimchuk has uploaded this change for review.

View Change

dummyflasher: Fix JEDEC_WRSR2 and JEDEC_WRSR3 emulation

JEDEC_WRSR already emulated STATUS1 and STATUS2 correctly, but
JEDEC_WRSR2 and JEDEC_WRSR3 were handled by a different case branch.

Change-Id: Ia0e51a9b8dbd1f67cb947e3ec73f64b6d30cbb97
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
---
M dummyflasher.c
1 file changed, 2 insertions(+), 2 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/90/79390/1
diff --git a/dummyflasher.c b/dummyflasher.c
index cf4ca03..efe5720 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -605,7 +605,7 @@

ro_bits = get_reg_ro_bit_mask(data, STATUS2);
data->emu_status[1] &= ro_bits;
- data->emu_status[1] |= (writearr[1] & ~ro_bits);
+ data->emu_status[1] |= (writearr[2] & ~ro_bits);

msg_pdbg2("WRSR2 wrote 0x%02x.\n", data->emu_status[1]);

@@ -621,7 +621,7 @@

ro_bits = get_reg_ro_bit_mask(data, STATUS3);
data->emu_status[2] &= ro_bits;
- data->emu_status[2] |= (writearr[1] & ~ro_bits);
+ data->emu_status[2] |= (writearr[3] & ~ro_bits);

msg_pdbg2("WRSR3 wrote 0x%02x.\n", data->emu_status[2]);
break;

To view, visit change 79390. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ia0e51a9b8dbd1f67cb947e3ec73f64b6d30cbb97
Gerrit-Change-Number: 79390
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-MessageType: newchange