diff options
author | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2022-02-14 16:04:21 -0700 |
---|---|---|
committer | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2022-03-07 18:06:24 +0000 |
commit | 6b8599f29a888c0946ff44e97c32ecd4cec2a151 (patch) | |
tree | ca38ae8682e63f5abc66e9475798b5614a05c0fe /src/mainboard | |
parent | f019d986b154cb95db541be9c71eafde51ec9294 (diff) |
drivers/tpm/spi: Refactor out some cr50-specific logic
Mainboards accessing the cr50 over an I2C bus may want to reuse some of
the same firmware version and BOARD_CFG logic, therefore refactor this
logic out into a bus-agnostic file, drivers/tpm/cr50.c. This file uses
the new tis_vendor_read/write() functions in order to access the cr50
regardless of the bus which is physically used. In order to leave SPI
devices intact, the tis_vendor_* functions are added to the SPI driver.
BUG=b:202246591
TEST=boot to OS on google/dratini, see the same FW version and board_cfg
console prints as before the change.
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ie68618cbe026a2b9221f93d0fe41d0b2054e8091
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61977
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/dedede/mainboard.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/volteer/mainboard.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mainboard/google/dedede/mainboard.c b/src/mainboard/google/dedede/mainboard.c index 700b3e368a..ca5a21c83b 100644 --- a/src/mainboard/google/dedede/mainboard.c +++ b/src/mainboard/google/dedede/mainboard.c @@ -4,7 +4,7 @@ #include <baseboard/variants.h> #include <console/console.h> #include <device/device.h> -#include <drivers/spi/tpm/tpm.h> +#include <drivers/tpm/cr50.h> #include <ec/ec.h> #include <security/tpm/tss.h> #include <soc/soc_chip.h> diff --git a/src/mainboard/google/volteer/mainboard.c b/src/mainboard/google/volteer/mainboard.c index 95b9ce755a..7089dddc02 100644 --- a/src/mainboard/google/volteer/mainboard.c +++ b/src/mainboard/google/volteer/mainboard.c @@ -3,7 +3,7 @@ #include <console/console.h> #include <baseboard/variants.h> #include <device/device.h> -#include <drivers/spi/tpm/tpm.h> +#include <drivers/tpm/cr50.h> #include <ec/ec.h> #include <fw_config.h> #include <gpio.h> |