From 73451fdea266e24a3ce99e1bf41f49735dc62d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 6 Jan 2020 19:00:31 +0200 Subject: sb/intel/common: Add smbus_set_slave_addr() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7dddb61fab00e0f4f67d4eebee0cfe8dcd99f4ab Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/38230 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/southbridge/intel/lynxpoint/pch.h | 1 - src/southbridge/intel/lynxpoint/smbus.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'src/southbridge/intel/lynxpoint') diff --git a/src/southbridge/intel/lynxpoint/pch.h b/src/southbridge/intel/lynxpoint/pch.h index d83dd17275..71f42ea723 100644 --- a/src/southbridge/intel/lynxpoint/pch.h +++ b/src/southbridge/intel/lynxpoint/pch.h @@ -440,7 +440,6 @@ void mainboard_config_superio(void); #define PCH_SMBUS_DEV PCI_DEV(0, 0x1f, 3) #define SMB_BASE 0x20 #define HOSTC 0x40 -#define SMB_RCV_SLVA 0x09 /* HOSTC bits */ #define I2C_EN (1 << 2) diff --git a/src/southbridge/intel/lynxpoint/smbus.c b/src/southbridge/intel/lynxpoint/smbus.c index 24beaf2fde..ff659b837a 100644 --- a/src/southbridge/intel/lynxpoint/smbus.c +++ b/src/southbridge/intel/lynxpoint/smbus.c @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include "pch.h" @@ -38,7 +36,7 @@ static void pch_smbus_init(struct device *dev) /* Set Receive Slave Address */ res = find_resource(dev, PCI_BASE_ADDRESS_4); if (res) - outb(SMBUS_SLAVE_ADDR, res->base + SMB_RCV_SLVA); + smbus_set_slave_addr(res->base, SMBUS_SLAVE_ADDR); } static int lsmbus_read_byte(struct device *dev, u8 address) -- cgit v1.2.3