Jes Klinke has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44084 )
Change subject: soc/intel/common/block/gspi: Recalculate BAR after resource allocation ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44084/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/44084/1//COMMIT_MSG@10 PS1, Line 10: cached
Why it being cached?
I am not familiar with this code. I see that the logic in gspi_calc_base_addr() is non-trivial (it is the return value from this method that is being cached), but I do not know how expensive it is to evaluate in practice.
If we remove the caching and call gspi_calc_base_addr() directly in gspi_ctrlr_params_init(), then every CS assert/deassert, and every SPI transaction, will result in a new call to gspi_calc_base_addr(). I assume that the reason the caching was added was that doing without it was found to be too expensive.
Furquan, maybe you have additional insight.