diff options
author | Angel Pons <th3fanbus@gmail.com> | 2021-04-17 12:12:52 +0200 |
---|---|---|
committer | Michael Niewöhner <foss@mniewoehner.de> | 2021-04-19 10:44:40 +0000 |
commit | fc8e997caadf9caf9ad127ebd34a568707dd515d (patch) | |
tree | 81115095795c35147909ae0108982605d08fe249 /src/soc/intel | |
parent | 1ee8e8e0de4dd88e27279dbff071e853511e13e9 (diff) | |
download | coreboot-fc8e997caadf9caf9ad127ebd34a568707dd515d.tar.xz |
soc/intel/braswell/smbus.c: Define __SIMPLE_DEVICE__
Change-Id: Ic16fd74d4ddf96e29bcdada671dab0e590af74ef
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52456
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r-- | src/soc/intel/braswell/smbus.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/soc/intel/braswell/smbus.c b/src/soc/intel/braswell/smbus.c index 11a30634a7..733c1594c9 100644 --- a/src/soc/intel/braswell/smbus.c +++ b/src/soc/intel/braswell/smbus.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#define __SIMPLE_DEVICE__ + #include <soc/iomap.h> #include <soc/pci_devs.h> #include <device/pci_def.h> @@ -10,11 +12,8 @@ int smbus_i2c_block_write(u8 addr, u8 bytes, u8 *buf) { -#ifdef __SIMPLE_DEVICE__ - pci_devfn_t dev = PCI_DEV(0, SMBUS_DEV, SMBUS_FUNC); -#else - struct device *dev = pcidev_on_root(SMBUS_DEV, SMBUS_FUNC); -#endif + const pci_devfn_t dev = PCI_DEV(0, SMBUS_DEV, SMBUS_FUNC); + u32 smbase; u32 smb_ctrl_reg; int status; |