Barnali Sarkar has posted comments on this change. ( https://review.coreboot.org/18557 )
Change subject: soc/intel/common/block: [WIP]Add Intel common FAST_SPI code ......................................................................
Patch Set 12:
(1 comment)
https://review.coreboot.org/#/c/18557/12/src/soc/intel/common/block/include/... File src/soc/intel/common/block/include/intelblocks/fast_spi.h:
Line 87: #define SPIBAR_HSFSTS_W1C_BITS (0xff)
Aside from not being used in this code, my point was that if you are creati
Okay, I think I got your point.
Just to clarify, in this fast_spi.h, there will be only the function/API declarations for the library. The users of this library will only include fast_spi.h then.
The MACROs will reside in a different header file (may be named as <IP_name>_def.h, i.e., fast_spi_def.h here), which will be ONLY included from inside fast_spi.c library file, not from the users of the fast_spi library.
In this way, these IP register definitions are not open to the users of the library and Wrapped inside the library code only. This is what you meant, right? Its a very nice approach indeed.