diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2018-06-10 23:36:44 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-06-14 09:29:31 +0000 |
commit | c8a649c08f92d4d2255626da4e1cd7a6d71469e7 (patch) | |
tree | 14a899738d09b37030585aca3b59344595208e36 /src/soc/intel | |
parent | 846b4941fee842bc359fa2b611cf0c3fc4f158b2 (diff) |
src: Use of device_t is deprecated
Change-Id: I9cebfc5c77187bd81094031c43ff6df094908417
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27010
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r-- | src/soc/intel/apollolake/bootblock/bootblock.c | 4 | ||||
-rw-r--r-- | src/soc/intel/apollolake/smihandler.c | 2 | ||||
-rw-r--r-- | src/soc/intel/baytrail/pmutil.c | 8 | ||||
-rw-r--r-- | src/soc/intel/baytrail/smihandler.c | 2 | ||||
-rw-r--r-- | src/soc/intel/baytrail/spi.c | 5 | ||||
-rw-r--r-- | src/soc/intel/braswell/pmutil.c | 8 | ||||
-rw-r--r-- | src/soc/intel/braswell/smihandler.c | 2 | ||||
-rw-r--r-- | src/soc/intel/braswell/spi.c | 5 | ||||
-rw-r--r-- | src/soc/intel/cannonlake/bootblock/pch.c | 2 | ||||
-rw-r--r-- | src/soc/intel/cannonlake/bootblock/report_platform.c | 10 | ||||
-rw-r--r-- | src/soc/intel/cannonlake/smihandler.c | 7 | ||||
-rw-r--r-- | src/soc/intel/cannonlake/smmrelocate.c | 2 | ||||
-rw-r--r-- | src/soc/intel/fsp_baytrail/pmutil.c | 4 | ||||
-rw-r--r-- | src/soc/intel/fsp_baytrail/spi.c | 2 |
14 files changed, 31 insertions, 32 deletions
diff --git a/src/soc/intel/apollolake/bootblock/bootblock.c b/src/soc/intel/apollolake/bootblock/bootblock.c index 81843a4217..c7ababd216 100644 --- a/src/soc/intel/apollolake/bootblock/bootblock.c +++ b/src/soc/intel/apollolake/bootblock/bootblock.c @@ -50,7 +50,7 @@ static void tpm_enable(void) asmlinkage void bootblock_c_entry(uint64_t base_timestamp) { - device_t dev; + pci_devfn_t dev; bootblock_systemagent_early_init(); @@ -75,7 +75,7 @@ asmlinkage void bootblock_c_entry(uint64_t base_timestamp) static void enable_pmcbar(void) { - device_t pmc = PCH_DEV_PMC; + pci_devfn_t pmc = PCH_DEV_PMC; /* Set PMC base addresses and enable decoding. */ pci_write_config32(pmc, PCI_BASE_ADDRESS_0, PMC_BAR0); diff --git a/src/soc/intel/apollolake/smihandler.c b/src/soc/intel/apollolake/smihandler.c index 5b28db20e5..4acd7cbc2e 100644 --- a/src/soc/intel/apollolake/smihandler.c +++ b/src/soc/intel/apollolake/smihandler.c @@ -22,7 +22,7 @@ #include <soc/pci_devs.h> #include <soc/pm.h> -int smihandler_soc_disable_busmaster(device_t dev) +int smihandler_soc_disable_busmaster(pci_devfn_t dev) { if (dev == PCH_DEV_PMC) return 0; diff --git a/src/soc/intel/baytrail/pmutil.c b/src/soc/intel/baytrail/pmutil.c index ee99917594..30e6d1d94b 100644 --- a/src/soc/intel/baytrail/pmutil.c +++ b/src/soc/intel/baytrail/pmutil.c @@ -26,9 +26,9 @@ #if defined(__SIMPLE_DEVICE__) -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; } @@ -37,8 +37,8 @@ static inline device_t get_pcu_dev(void) #include <device/device.h> #include <device/pci.h> -static device_t pcu_dev; -static device_t get_pcu_dev(void) +static struct device *pcu_dev; +static struct device *get_pcu_dev(void) { if (pcu_dev == NULL) pcu_dev = dev_find_slot(0, PCI_DEVFN(PCU_DEV, 0)); diff --git a/src/soc/intel/baytrail/smihandler.c b/src/soc/intel/baytrail/smihandler.c index 683bf30b86..c2227394b0 100644 --- a/src/soc/intel/baytrail/smihandler.c +++ b/src/soc/intel/baytrail/smihandler.c @@ -69,7 +69,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/baytrail/spi.c b/src/soc/intel/baytrail/spi.c index 918e6d6134..c42b398594 100644 --- a/src/soc/intel/baytrail/spi.c +++ b/src/soc/intel/baytrail/spi.c @@ -264,13 +264,12 @@ static void ich_set_bbar(uint32_t minaddr) static ich9_spi_regs *spi_regs(void) { - device_t dev; uint32_t sbase; #ifdef __SMM__ - dev = PCI_DEV(0, LPC_DEV, LPC_FUNC); + pci_devfn_t dev = PCI_DEV(0, LPC_DEV, LPC_FUNC); #else - dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC)); + struct device *dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC)); #endif pci_read_config_dword(dev, SBASE, &sbase); sbase &= ~0x1ff; diff --git a/src/soc/intel/braswell/pmutil.c b/src/soc/intel/braswell/pmutil.c index 18e655c1b3..5f078dfbcf 100644 --- a/src/soc/intel/braswell/pmutil.c +++ b/src/soc/intel/braswell/pmutil.c @@ -27,9 +27,9 @@ #if defined(__SIMPLE_DEVICE__) -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; } @@ -38,8 +38,8 @@ static inline device_t get_pcu_dev(void) #include <device/device.h> #include <device/pci.h> -static device_t pcu_dev; -static device_t get_pcu_dev(void) +static struct device *pcu_dev; +static struct device *get_pcu_dev(void) { if (pcu_dev == NULL) pcu_dev = dev_find_slot(0, PCI_DEVFN(PCU_DEV, 0)); diff --git a/src/soc/intel/braswell/smihandler.c b/src/soc/intel/braswell/smihandler.c index 0f5c7c98c3..edbb766109 100644 --- a/src/soc/intel/braswell/smihandler.c +++ b/src/soc/intel/braswell/smihandler.c @@ -70,7 +70,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/braswell/spi.c b/src/soc/intel/braswell/spi.c index b9e1627d15..f2d178d11a 100644 --- a/src/soc/intel/braswell/spi.c +++ b/src/soc/intel/braswell/spi.c @@ -233,13 +233,12 @@ static void read_reg(void *src, void *value, uint32_t size) static ich9_spi_regs *spi_regs(void) { - device_t dev; uint32_t sbase; #if ENV_SMM - dev = PCI_DEV(0, LPC_DEV, LPC_FUNC); + pci_devfn_t dev = PCI_DEV(0, LPC_DEV, LPC_FUNC); #else - dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC)); + struct device *dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC)); #endif if (!dev) { printk(BIOS_ERR, "%s: PCI device not found", __func__); diff --git a/src/soc/intel/cannonlake/bootblock/pch.c b/src/soc/intel/cannonlake/bootblock/pch.c index 8e4f7fd81e..dc70a4f6c7 100644 --- a/src/soc/intel/cannonlake/bootblock/pch.c +++ b/src/soc/intel/cannonlake/bootblock/pch.c @@ -52,7 +52,7 @@ static void enable_p2sbbar(void) { - device_t dev = PCH_DEV_P2SB; + pci_devfn_t dev = PCH_DEV_P2SB; /* Enable PCR Base address in PCH */ pci_write_config32(dev, PCI_BASE_ADDRESS_0, CONFIG_PCR_BASE_ADDRESS); diff --git a/src/soc/intel/cannonlake/bootblock/report_platform.c b/src/soc/intel/cannonlake/bootblock/report_platform.c index c81e53435c..a2cd864cf3 100644 --- a/src/soc/intel/cannonlake/bootblock/report_platform.c +++ b/src/soc/intel/cannonlake/bootblock/report_platform.c @@ -69,12 +69,12 @@ static struct { { PCI_DEVICE_ID_INTEL_CNL_GT2_ULT_4, "Cannonlake ULT GT0.5" }, }; -static uint8_t get_dev_revision(device_t dev) +static uint8_t get_dev_revision(pci_devfn_t dev) { return pci_read_config8(dev, PCI_REVISION_ID); } -static uint16_t get_dev_id(device_t dev) +static uint16_t get_dev_id(pci_devfn_t dev) { return pci_read_config16(dev, PCI_DEVICE_ID); } @@ -140,7 +140,7 @@ static void report_cpu_info(void) static void report_mch_info(void) { int i; - device_t dev = SA_DEV_ROOT; + pci_devfn_t dev = SA_DEV_ROOT; uint16_t mchid = get_dev_id(dev); uint8_t mch_revision = get_dev_revision(dev); const char *mch_type = "Unknown"; @@ -159,7 +159,7 @@ static void report_mch_info(void) static void report_pch_info(void) { int i; - device_t dev = PCH_DEV_LPC; + pci_devfn_t dev = PCH_DEV_LPC; uint16_t lpcid = get_dev_id(dev); const char *pch_type = "Unknown"; @@ -176,7 +176,7 @@ static void report_pch_info(void) static void report_igd_info(void) { int i; - device_t dev = SA_DEV_IGD; + pci_devfn_t dev = SA_DEV_IGD; uint16_t igdid = get_dev_id(dev); const char *igd_type = "Unknown"; diff --git a/src/soc/intel/cannonlake/smihandler.c b/src/soc/intel/cannonlake/smihandler.c index ba010aaa60..0ecc66df02 100644 --- a/src/soc/intel/cannonlake/smihandler.c +++ b/src/soc/intel/cannonlake/smihandler.c @@ -35,7 +35,8 @@ const struct smm_save_state_ops *get_smm_save_state_ops(void) return &em64t101_smm_ops; } -static void pch_configure_endpoints(device_t dev, int epmask_id, uint32_t mask) +static void pch_configure_endpoints(pci_devfn_t dev, int epmask_id, + uint32_t mask) { uint32_t reg32; @@ -43,7 +44,7 @@ static void pch_configure_endpoints(device_t dev, int epmask_id, uint32_t mask) pci_write_config32(dev, PCH_P2SB_EPMASK(epmask_id), reg32 | mask); } -static void disable_sideband_access(device_t dev) +static void disable_sideband_access(pci_devfn_t dev) { u8 reg8; uint32_t mask; @@ -60,7 +61,7 @@ static void disable_sideband_access(device_t dev) static void pch_disable_heci(void) { - device_t dev = PCH_DEV_P2SB; + pci_devfn_t dev = PCH_DEV_P2SB; struct pcr_sbi_msg msg = { .pid = PID_CSME0, .offset = 0, diff --git a/src/soc/intel/cannonlake/smmrelocate.c b/src/soc/intel/cannonlake/smmrelocate.c index 83330e6ba6..3c60ef2b34 100644 --- a/src/soc/intel/cannonlake/smmrelocate.c +++ b/src/soc/intel/cannonlake/smmrelocate.c @@ -255,7 +255,7 @@ static void setup_ied_area(struct smm_relocation_params *params) void smm_info(uintptr_t *perm_smbase, size_t *perm_smsize, size_t *smm_save_state_size) { - device_t dev = SA_DEV_ROOT; + struct device *dev = SA_DEV_ROOT; printk(BIOS_DEBUG, "Setting up SMI for CPU\n"); diff --git a/src/soc/intel/fsp_baytrail/pmutil.c b/src/soc/intel/fsp_baytrail/pmutil.c index a5884122d6..33ecc09488 100644 --- a/src/soc/intel/fsp_baytrail/pmutil.c +++ b/src/soc/intel/fsp_baytrail/pmutil.c @@ -35,8 +35,8 @@ static inline pci_devfn_t get_pcu_dev(void) #include <device/device.h> #include <device/pci.h> -static device_t pcu_dev; -static device_t get_pcu_dev(void) +static struct device *pcu_dev; +static struct device *get_pcu_dev(void) { if (pcu_dev == NULL) pcu_dev = dev_find_slot(0, PCI_DEVFN(PCU_DEV, 0)); diff --git a/src/soc/intel/fsp_baytrail/spi.c b/src/soc/intel/fsp_baytrail/spi.c index 6787dcbe18..d8b1d55397 100644 --- a/src/soc/intel/fsp_baytrail/spi.c +++ b/src/soc/intel/fsp_baytrail/spi.c @@ -259,7 +259,7 @@ static ich9_spi_regs *spi_regs(void) pci_devfn_t dev; dev = PCI_DEV(0, LPC_DEV, LPC_FUNC); #else - device_t dev; + struct device *dev; dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC)); #endif pci_read_config_dword(dev, SBASE, &sbase); |