diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-01-06 19:00:31 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-01-09 21:31:31 +0000 |
commit | 73451fdea266e24a3ce99e1bf41f49735dc62d28 (patch) | |
tree | 96b29d28afcfc25e7cedf4e410a56df049248ce4 /src/southbridge/intel/common | |
parent | 7cdcc38f292d7a8ffd285d17c848e60e41eec759 (diff) |
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>
Diffstat (limited to 'src/southbridge/intel/common')
-rw-r--r-- | src/southbridge/intel/common/smbus.c | 5 | ||||
-rw-r--r-- | src/southbridge/intel/common/smbus.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/southbridge/intel/common/smbus.c b/src/southbridge/intel/common/smbus.c index f6805ad50f..d253ae7e04 100644 --- a/src/southbridge/intel/common/smbus.c +++ b/src/southbridge/intel/common/smbus.c @@ -101,6 +101,11 @@ void smbus_host_reset(uintptr_t base) host_and_or(base, SMBHSTSTAT, 0xff, 0); } +void smbus_set_slave_addr(uintptr_t base, u8 slave_address) +{ + host_outb(base, SMB_RCV_SLVA, slave_address); +} + static int host_completed(u8 status) { if (status & SMBHSTSTS_HOST_BUSY) diff --git a/src/southbridge/intel/common/smbus.h b/src/southbridge/intel/common/smbus.h index 20443e1060..e72203e46e 100644 --- a/src/southbridge/intel/common/smbus.h +++ b/src/southbridge/intel/common/smbus.h @@ -32,4 +32,6 @@ #define SMBUS_PIN_CTL 0xf #define SMBSLVCMD 0x11 +#define SMB_RCV_SLVA SMBTRNSADD + #endif |