diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2024-11-06 01:57:18 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-11-12 15:41:11 +0000 |
commit | 95d8edadcb33cad63460db1176ab565d087f4930 (patch) | |
tree | d3ac4dc85c3b6ce97ab6f0a35f3695c21bd5dd66 /src/include | |
parent | 8c9e6a1f1daead0a0a0d7b9ca2f7af2d49b8d0b3 (diff) |
drivers/spi: add RPMC info to spi_flash struct
Fill 'rpmc_caps' struct inside the 'spi_flash' struct with the RPMC info
from the SFDP table.
TEST=On a board with a W74M12JW SPI flash chip, the 'rpmc_caps' struct
has the expected entries (RPMC available, OP2 extended status as polling
method, 4 RPMC counters, OP1 is 0x9b, and OP2 is 0x96).
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3a8332bffe93e1691f6fc87c3936025f158f3ab9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85009
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/spi_flash.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/spi_flash.h b/src/include/spi_flash.h index 7736a940f5..76c33be5ea 100644 --- a/src/include/spi_flash.h +++ b/src/include/spi_flash.h @@ -95,6 +95,14 @@ struct spi_flash_protection_ops { struct spi_flash_part_id; +struct spi_flash_rpmc_cap { + bool rpmc_available; + bool poll_op2_ext_stat; + unsigned int number_of_counters; + uint8_t op1_write_cmd; + uint8_t op2_read_cmd; +}; + struct spi_flash { struct spi_slave spi; u8 vendor; @@ -118,6 +126,7 @@ struct spi_flash { /* If !NULL all protection callbacks exist. */ const struct spi_flash_protection_ops *prot_ops; const struct spi_flash_part_id *part; + struct spi_flash_rpmc_cap rpmc_caps; }; void lb_spi_flash(struct lb_header *header); |