diff options
author | Antonello Dettori <dev@dettori.io> | 2016-11-08 18:44:46 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-03-26 04:33:19 +0200 |
commit | fb94dcf5d5846de9b0709edd1ee22ef00277a7d2 (patch) | |
tree | 4120f50deac16fdc9bf8bf34d6e90c3732e585b6 /src | |
parent | 5ef5c00704ac902f33f52e8daa4f3167cf1000ba (diff) |
soc/intel/fsp_baytrail: transition away from device_t
Replace the use of the old device_t definition inside
soc/intel/fsp_baytrail.
Change-Id: I2791346289c04049e6f032c8e120e4be9ba6657f
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17319
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/fsp_baytrail/include/soc/acpi.h | 3 | ||||
-rw-r--r-- | src/soc/intel/fsp_baytrail/pmutil.c | 4 | ||||
-rw-r--r-- | src/soc/intel/fsp_baytrail/smihandler.c | 2 | ||||
-rw-r--r-- | src/soc/intel/fsp_baytrail/spi.c | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/src/soc/intel/fsp_baytrail/include/soc/acpi.h b/src/soc/intel/fsp_baytrail/include/soc/acpi.h index 7dfec72c55..388ebc29ed 100644 --- a/src/soc/intel/fsp_baytrail/include/soc/acpi.h +++ b/src/soc/intel/fsp_baytrail/include/soc/acpi.h @@ -26,9 +26,12 @@ void acpi_create_serialio_ssdt(acpi_header_t *ssdt); void acpi_fill_in_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt); unsigned long acpi_madt_irq_overrides(unsigned long current); void acpi_init_gnvs(global_nvs_t *gnvs); + +#ifndef __SIMPLE_DEVICE__ unsigned long southcluster_write_acpi_tables(device_t device, unsigned long current, struct acpi_rsdp *rsdp); void southcluster_inject_dsdt(device_t device); +#endif #endif /* _BAYTRAIL_ACPI_H_ */ diff --git a/src/soc/intel/fsp_baytrail/pmutil.c b/src/soc/intel/fsp_baytrail/pmutil.c index 3759174346..a5884122d6 100644 --- a/src/soc/intel/fsp_baytrail/pmutil.c +++ b/src/soc/intel/fsp_baytrail/pmutil.c @@ -24,9 +24,9 @@ #if defined(__SMM__) -static const device_t pcu_dev = PCI_DEV(0, PCU_DEV, 0); +static const pci_devfn_t pcu_dev = PCI_DEV(0, PCU_DEV, 0); -static inline device_t get_pcu_dev(void) +static inline pci_devfn_t get_pcu_dev(void) { return pcu_dev; } diff --git a/src/soc/intel/fsp_baytrail/smihandler.c b/src/soc/intel/fsp_baytrail/smihandler.c index 8b0c8477ca..48c828be66 100644 --- a/src/soc/intel/fsp_baytrail/smihandler.c +++ b/src/soc/intel/fsp_baytrail/smihandler.c @@ -67,7 +67,7 @@ static void busmaster_disable_on_bus(int bus) for (slot = 0; slot < 0x20; slot++) { for (func = 0; func < 8; func++) { u32 reg32; - device_t dev = PCI_DEV(bus, slot, func); + pci_devfn_t dev = PCI_DEV(bus, slot, func); val = pci_read_config32(dev, PCI_VENDOR_ID); diff --git a/src/soc/intel/fsp_baytrail/spi.c b/src/soc/intel/fsp_baytrail/spi.c index dee7440ef6..409e796daf 100644 --- a/src/soc/intel/fsp_baytrail/spi.c +++ b/src/soc/intel/fsp_baytrail/spi.c @@ -251,12 +251,13 @@ static void read_reg(const void *src, void *value, uint32_t size) static ich9_spi_regs *spi_regs(void) { - device_t dev; uint32_t sbase; #ifdef __SMM__ + pci_devfn_t dev; dev = PCI_DEV(0, LPC_DEV, LPC_FUNC); #else + device_t dev; dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC)); #endif pci_read_config_dword(dev, SBASE, &sbase); |