summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2018-05-25 12:56:45 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2018-06-04 02:35:42 +0000
commit143fb46d47f8450d91820cf8f5ec6d9f524e8e49 (patch)
tree72f6066fe150a7cefdd71f3eaf6335760645befe
parent06e8315292bd550c986c0a93158480bd6756f73c (diff)
downloadcoreboot-143fb46d47f8450d91820cf8f5ec6d9f524e8e49.tar.xz
soc/intel/skylake: Get rid of device_t
Use of device_t has been abandoned in ramstage. Change-Id: Idf00c029331aba30c8bfca71546cad62ff6bb0a7 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/26541 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/soc/intel/skylake/acpi.c8
-rw-r--r--src/soc/intel/skylake/chip.c4
-rw-r--r--src/soc/intel/skylake/chip_fsp20.c4
-rw-r--r--src/soc/intel/skylake/cpu.c14
-rw-r--r--src/soc/intel/skylake/include/soc/acpi.h4
-rw-r--r--src/soc/intel/skylake/irq.c2
-rw-r--r--src/soc/intel/skylake/smmrelocate.c4
-rw-r--r--src/soc/intel/skylake/vr_config.c2
8 files changed, 21 insertions, 21 deletions
diff --git a/src/soc/intel/skylake/acpi.c b/src/soc/intel/skylake/acpi.c
index 43487c477e..be1200b681 100644
--- a/src/soc/intel/skylake/acpi.c
+++ b/src/soc/intel/skylake/acpi.c
@@ -495,13 +495,13 @@ static void generate_p_state_entries(int core, int cores_per_package)
acpigen_pop_len();
}
-void generate_cpu_entries(device_t device)
+void generate_cpu_entries(struct device *device)
{
int core_id, cpu_id, pcontrol_blk = ACPI_BASE_ADDRESS, plen = 6;
int totalcores = dev_count_cpu();
int cores_per_package = get_cores_per_package();
int numcpus = totalcores/cores_per_package;
- device_t dev = SA_DEV_ROOT;
+ struct device *dev = SA_DEV_ROOT;
config_t *config = dev->chip_info;
int is_s0ix_enable = config->s0ix_enable;
int max_c_state;
@@ -629,7 +629,7 @@ unsigned long acpi_madt_irq_overrides(unsigned long current)
return current;
}
-unsigned long southbridge_write_acpi_tables(device_t device,
+unsigned long southbridge_write_acpi_tables(struct device *device,
unsigned long current,
struct acpi_rsdp *rsdp)
{
@@ -640,7 +640,7 @@ unsigned long southbridge_write_acpi_tables(device_t device,
return acpi_align_current(current);
}
-void southbridge_inject_dsdt(device_t device)
+void southbridge_inject_dsdt(struct device *device)
{
global_nvs_t *gnvs;
diff --git a/src/soc/intel/skylake/chip.c b/src/soc/intel/skylake/chip.c
index bb2ecaa744..1e3fdc6fd2 100644
--- a/src/soc/intel/skylake/chip.c
+++ b/src/soc/intel/skylake/chip.c
@@ -39,7 +39,7 @@ void soc_fsp_load(void)
fsp_load();
}
-static void pci_domain_set_resources(device_t dev)
+static void pci_domain_set_resources(struct device *dev)
{
assign_resources(dev->link_list);
}
@@ -60,7 +60,7 @@ static struct device_operations cpu_bus_ops = {
#endif
};
-static void soc_enable(device_t dev)
+static void soc_enable(struct device *dev)
{
/* Set the operations if it is a special bus type */
if (dev->path.type == DEVICE_PATH_DOMAIN)
diff --git a/src/soc/intel/skylake/chip_fsp20.c b/src/soc/intel/skylake/chip_fsp20.c
index a4867ea46f..bc78586019 100644
--- a/src/soc/intel/skylake/chip_fsp20.c
+++ b/src/soc/intel/skylake/chip_fsp20.c
@@ -50,7 +50,7 @@ void soc_fsp_load(void)
fsps_load(romstage_handoff_is_resume());
}
-static void pci_domain_set_resources(device_t dev)
+static void pci_domain_set_resources(struct device *dev)
{
assign_resources(dev->link_list);
}
@@ -75,7 +75,7 @@ static struct device_operations cpu_bus_ops = {
#endif
};
-static void soc_enable(device_t dev)
+static void soc_enable(struct device *dev)
{
/* Set the operations if it is a special bus type */
if (dev->path.type == DEVICE_PATH_DOMAIN)
diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c
index d9e90d2df4..d386d1f957 100644
--- a/src/soc/intel/skylake/cpu.c
+++ b/src/soc/intel/skylake/cpu.c
@@ -119,7 +119,7 @@ void set_power_limits(u8 power_limit_1_time)
unsigned int power_unit;
unsigned int tdp, min_power, max_power, max_time, tdp_pl2;
u8 power_limit_1_val;
- device_t dev = SA_DEV_ROOT;
+ struct device *dev = SA_DEV_ROOT;
config_t *conf = dev->chip_info;
if (power_limit_1_time > ARRAY_SIZE(power_limit_time_sec_to_msr))
@@ -241,7 +241,7 @@ void set_power_limits(u8 power_limit_1_time)
static void configure_thermal_target(void)
{
- device_t dev = SA_DEV_ROOT;
+ struct device *dev = SA_DEV_ROOT;
config_t *conf = dev->chip_info;
msr_t msr;
@@ -261,7 +261,7 @@ static void configure_thermal_target(void)
static void configure_isst(void)
{
- device_t dev = SA_DEV_ROOT;
+ struct device *dev = SA_DEV_ROOT;
config_t *conf = dev->chip_info;
msr_t msr;
@@ -287,7 +287,7 @@ static void configure_isst(void)
static void configure_misc(void)
{
- device_t dev = SA_DEV_ROOT;
+ struct device *dev = SA_DEV_ROOT;
config_t *conf = dev->chip_info;
msr_t msr;
@@ -419,7 +419,7 @@ static void enable_pm_timer_emulation(void)
}
/* All CPUs including BSP will run the following function. */
-void soc_core_init(device_t cpu)
+void soc_core_init(struct device *cpu)
{
/* Clear out pending MCEs */
/* TODO(adurbin): This should only be done on a cold boot. Also, some
@@ -544,7 +544,7 @@ void cpu_lock_sgx_memory(void)
int soc_fill_sgx_param(struct sgx_param *sgx_param)
{
- device_t dev = SA_DEV_ROOT;
+ struct device *dev = SA_DEV_ROOT;
assert(dev != NULL);
config_t *conf = dev->chip_info;
@@ -558,7 +558,7 @@ int soc_fill_sgx_param(struct sgx_param *sgx_param)
}
int soc_fill_vmx_param(struct vmx_param *vmx_param)
{
- device_t dev = SA_DEV_ROOT;
+ struct device *dev = SA_DEV_ROOT;
assert(dev != NULL);
config_t *conf = dev->chip_info;
diff --git a/src/soc/intel/skylake/include/soc/acpi.h b/src/soc/intel/skylake/include/soc/acpi.h
index 6d492acd67..c39c06627b 100644
--- a/src/soc/intel/skylake/include/soc/acpi.h
+++ b/src/soc/intel/skylake/include/soc/acpi.h
@@ -29,8 +29,8 @@
void acpi_fill_in_fadt(acpi_fadt_t *fadt);
unsigned long acpi_madt_irq_overrides(unsigned long current);
void acpi_mainboard_gnvs(global_nvs_t *gnvs);
-void southbridge_inject_dsdt(device_t device);
-unsigned long southbridge_write_acpi_tables(device_t device,
+void southbridge_inject_dsdt(struct device *device);
+unsigned long southbridge_write_acpi_tables(struct device *device,
unsigned long current, struct acpi_rsdp *rsdp);
unsigned long northbridge_write_acpi_tables(struct device *,
unsigned long current, struct acpi_rsdp *);
diff --git a/src/soc/intel/skylake/irq.c b/src/soc/intel/skylake/irq.c
index 50119a5688..146fcda7c8 100644
--- a/src/soc/intel/skylake/irq.c
+++ b/src/soc/intel/skylake/irq.c
@@ -296,7 +296,7 @@ void soc_pch_pirq_init(const struct device *dev)
{
const config_t *config = dev->chip_info;
uint8_t pch_interrupt_routing[MAX_PXRC_CONFIG];
- device_t irq_dev;
+ struct device *irq_dev;
pch_interrupt_routing[0] = config->pirqa_routing;
pch_interrupt_routing[1] = config->pirqb_routing;
diff --git a/src/soc/intel/skylake/smmrelocate.c b/src/soc/intel/skylake/smmrelocate.c
index b477b11752..6a8e64bd42 100644
--- a/src/soc/intel/skylake/smmrelocate.c
+++ b/src/soc/intel/skylake/smmrelocate.c
@@ -180,7 +180,7 @@ void smm_relocation_handler(int cpu, uintptr_t curr_smbase,
write_smrr(relo_params);
}
-static void fill_in_relocation_params(device_t dev,
+static void fill_in_relocation_params(struct device *dev,
struct smm_relocation_params *params)
{
void *handler_base;
@@ -265,7 +265,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/skylake/vr_config.c b/src/soc/intel/skylake/vr_config.c
index 0659d04e3a..57affe533b 100644
--- a/src/soc/intel/skylake/vr_config.c
+++ b/src/soc/intel/skylake/vr_config.c
@@ -160,7 +160,7 @@ static const struct vr_config default_configs[NUM_VR_DOMAINS] = {
},
};
-static uint16_t get_dev_id(device_t dev)
+static uint16_t get_dev_id(struct device *dev)
{
return pci_read_config16(dev, PCI_DEVICE_ID);
}