Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/47655 )
Change subject: it85spi.c: Refactor singleton states into reentrant pattern ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/c/flashrom/+/47655/11/it85spi.c File it85spi.c:
https://review.coreboot.org/c/flashrom/+/47655/11/it85spi.c@77 PS11, Line 77: unsigned int shm_io_base;
Similar to the `const` case, the compiler is doing its job correctly, so let's think about what it i […]
Let's not forget that this code is currently disabled (built, but not executed), because it can result in unpredictable behavior. I tried it years ago on an HP G62 laptop with an ITE IT8502E EC, and while it was able to detect the flash chip on the EC, the laptop powered itself off after a few seconds.
I wouldn't remove the ifdef around `shm_io_base` in this patch, to avoid doing too many things in a single commit. Ideally, the preprocessor shouldn't exist, and the access mode should be configurable at runtime. This can (and should) be done in a separate commit, if there's interest.