Hello Daniel Gröber,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/42116
to review the following change.
Change subject: spi/winbond: Rename bp4.srp0 to srp to follow datasheet naming ......................................................................
spi/winbond: Rename bp4.srp0 to srp to follow datasheet naming
The datasheets for 4-bit bp parts seem to call the two status register protection bits srp and srl instead of srp{0,1} because they have slightly different behaviour.
Change-Id: Ieca68d8628a2b0275d310ef5a77ffc76fe4dafe6 Signed-off-by: Daniel Gröber dxld@darkboxed.org --- M src/drivers/spi/winbond.c 1 file changed, 6 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/42116/1
diff --git a/src/drivers/spi/winbond.c b/src/drivers/spi/winbond.c index 51d43a8..f68d9d9 100644 --- a/src/drivers/spi/winbond.c +++ b/src/drivers/spi/winbond.c @@ -19,14 +19,14 @@ uint8_t tb : 1; uint8_t sec : 1; uint8_t srp0 : 1; - } bp3; + } bp3; /* for example: W25Q128FW */ struct { uint8_t busy : 1; uint8_t wel : 1; uint8_t bp : 4; uint8_t tb : 1; - uint8_t srp0 : 1; - } bp4; + uint8_t srp : 1; + } bp4; /* for example: W25Q256J */ };
union status_reg2 { @@ -326,7 +326,7 @@ .cmp = reg2.cmp, .tb = reg1.bp4.tb, .winbond = { - .srp = reg1.bp4.srp0, + .srp = reg1.bp4.srp, .srl = reg2.srp1, }, }; @@ -497,8 +497,8 @@ val.reg1.bp3.srp0 = bpbits.winbond.srp0; mask.reg1.bp3.srp0 = 1; } else { - val.reg1.bp4.srp0 = bpbits.winbond.srp0; - mask.reg1.bp4.srp0 = 1; + val.reg1.bp4.srp = bpbits.winbond.srp0; + mask.reg1.bp4.srp = 1; }
val.reg2.srp1 = bpbits.winbond.srp1;