Michael Niewöhner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/52458 )
Change subject: soc/intel/common/block/pcr: Define __SIMPLE_DEVICE__ ......................................................................
soc/intel/common/block/pcr: Define __SIMPLE_DEVICE__
Change-Id: I06f9c623947e48a7213e42507f4da51c12b425d7 Signed-off-by: Angel Pons th3fanbus@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/52458 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Tim Wawrzynczak twawrzynczak@chromium.org Reviewed-by: Michael Niewöhner foss@mniewoehner.de --- M src/soc/intel/common/block/pcr/pcr.c 1 file changed, 4 insertions(+), 10 deletions(-)
Approvals: build bot (Jenkins): Verified Tim Wawrzynczak: Looks good to me, approved Michael Niewöhner: Looks good to me, approved
diff --git a/src/soc/intel/common/block/pcr/pcr.c b/src/soc/intel/common/block/pcr/pcr.c index 03f0a0a..96b93ad 100644 --- a/src/soc/intel/common/block/pcr/pcr.c +++ b/src/soc/intel/common/block/pcr/pcr.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#define __SIMPLE_DEVICE__ + #include <device/mmio.h> #include <assert.h> #include <console/console.h> @@ -208,11 +210,7 @@
#if !CONFIG(PCR_COMMON_IOSF_1_0)
-#ifdef __SIMPLE_DEVICE__ -static int pcr_wait_for_completion(pci_devfn_t dev) -#else -static int pcr_wait_for_completion(struct device *dev) -#endif +static int pcr_wait_for_completion(const pci_devfn_t dev) { struct stopwatch sw;
@@ -245,11 +243,7 @@ int pcr_execute_sideband_msg(struct pcr_sbi_msg *msg, uint32_t *data, uint8_t *response) { -#if defined(__SIMPLE_DEVICE__) - pci_devfn_t dev = PCH_DEV_P2SB; -#else - struct device *dev = PCH_DEV_P2SB; -#endif + const pci_devfn_t dev = PCH_DEV_P2SB; uint32_t sbi_data; uint16_t sbi_status; uint16_t sbi_rid;