Attention is currently required from: Nico Huber, Subrata Banik, Angel Pons, Anastasia Klimchuk.
View Change
1 comment:
File ichspi.c:
Patch Set #4, Line 508: FDBC
I have one more question :)
First argument in `_pprint_reg` is `bit` (not `reg` as it is for `pprint_reg`). So should it be FDBC instead of HSFC, since you are replacing one function with the other?
The first argument is to present the name of the register IMO (looking at line 499 and 504 as other usage of _pprint_reg macro) and this is how it works
#include <stdio.h>
#define HSFC_FDBC_OFF 8 /* 8-13: Flash Data Byte Count */
#define HSFC_FDBC_MASK (0x3f << HSFC_FDBC_OFF)
#define _pprint_reg(bit, mask, off, val, sep) printf("%s=%d" sep, #bit, (val & mask) >> off)
int main()
{
int reg_val = 0x1234;
_pprint_reg(HSFC, HSFC_FDBC_MASK, HSFC_FDBC_OFF, reg_val, ",");
return 0;
}
output:
HSFC=18,
To view, visit change 62894. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ia0ae9a586b5c12f0229334898426175ec246a70c
Gerrit-Change-Number: 62894
Gerrit-PatchSet: 5
Gerrit-Owner: Subrata Banik <subratabanik@google.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-CC: Subrata Banik <subi.banik@gmail.com>
Gerrit-Attention: Nico Huber <nico.h@gmx.de>
Gerrit-Attention: Subrata Banik <subratabanik@google.com>
Gerrit-Attention: Angel Pons <th3fanbus@gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Comment-Date: Thu, 24 Mar 2022 18:40:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Subrata Banik <subratabanik@google.com>
Comment-In-Reply-To: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-MessageType: comment