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>
This commit is contained in:
Angel Pons 2021-04-17 12:25:23 +02:00 committed by Michael Niewöhner
parent 8a10aff35a
commit 6205e03828
1 changed files with 4 additions and 10 deletions

View File

@ -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;