summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/common/block/pcr/pcr.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/soc/intel/common/block/pcr/pcr.c b/src/soc/intel/common/block/pcr/pcr.c
index 03f0a0aec5..96b93ad37a 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 @@ void pcr_or8(uint8_t pid, uint16_t offset, uint8_t ordata)
#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 @@ static int pcr_wait_for_completion(struct device *dev)
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;