sb/intel/common: Add smbus_set_slave_addr()

Change-Id: I7dddb61fab00e0f4f67d4eebee0cfe8dcd99f4ab
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38230
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki
2020-01-06 19:00:31 +02:00
parent 7cdcc38f29
commit 73451fdea2
17 changed files with 14 additions and 33 deletions

View File

@ -24,7 +24,6 @@
#include <soc/iomap.h>
#include <soc/ramstage.h>
#include <soc/smbus.h>
#include <southbridge/intel/common/smbus.h>
#include <device/smbus_host.h>
static void pch_smbus_init(struct device *dev)
@ -40,7 +39,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)