Attention is currently required from: Nico Huber, Subrata Banik, Angel Pons, Anastasia Klimchuk. Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62894 )
Change subject: ichspi: Rename HSFC_FDBC -> HSFC_FDBC_MASK ......................................................................
Patch Set 5:
(1 comment)
File ichspi.c:
https://review.coreboot.org/c/flashrom/+/62894/comment/78c3765c_71be11b7 PS4, 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,