e7505/i82801dx: Use common code for early SMBus
While it looks different, the early SMBus code for this southbridge is still the same. In addition, this code was not checking the vendor ID before. It is assumed that adding this check does not pose a problem. Change-Id: I95ae4db399ce5592cefca82fa75f349220023b8c Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42006 Reviewed-by: Patrick Rudolph <siro@das-labor.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
7a2cb35262
commit
1659724375
|
@ -6,6 +6,7 @@ config SOUTHBRIDGE_INTEL_I82801DX
|
||||||
select IOAPIC
|
select IOAPIC
|
||||||
select HAVE_SMI_HANDLER
|
select HAVE_SMI_HANDLER
|
||||||
select SOUTHBRIDGE_INTEL_COMMON_SMBUS
|
select SOUTHBRIDGE_INTEL_COMMON_SMBUS
|
||||||
|
select SOUTHBRIDGE_INTEL_COMMON_EARLY_SMBUS
|
||||||
select SOUTHBRIDGE_INTEL_COMMON_RTC
|
select SOUTHBRIDGE_INTEL_COMMON_RTC
|
||||||
select SOUTHBRIDGE_INTEL_COMMON_RESET
|
select SOUTHBRIDGE_INTEL_COMMON_RESET
|
||||||
select SOUTHBRIDGE_INTEL_COMMON_USB_DEBUG
|
select SOUTHBRIDGE_INTEL_COMMON_USB_DEBUG
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
#include <device/pci_ops.h>
|
|
||||||
#include <device/pci_def.h>
|
|
||||||
#include <device/smbus_host.h>
|
#include <device/smbus_host.h>
|
||||||
#include "i82801dx.h"
|
#include "i82801dx.h"
|
||||||
|
|
||||||
|
@ -9,22 +7,3 @@ void i82801dx_early_init(void)
|
||||||
{
|
{
|
||||||
enable_smbus();
|
enable_smbus();
|
||||||
}
|
}
|
||||||
|
|
||||||
uintptr_t smbus_base(void)
|
|
||||||
{
|
|
||||||
return CONFIG_FIXED_SMBUS_IO_BASE;
|
|
||||||
}
|
|
||||||
|
|
||||||
int smbus_enable_iobar(uintptr_t base)
|
|
||||||
{
|
|
||||||
pci_devfn_t dev = PCI_DEV(0x0, 0x1f, 0x3);
|
|
||||||
|
|
||||||
/* set smbus iobase */
|
|
||||||
pci_write_config32(dev, 0x20, base | 1);
|
|
||||||
/* Set smbus enable */
|
|
||||||
pci_write_config8(dev, 0x40, 0x01);
|
|
||||||
/* Set smbus iospace enable */
|
|
||||||
pci_write_config16(dev, 0x4, 0x01);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue