diff options
author | Angel Pons <th3fanbus@gmail.com> | 2021-04-17 12:08:15 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-04-19 06:41:53 +0000 |
commit | 24f4623384d372345e63051ec3a3c3724faa226f (patch) | |
tree | db6d9c9a84b2bd3b25434695de63b5bc288c23ed /src/soc/intel | |
parent | 60be9dbbc739e435510f563e9e69bc40293b1cad (diff) | |
download | coreboot-24f4623384d372345e63051ec3a3c3724faa226f.tar.gz coreboot-24f4623384d372345e63051ec3a3c3724faa226f.tar.bz2 coreboot-24f4623384d372345e63051ec3a3c3724faa226f.zip |
soc/intel/common/block/smbus: Define __SIMPLE_DEVICE__
Change-Id: I93f7918763d87f8fb50f39f9469694e73aeff37b
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52455
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Diffstat (limited to 'src/soc/intel')
-rw-r--r-- | src/soc/intel/common/block/smbus/tco.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/soc/intel/common/block/smbus/tco.c b/src/soc/intel/common/block/smbus/tco.c index 8ec24b67fe64..8cde3bf7f2e6 100644 --- a/src/soc/intel/common/block/smbus/tco.c +++ b/src/soc/intel/common/block/smbus/tco.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#define __SIMPLE_DEVICE__ + #include <arch/io.h> #include <device/pci_ops.h> #include <device/device.h> @@ -101,13 +103,7 @@ static void tco_enable_bar(void) { uint32_t reg32; uint16_t tcobase; -#if defined(__SIMPLE_DEVICE__) - int devfn = PCH_DEVFN_SMBUS; - pci_devfn_t dev = PCI_DEV(0, PCI_SLOT(devfn), PCI_FUNC(devfn)); -#else - struct device *dev; - dev = PCH_DEV_SMBUS; -#endif + const pci_devfn_t dev = PCH_DEV_SMBUS; /* Disable TCO in SMBUS Device first before changing Base Address */ reg32 = pci_read_config32(dev, TCOCTL); |