summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-10-27 23:29:29 +1100
committerEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-10-27 23:40:05 +0100
commit2c9d2cf75c6b12132f1f2c43ef9c01b51f741d26 (patch)
tree0417773090bacd02049d04ce11d27c84609d0272 /src
parent06413ff513600ecb7ef7bf486d8871cce01b7d70 (diff)
{arch,cpu,drivers,ec}: Don't hide pointers behind typedefs
Change-Id: Id88bb4367d6045f6fbf185f0562ac72c04ee5f84 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: http://review.coreboot.org/7146 Tested-by: build bot (Jenkins)
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/boot/acpi.c6
-rw-r--r--src/arch/x86/boot/mpspec.c6
-rw-r--r--src/arch/x86/boot/smbios.c6
-rw-r--r--src/cpu/allwinner/a10/cpu.c8
-rw-r--r--src/cpu/intel/ep80579/ep80579_init.c2
-rw-r--r--src/cpu/intel/fsp_model_206ax/acpi.c2
-rw-r--r--src/cpu/intel/fsp_model_206ax/model_206ax_init.c6
-rw-r--r--src/cpu/intel/fsp_model_406dx/acpi.c2
-rw-r--r--src/cpu/intel/fsp_model_406dx/model_406dx_init.c6
-rw-r--r--src/cpu/intel/haswell/acpi.c2
-rw-r--r--src/cpu/intel/haswell/haswell_init.c4
-rw-r--r--src/cpu/intel/haswell/smmrelocate.c6
-rw-r--r--src/cpu/intel/hyperthreading/intel_sibling.c4
-rw-r--r--src/cpu/intel/model_1067x/model_1067x_init.c6
-rw-r--r--src/cpu/intel/model_106cx/model_106cx_init.c2
-rw-r--r--src/cpu/intel/model_2065x/acpi.c2
-rw-r--r--src/cpu/intel/model_2065x/model_2065x_init.c8
-rw-r--r--src/cpu/intel/model_206ax/acpi.c2
-rw-r--r--src/cpu/intel/model_206ax/model_206ax_init.c8
-rw-r--r--src/cpu/intel/model_65x/model_65x_init.c2
-rw-r--r--src/cpu/intel/model_67x/model_67x_init.c2
-rw-r--r--src/cpu/intel/model_68x/model_68x_init.c2
-rw-r--r--src/cpu/intel/model_69x/model_69x_init.c2
-rw-r--r--src/cpu/intel/model_6bx/model_6bx_init.c2
-rw-r--r--src/cpu/intel/model_6dx/model_6dx_init.c2
-rw-r--r--src/cpu/intel/model_6ex/model_6ex_init.c2
-rw-r--r--src/cpu/intel/model_6fx/model_6fx_init.c2
-rw-r--r--src/cpu/intel/model_6xx/model_6xx_init.c2
-rw-r--r--src/cpu/intel/model_f0x/model_f0x_init.c2
-rw-r--r--src/cpu/intel/model_f1x/model_f1x_init.c2
-rw-r--r--src/cpu/intel/model_f2x/model_f2x_init.c2
-rw-r--r--src/cpu/intel/model_f3x/model_f3x_init.c2
-rw-r--r--src/cpu/intel/model_f4x/model_f4x_init.c2
-rw-r--r--src/cpu/intel/speedstep/acpi.c2
-rw-r--r--src/cpu/via/c3/c3_init.c2
-rw-r--r--src/cpu/via/c7/c7_init.c2
-rw-r--r--src/cpu/via/nano/nano_init.c2
-rw-r--r--src/cpu/x86/lapic/lapic_cpu_init.c8
-rw-r--r--src/cpu/x86/mp_init.c4
-rw-r--r--src/drivers/ati/ragexl/xlinit.c2
-rw-r--r--src/drivers/dec/21143/21143.c2
-rw-r--r--src/drivers/emulation/qemu/bochs.c2
-rw-r--r--src/drivers/emulation/qemu/cirrus.c2
-rw-r--r--src/drivers/generic/ioapic/ioapic.c8
-rw-r--r--src/drivers/i2c/adm1026/adm1026.c6
-rw-r--r--src/drivers/i2c/adm1027/adm1027.c6
-rw-r--r--src/drivers/i2c/adt7463/adt7463.c4
-rw-r--r--src/drivers/i2c/at24rf08c/at24rf08c.c6
-rw-r--r--src/drivers/i2c/at24rf08c/lenovo_serials.c14
-rw-r--r--src/drivers/i2c/i2cmux/i2cmux.c4
-rw-r--r--src/drivers/i2c/i2cmux2/i2cmux2.c4
-rw-r--r--src/drivers/i2c/lm63/lm63.c4
-rw-r--r--src/drivers/i2c/rtd2132/rtd2132.c24
-rw-r--r--src/drivers/i2c/w83793/w83793.c18
-rw-r--r--src/drivers/i2c/w83795/w83795.c6
-rw-r--r--src/drivers/ics/954309/ics954309.c4
-rw-r--r--src/ec/compal/ene932/ec.c8
-rw-r--r--src/ec/google/chromeec/ec_lpc.c8
-rw-r--r--src/ec/kontron/it8516e/ec.c4
-rw-r--r--src/ec/lenovo/h8/h8.c4
-rw-r--r--src/ec/lenovo/pmh7/pmh7.c2
-rw-r--r--src/ec/quanta/ene_kb3940q/ec.c8
-rw-r--r--src/ec/quanta/it8518/ec.c8
-rw-r--r--src/ec/smsc/mec1308/ec.c2
-rw-r--r--src/superio/fintek/f71869ad/f71869ad_hwm.c2
-rw-r--r--src/superio/fintek/f71869ad/f71869ad_multifunc.c2
-rw-r--r--src/superio/fintek/f71869ad/fintek_internal.h4
-rw-r--r--src/superio/ite/it8728f/it8728f_hwm.c2
-rw-r--r--src/superio/ite/it8728f/it8728f_internal.h2
-rw-r--r--src/superio/smsc/fdc37n972/fdc37n972.c2
-rw-r--r--src/superio/smsc/sio10n268/sio10n268.c2
-rw-r--r--src/superio/via/vt1211/vt1211.c4
72 files changed, 159 insertions, 157 deletions
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index c3c946deaa..b506cb41ac 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -141,7 +141,7 @@ int acpi_create_madt_lapic(acpi_madt_lapic_t *lapic, u8 cpu, u8 apic)
unsigned long acpi_create_madt_lapics(unsigned long current)
{
- device_t cpu;
+ struct device *cpu;
int index = 0;
for (cpu = all_devices; cpu; cpu = cpu->next) {
@@ -278,7 +278,7 @@ void acpi_create_ssdt_generator(acpi_header_t *ssdt, const char *oem_table_id)
acpigen_set_current((char *) current);
{
#if IS_ENABLED(CONFIG_PER_DEVICE_ACPI_TABLES)
- device_t dev;
+ struct device *dev;
for (dev = all_devices; dev; dev = dev->next)
if (dev->ops && dev->ops->acpi_fill_ssdt_generator) {
dev->ops->acpi_fill_ssdt_generator();
@@ -708,7 +708,7 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_header_t *dsdt;
acpi_mcfg_t *mcfg;
acpi_madt_t *madt;
- device_t dev;
+ struct device *dev;
current = start;
diff --git a/src/arch/x86/boot/mpspec.c b/src/arch/x86/boot/mpspec.c
index d079d083b9..8049be4fe5 100644
--- a/src/arch/x86/boot/mpspec.c
+++ b/src/arch/x86/boot/mpspec.c
@@ -166,7 +166,7 @@ void smp_write_processors(struct mp_config_table *mc)
unsigned cpu_features;
unsigned cpu_feature_flags;
struct cpuid_result result;
- device_t cpu;
+ struct device *cpu;
boot_apic_id = lapicid();
apic_version = lapic_read(LAPIC_LVR) & 0xff;
@@ -493,7 +493,9 @@ unsigned long __attribute__((weak)) write_smp_table(unsigned long addr)
struct drivers_generic_ioapic_config *ioapic_config;
struct mp_config_table *mc;
int isa_bus, pin, parentpin;
- device_t dev, parent, oldparent;
+ struct device *dev;
+ struct device *parent;
+ struct device *oldparent;
void *tmp, *v;
int isaioapic = -1, have_fixed_entries;
diff --git a/src/arch/x86/boot/smbios.c b/src/arch/x86/boot/smbios.c
index 724def3419..64889f713c 100644
--- a/src/arch/x86/boot/smbios.c
+++ b/src/arch/x86/boot/smbios.c
@@ -303,7 +303,7 @@ static int smbios_write_type11(unsigned long *current, int *handle)
{
struct smbios_type11 *t = (struct smbios_type11 *)*current;
int len;
- device_t dev;
+ struct device *dev;
memset(t, 0, sizeof *t);
t->type = SMBIOS_OEM_STRINGS;
@@ -379,9 +379,9 @@ static int smbios_write_type127(unsigned long *current, int handle)
return len;
}
-static int smbios_walk_device_tree(device_t tree, int *handle, unsigned long *current)
+static int smbios_walk_device_tree(struct device *tree, int *handle, unsigned long *current)
{
- device_t dev;
+ struct device *dev;
int len = 0;
for(dev = tree; dev; dev = dev->next) {
diff --git a/src/cpu/allwinner/a10/cpu.c b/src/cpu/allwinner/a10/cpu.c
index e0d4cdf4d5..fac5730020 100644
--- a/src/cpu/allwinner/a10/cpu.c
+++ b/src/cpu/allwinner/a10/cpu.c
@@ -11,7 +11,7 @@
#include <cbmem.h>
-static void cpu_enable_resources(device_t dev)
+static void cpu_enable_resources(struct device *dev)
{
ram_resource(dev, 0, CONFIG_SYS_SDRAM_BASE >> 10,
CONFIG_DRAM_SIZE_MB << 10);
@@ -20,12 +20,12 @@ static void cpu_enable_resources(device_t dev)
*/
}
-static void cpu_init(device_t dev)
+static void cpu_init(struct device *dev)
{
/* TODO: Check if anything else needs to be explicitly initialized */
}
-static void cpu_noop(device_t dev)
+static void cpu_noop(struct device *dev)
{
}
@@ -37,7 +37,7 @@ static struct device_operations cpu_ops = {
.scan_bus = NULL,
};
-static void a1x_cpu_enable_dev(device_t dev)
+static void a1x_cpu_enable_dev(struct device *dev)
{
dev->ops = &cpu_ops;
}
diff --git a/src/cpu/intel/ep80579/ep80579_init.c b/src/cpu/intel/ep80579/ep80579_init.c
index 433636d065..2e66700e3a 100644
--- a/src/cpu/intel/ep80579/ep80579_init.c
+++ b/src/cpu/intel/ep80579/ep80579_init.c
@@ -28,7 +28,7 @@
#include <cpu/x86/cache.h>
#include <cpu/x86/mtrr.h>
-static void ep80579_init(device_t dev)
+static void ep80579_init(struct device *dev)
{
/* Turn on caching if we haven't already */
x86_enable_cache();
diff --git a/src/cpu/intel/fsp_model_206ax/acpi.c b/src/cpu/intel/fsp_model_206ax/acpi.c
index bf4a3ac3a3..28aeb43000 100644
--- a/src/cpu/intel/fsp_model_206ax/acpi.c
+++ b/src/cpu/intel/fsp_model_206ax/acpi.c
@@ -89,7 +89,7 @@ static int generate_C_state_entries(void)
struct cpu_info *info;
struct cpu_driver *cpu;
int len, lenif;
- device_t lapic;
+ struct device *lapic;
struct cpu_intel_fsp_model_206ax_config *conf = NULL;
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
diff --git a/src/cpu/intel/fsp_model_206ax/model_206ax_init.c b/src/cpu/intel/fsp_model_206ax/model_206ax_init.c
index ebb3675222..f5ca3f7d8b 100644
--- a/src/cpu/intel/fsp_model_206ax/model_206ax_init.c
+++ b/src/cpu/intel/fsp_model_206ax/model_206ax_init.c
@@ -290,7 +290,7 @@ static void configure_mca(void)
/*
* Initialize any extra cores/threads in this package.
*/
-static void intel_cores_init(device_t cpu)
+static void intel_cores_init(struct device *cpu)
{
struct cpuid_result result;
unsigned threads_per_package, threads_per_core, i;
@@ -313,7 +313,7 @@ static void intel_cores_init(device_t cpu)
for (i = 1; i < threads_per_package; ++i) {
struct device_path cpu_path;
- device_t new;
+ struct device *new;
/* Build the cpu device path */
cpu_path.type = DEVICE_PATH_APIC;
@@ -344,7 +344,7 @@ static void intel_cores_init(device_t cpu)
}
}
-static void model_206ax_init(device_t cpu)
+static void model_206ax_init(struct device *cpu)
{
char processor_name[49];
struct cpuid_result cpuid_regs;
diff --git a/src/cpu/intel/fsp_model_406dx/acpi.c b/src/cpu/intel/fsp_model_406dx/acpi.c
index a3108acde8..24f63cdf9d 100644
--- a/src/cpu/intel/fsp_model_406dx/acpi.c
+++ b/src/cpu/intel/fsp_model_406dx/acpi.c
@@ -55,7 +55,7 @@ static int generate_C_state_entries(void)
struct cpu_info *info;
struct cpu_driver *cpu;
int len, lenif;
- device_t lapic;
+ struct device *lapic;
struct cpu_intel_model_406dx_config *conf = NULL;
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
diff --git a/src/cpu/intel/fsp_model_406dx/model_406dx_init.c b/src/cpu/intel/fsp_model_406dx/model_406dx_init.c
index 3a3628103c..d892277463 100644
--- a/src/cpu/intel/fsp_model_406dx/model_406dx_init.c
+++ b/src/cpu/intel/fsp_model_406dx/model_406dx_init.c
@@ -112,7 +112,7 @@ static void configure_mca(void)
/*
* Initialize any extra cores/threads in this package.
*/
-static void intel_cores_init(device_t cpu)
+static void intel_cores_init(struct device *cpu)
{
struct cpuid_result result;
unsigned threads_per_package, threads_per_core, i;
@@ -135,7 +135,7 @@ static void intel_cores_init(device_t cpu)
for (i = 1; i < threads_per_package; ++i) {
struct device_path cpu_path;
- device_t new;
+ struct device *new;
/* Build the cpu device path */
cpu_path.type = DEVICE_PATH_APIC;
@@ -166,7 +166,7 @@ static void intel_cores_init(device_t cpu)
}
}
-static void model_406dx_init(device_t cpu)
+static void model_406dx_init(struct device *cpu)
{
char processor_name[49];
diff --git a/src/cpu/intel/haswell/acpi.c b/src/cpu/intel/haswell/acpi.c
index 768511cc3d..544436f449 100644
--- a/src/cpu/intel/haswell/acpi.c
+++ b/src/cpu/intel/haswell/acpi.c
@@ -91,7 +91,7 @@ static int generate_C_state_entries(void)
struct cpu_info *info;
struct cpu_driver *cpu;
int len, lenif;
- device_t lapic;
+ struct device *lapic;
struct cpu_intel_haswell_config *conf = NULL;
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c
index 68c76431b7..03935a0dd0 100644
--- a/src/cpu/intel/haswell/haswell_init.c
+++ b/src/cpu/intel/haswell/haswell_init.c
@@ -597,7 +597,7 @@ static void configure_c_states(void)
static void configure_thermal_target(void)
{
struct cpu_intel_haswell_config *conf;
- device_t lapic;
+ struct device *lapic;
msr_t msr;
/* Find pointer to CPU configuration */
@@ -735,7 +735,7 @@ static void bsp_init_before_ap_bringup(struct bus *cpu_bus)
}
/* All CPUs including BSP will run the following function. */
-static void haswell_init(device_t cpu)
+static void haswell_init(struct device *cpu)
{
/* Clear out pending MCEs */
configure_mca();
diff --git a/src/cpu/intel/haswell/smmrelocate.c b/src/cpu/intel/haswell/smmrelocate.c
index 56d435cf89..d780beb97e 100644
--- a/src/cpu/intel/haswell/smmrelocate.c
+++ b/src/cpu/intel/haswell/smmrelocate.c
@@ -227,7 +227,7 @@ static void asmlinkage cpu_smm_do_relocation(void *arg)
}
}
-static u32 northbridge_get_base_reg(device_t dev, int reg)
+static u32 northbridge_get_base_reg(struct device *dev, int reg)
{
u32 value;
@@ -237,7 +237,7 @@ static u32 northbridge_get_base_reg(device_t dev, int reg)
return value;
}
-static void fill_in_relocation_params(device_t dev,
+static void fill_in_relocation_params(struct device *dev,
struct smm_relocation_params *params)
{
u32 tseg_size;
@@ -387,7 +387,7 @@ static int install_permanent_handler(int num_cpus,
static int cpu_smm_setup(void)
{
- device_t dev;
+ struct device *dev;
int num_cpus;
msr_t msr;
diff --git a/src/cpu/intel/hyperthreading/intel_sibling.c b/src/cpu/intel/hyperthreading/intel_sibling.c
index 16d8959b11..32c5e0156e 100644
--- a/src/cpu/intel/hyperthreading/intel_sibling.c
+++ b/src/cpu/intel/hyperthreading/intel_sibling.c
@@ -38,7 +38,7 @@ int intel_ht_sibling(void)
return !!(lapicid() & (threads-1));
}
-void intel_sibling_init(device_t cpu)
+void intel_sibling_init(struct device *cpu)
{
unsigned i, siblings;
struct cpuid_result result;
@@ -74,7 +74,7 @@ void intel_sibling_init(device_t cpu)
/* I am the primary cpu start up my siblings */
for(i = 1; i < siblings; i++) {
struct device_path cpu_path;
- device_t new;
+ struct device *new;
/* Build the cpu device path */
cpu_path.type = DEVICE_PATH_APIC;
cpu_path.apic.apic_id = cpu->path.apic.apic_id + i;
diff --git a/src/cpu/intel/model_1067x/model_1067x_init.c b/src/cpu/intel/model_1067x/model_1067x_init.c
index 8e44c784bc..8b20107ec4 100644
--- a/src/cpu/intel/model_1067x/model_1067x_init.c
+++ b/src/cpu/intel/model_1067x/model_1067x_init.c
@@ -86,7 +86,7 @@ static void configure_c_states(const int quad)
msr_t msr;
/* Find pointer to CPU configuration. */
- const device_t lapic = dev_find_lapic(SPEEDSTEP_APIC_MAGIC);
+ const struct device *lapic = dev_find_lapic(SPEEDSTEP_APIC_MAGIC);
const struct cpu_intel_model_1067x_config *const conf =
(lapic && lapic->chip_info) ? lapic->chip_info : NULL;
@@ -144,7 +144,7 @@ static void configure_p_states(const char stepping, const char cores)
msr_t msr;
/* Find pointer to CPU configuration. */
- const device_t lapic = dev_find_lapic(SPEEDSTEP_APIC_MAGIC);
+ const struct device *lapic = dev_find_lapic(SPEEDSTEP_APIC_MAGIC);
struct cpu_intel_model_1067x_config *const conf =
(lapic && lapic->chip_info) ? lapic->chip_info : NULL;
@@ -285,7 +285,7 @@ static void configure_pic_thermal_sensors(const int tm2, const int quad)
wrmsr(PIC_SENS_CFG, msr);
}
-static void model_1067x_init(device_t cpu)
+static void model_1067x_init(struct device *cpu)
{
char processor_name[49];
diff --git a/src/cpu/intel/model_106cx/model_106cx_init.c b/src/cpu/intel/model_106cx/model_106cx_init.c
index 73ee5cd191..b201474a7c 100644
--- a/src/cpu/intel/model_106cx/model_106cx_init.c
+++ b/src/cpu/intel/model_106cx/model_106cx_init.c
@@ -110,7 +110,7 @@ static void configure_misc(void)
wrmsr(IA32_MISC_ENABLE, msr);
}
-static void model_106cx_init(device_t cpu)
+static void model_106cx_init(struct device *cpu)
{
char processor_name[49];
diff --git a/src/cpu/intel/model_2065x/acpi.c b/src/cpu/intel/model_2065x/acpi.c
index d0be5022af..870020fbb5 100644
--- a/src/cpu/intel/model_2065x/acpi.c
+++ b/src/cpu/intel/model_2065x/acpi.c
@@ -89,7 +89,7 @@ static int generate_C_state_entries(void)
struct cpu_info *info;
struct cpu_driver *cpu;
int len, lenif;
- device_t lapic;
+ struct device *lapic;
struct cpu_intel_model_2065x_config *conf = NULL;
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
diff --git a/src/cpu/intel/model_2065x/model_2065x_init.c b/src/cpu/intel/model_2065x/model_2065x_init.c
index 9a2afa41d9..f79aba564b 100644
--- a/src/cpu/intel/model_2065x/model_2065x_init.c
+++ b/src/cpu/intel/model_2065x/model_2065x_init.c
@@ -182,7 +182,7 @@ int cpu_config_tdp_levels(void)
static void configure_thermal_target(void)
{
struct cpu_intel_model_2065x_config *conf;
- device_t lapic;
+ struct device *lapic;
msr_t msr;
/* Find pointer to CPU configuration */
@@ -286,7 +286,7 @@ static void configure_mca(void)
/*
* Initialize any extra cores/threads in this package.
*/
-static void intel_cores_init(device_t cpu)
+static void intel_cores_init(struct device *cpu)
{
struct cpuid_result result;
unsigned threads_per_package, threads_per_core, i;
@@ -309,7 +309,7 @@ static void intel_cores_init(device_t cpu)
for (i = 1; i < threads_per_package; ++i) {
struct device_path cpu_path;
- device_t new;
+ struct device *new;
/* Build the cpu device path */
cpu_path.type = DEVICE_PATH_APIC;
@@ -337,7 +337,7 @@ static void intel_cores_init(device_t cpu)
}
}
-static void model_2065x_init(device_t cpu)
+static void model_2065x_init(struct device *cpu)
{
char processor_name[49];
struct cpuid_result cpuid_regs;
diff --git a/src/cpu/intel/model_206ax/acpi.c b/src/cpu/intel/model_206ax/acpi.c
index f2cd6a9373..21f9c3e97a 100644
--- a/src/cpu/intel/model_206ax/acpi.c
+++ b/src/cpu/intel/model_206ax/acpi.c
@@ -89,7 +89,7 @@ static int generate_C_state_entries(void)
struct cpu_info *info;
struct cpu_driver *cpu;
int len, lenif;
- device_t lapic;
+ struct device *lapic;
struct cpu_intel_model_206ax_config *conf = NULL;
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
diff --git a/src/cpu/intel/model_206ax/model_206ax_init.c b/src/cpu/intel/model_206ax/model_206ax_init.c
index dbde512204..1c5d1aff03 100644
--- a/src/cpu/intel/model_206ax/model_206ax_init.c
+++ b/src/cpu/intel/model_206ax/model_206ax_init.c
@@ -364,7 +364,7 @@ static void configure_c_states(void)
static void configure_thermal_target(void)
{
struct cpu_intel_model_206ax_config *conf;
- device_t lapic;
+ struct device *lapic;
msr_t msr;
/* Find pointer to CPU configuration */
@@ -477,7 +477,7 @@ static void configure_mca(void)
/*
* Initialize any extra cores/threads in this package.
*/
-static void intel_cores_init(device_t cpu)
+static void intel_cores_init(struct device *cpu)
{
struct cpuid_result result;
unsigned threads_per_package, threads_per_core, i;
@@ -500,7 +500,7 @@ static void intel_cores_init(device_t cpu)
for (i = 1; i < threads_per_package; ++i) {
struct device_path cpu_path;
- device_t new;
+ struct device *new;
/* Build the cpu device path */
cpu_path.type = DEVICE_PATH_APIC;
@@ -531,7 +531,7 @@ static void intel_cores_init(device_t cpu)
}
}
-static void model_206ax_init(device_t cpu)
+static void model_206ax_init(struct device *cpu)
{
char processor_name[49];
struct cpuid_result cpuid_regs;
diff --git a/src/cpu/intel/model_65x/model_65x_init.c b/src/cpu/intel/model_65x/model_65x_init.c
index a9f1811c76..6b21939298 100644
--- a/src/cpu/intel/model_65x/model_65x_init.c
+++ b/src/cpu/intel/model_65x/model_65x_init.c
@@ -28,7 +28,7 @@
#include <cpu/x86/cache.h>
#include <cpu/intel/l2_cache.h>
-static void model_65x_init(device_t dev)
+static void model_65x_init(struct device *dev)
{
/* Update the microcode */
intel_update_microcode_from_cbfs();
diff --git a/src/cpu/intel/model_67x/model_67x_init.c b/src/cpu/intel/model_67x/model_67x_init.c
index 467d3db976..c72dfae8f2 100644
--- a/src/cpu/intel/model_67x/model_67x_init.c
+++ b/src/cpu/intel/model_67x/model_67x_init.c
@@ -29,7 +29,7 @@
#include <cpu/x86/msr.h>
#include <cpu/intel/l2_cache.h>
-static void model_67x_init(device_t cpu)
+static void model_67x_init(struct device *cpu)
{
/* Update the microcode */
intel_update_microcode_from_cbfs();
diff --git a/src/cpu/intel/model_68x/model_68x_init.c b/src/cpu/intel/model_68x/model_68x_init.c
index d1b44634df..fc016d29cb 100644
--- a/src/cpu/intel/model_68x/model_68x_init.c
+++ b/src/cpu/intel/model_68x/model_68x_init.c
@@ -31,7 +31,7 @@
#include <cpu/x86/cache.h>
#include <cpu/x86/name.h>
-static void model_68x_init(device_t cpu)
+static void model_68x_init(struct device *cpu)
{
char processor_name[49];
diff --git a/src/cpu/intel/model_69x/model_69x_init.c b/src/cpu/intel/model_69x/model_69x_init.c
index 4339274505..214673a755 100644
--- a/src/cpu/intel/model_69x/model_69x_init.c
+++ b/src/cpu/intel/model_69x/model_69x_init.c
@@ -8,7 +8,7 @@
#include <cpu/intel/microcode.h>
#include <cpu/x86/cache.h>
-static void model_69x_init(device_t dev)
+static void model_69x_init(struct device *dev)
{
/* Turn on caching if we haven't already */
x86_enable_cache();
diff --git a/src/cpu/intel/model_6bx/model_6bx_init.c b/src/cpu/intel/model_6bx/model_6bx_init.c
index d166bfa234..013a6a5ec5 100644
--- a/src/cpu/intel/model_6bx/model_6bx_init.c
+++ b/src/cpu/intel/model_6bx/model_6bx_init.c
@@ -31,7 +31,7 @@
#include <cpu/x86/cache.h>
#include <cpu/x86/name.h>
-static void model_6bx_init(device_t cpu)
+static void model_6bx_init(struct device *cpu)
{
char processor_name[49];
diff --git a/src/cpu/intel/model_6dx/model_6dx_init.c b/src/cpu/intel/model_6dx/model_6dx_init.c
index 18c2fa4088..190edf0254 100644
--- a/src/cpu/intel/model_6dx/model_6dx_init.c
+++ b/src/cpu/intel/model_6dx/model_6dx_init.c
@@ -8,7 +8,7 @@
#include <cpu/intel/microcode.h>
#include <cpu/x86/cache.h>
-static void model_6dx_init(device_t dev)
+static void model_6dx_init(struct device *dev)
{
/* Turn on caching if we haven't already */
x86_enable_cache();
diff --git a/src/cpu/intel/model_6ex/model_6ex_init.c b/src/cpu/intel/model_6ex/model_6ex_init.c
index 8f9fbf824c..54e59eb60e 100644
--- a/src/cpu/intel/model_6ex/model_6ex_init.c
+++ b/src/cpu/intel/model_6ex/model_6ex_init.c
@@ -141,7 +141,7 @@ static void configure_pic_thermal_sensors(void)
wrmsr(PIC_SENS_CFG, msr);
}
-static void model_6ex_init(device_t cpu)
+static void model_6ex_init(struct device *cpu)
{
char processor_name[49];
diff --git a/src/cpu/intel/model_6fx/model_6fx_init.c b/src/cpu/intel/model_6fx/model_6fx_init.c
index 93635d46b9..1b527818cc 100644
--- a/src/cpu/intel/model_6fx/model_6fx_init.c
+++ b/src/cpu/intel/model_6fx/model_6fx_init.c
@@ -161,7 +161,7 @@ static void configure_pic_thermal_sensors(void)
wrmsr(PIC_SENS_CFG, msr);
}
-static void model_6fx_init(device_t cpu)
+static void model_6fx_init(struct device *cpu)
{
char processor_name[49];
diff --git a/src/cpu/intel/model_6xx/model_6xx_init.c b/src/cpu/intel/model_6xx/model_6xx_init.c
index 9b92dcc78f..d8acd5efe1 100644
--- a/src/cpu/intel/model_6xx/model_6xx_init.c
+++ b/src/cpu/intel/model_6xx/model_6xx_init.c
@@ -8,7 +8,7 @@
#include <cpu/intel/microcode.h>
#include <cpu/x86/cache.h>
-static void model_6xx_init(device_t dev)
+static void model_6xx_init(struct device *dev)
{
/* Turn on caching if we haven't already */
x86_enable_cache();
diff --git a/src/cpu/intel/model_f0x/model_f0x_init.c b/src/cpu/intel/model_f0x/model_f0x_init.c
index ca40515444..fe9ea3b415 100644
--- a/src/cpu/intel/model_f0x/model_f0x_init.c
+++ b/src/cpu/intel/model_f0x/model_f0x_init.c
@@ -8,7 +8,7 @@
#include <cpu/intel/microcode.h>
#include <cpu/x86/cache.h>
-static void model_f0x_init(device_t dev)
+static void model_f0x_init(struct device *dev)
{
/* Turn on caching if we haven't already */
x86_enable_cache();
diff --git a/src/cpu/intel/model_f1x/model_f1x_init.c b/src/cpu/intel/model_f1x/model_f1x_init.c
index dbb5cd09f7..3678bfe9e8 100644
--- a/src/cpu/intel/model_f1x/model_f1x_init.c
+++ b/src/cpu/intel/model_f1x/model_f1x_init.c
@@ -8,7 +8,7 @@
#include <cpu/intel/microcode.h>
#include <cpu/x86/cache.h>
-static void model_f1x_init(device_t dev)
+static void model_f1x_init(struct device *dev)
{
/* Turn on caching if we haven't already */
x86_enable_cache();
diff --git a/src/cpu/intel/model_f2x/model_f2x_init.c b/src/cpu/intel/model_f2x/model_f2x_init.c
index 53eb75ee54..cf0b827f2d 100644
--- a/src/cpu/intel/model_f2x/model_f2x_init.c
+++ b/src/cpu/intel/model_f2x/model_f2x_init.c
@@ -9,7 +9,7 @@
#include <cpu/intel/hyperthreading.h>
#include <cpu/x86/cache.h>
-static void model_f2x_init(device_t cpu)
+static void model_f2x_init(struct device *cpu)
{
/* Turn on caching if we haven't already */
x86_enable_cache();
diff --git a/src/cpu/intel/model_f3x/model_f3x_init.c b/src/cpu/intel/model_f3x/model_f3x_init.c
index f8d9ca6640..2d3bc73280 100644
--- a/src/cpu/intel/model_f3x/model_f3x_init.c
+++ b/src/cpu/intel/model_f3x/model_f3x_init.c
@@ -9,7 +9,7 @@
#include <cpu/intel/hyperthreading.h>
#include <cpu/x86/cache.h>
-static void model_f3x_init(device_t cpu)
+static void model_f3x_init(struct device *cpu)
{
/* Turn on caching if we haven't already */
x86_enable_cache();
diff --git a/src/cpu/intel/model_f4x/model_f4x_init.c b/src/cpu/intel/model_f4x/model_f4x_init.c
index 260b60ac9c..cbc042e36c 100644
--- a/src/cpu/intel/model_f4x/model_f4x_init.c
+++ b/src/cpu/intel/model_f4x/model_f4x_init.c
@@ -9,7 +9,7 @@
#include <cpu/intel/hyperthreading.h>
#include <cpu/x86/cache.h>
-static void model_f4x_init(device_t cpu)
+static void model_f4x_init(struct device *cpu)
{
/* Turn on caching if we haven't already */
x86_enable_cache();
diff --git a/src/cpu/intel/speedstep/acpi.c b/src/cpu/intel/speedstep/acpi.c
index 483e81309e..98d1ee7c3e 100644
--- a/src/cpu/intel/speedstep/acpi.c
+++ b/src/cpu/intel/speedstep/acpi.c
@@ -44,7 +44,7 @@ int __attribute__((weak)) get_cst_entries(acpi_cstate_t **entries
static int determine_total_number_of_cores(void)
{
- device_t cpu;
+ struct device *cpu;
int count = 0;
for(cpu = all_devices; cpu; cpu = cpu->next) {
if ((cpu->path.type != DEVICE_PATH_APIC) ||
diff --git a/src/cpu/via/c3/c3_init.c b/src/cpu/via/c3/c3_init.c
index 7d9438479c..fc6001be58 100644
--- a/src/cpu/via/c3/c3_init.c
+++ b/src/cpu/via/c3/c3_init.c
@@ -26,7 +26,7 @@
#include <cpu/x86/lapic.h>
#include <cpu/x86/cache.h>
-static void c3_init(device_t dev)
+static void c3_init(struct device *dev)
{
x86_enable_cache();
x86_setup_mtrrs();
diff --git a/src/cpu/via/c7/c7_init.c b/src/cpu/via/c7/c7_init.c
index 510e66d8ba..7f22e59067 100644
--- a/src/cpu/via/c7/c7_init.c
+++ b/src/cpu/via/c7/c7_init.c
@@ -147,7 +147,7 @@ static void set_c7_speed(int model) {
printk(BIOS_INFO, "Current CPU multiplier: %dx\n", (int)((msr.lo >> 8) & 0xff));
}
-static void c7_init(device_t dev)
+static void c7_init(struct device *dev)
{
u8 brand;
struct cpuinfo_x86 c;
diff --git a/src/cpu/via/nano/nano_init.c b/src/cpu/via/nano/nano_init.c
index 417119f356..acb5f9546e 100644
--- a/src/cpu/via/nano/nano_init.c
+++ b/src/cpu/via/nano/nano_init.c
@@ -139,7 +139,7 @@ static void nano_power(void)
wrmsr(MSR_IA32_MISC_ENABLE, msr);
}
-static void nano_init(device_t dev)
+static void nano_init(struct device *dev)
{
struct cpuinfo_x86 c;
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c
index 09b6b9eeb0..018924f11d 100644
--- a/src/cpu/x86/lapic/lapic_cpu_init.c
+++ b/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -253,7 +253,7 @@ static void *stacks[CONFIG_MAX_CPUS];
volatile unsigned long secondary_stack;
volatile unsigned int secondary_cpu_index;
-int start_cpu(device_t cpu)
+int start_cpu(struct device *cpu)
{
struct cpu_info *info;
unsigned long stack_end;
@@ -430,9 +430,9 @@ void asmlinkage secondary_cpu_init(unsigned int index)
stop_this_cpu();
}
-static void start_other_cpus(struct bus *cpu_bus, device_t bsp_cpu)
+static void start_other_cpus(struct bus *cpu_bus, struct device *bsp_cpu)
{
- device_t cpu;
+ struct device *cpu;
/* Loop through the cpus once getting them started */
for(cpu = cpu_bus->children; cpu ; cpu = cpu->sibling) {
@@ -465,7 +465,7 @@ static void start_other_cpus(struct bus *cpu_bus, device_t bsp_cpu)
static void wait_other_cpus_stop(struct bus *cpu_bus)
{
- device_t cpu;
+ struct device *cpu;
int old_active_count, active_count;
long loopcount = 0;
int i;
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index e83c23d3f4..a97a4c532b 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -86,7 +86,7 @@ struct mp_flight_plan {
static struct mp_flight_plan mp_info;
struct cpu_map {
- device_t dev;
+ struct device *dev;
int apic_id;
};
@@ -328,7 +328,7 @@ static int allocate_cpu_devices(struct bus *cpu_bus, struct mp_params *p)
info = cpu_info();
for (i = 1; i < max_cpus; i++) {
struct device_path cpu_path;
- device_t new;
+ struct device *new;
int apic_id;
/* Build the cpu device path */
diff --git a/src/drivers/ati/ragexl/xlinit.c b/src/drivers/ati/ragexl/xlinit.c
index cdcb862f3e..41cea72a04 100644
--- a/src/drivers/ati/ragexl/xlinit.c
+++ b/src/drivers/ati/ragexl/xlinit.c
@@ -489,7 +489,7 @@ static void aty_calc_mem_refresh(struct fb_info_aty *info, u16 id, int xclk)
info->mem_refresh_rate = i;
}
#endif /*CONFIG_CONSOLE_BTEXT */
-static void ati_ragexl_init(device_t dev)
+static void ati_ragexl_init(struct device *dev)
{
u32 chip_id;
int j;
diff --git a/src/drivers/dec/21143/21143.c b/src/drivers/dec/21143/21143.c
index 7ce3d6bb68..b26b22c2e4 100644
--- a/src/drivers/dec/21143/21143.c
+++ b/src/drivers/dec/21143/21143.c
@@ -24,7 +24,7 @@
#include <device/pci_ids.h>
#include <console/console.h>
-static void dec_21143_enable(device_t dev)
+static void dec_21143_enable(struct device *dev)
{
printk(BIOS_DEBUG, "Initializing DECchip 21143\n");
diff --git a/src/drivers/emulation/qemu/bochs.c b/src/drivers/emulation/qemu/bochs.c
index f2e4dfb2a0..cb0075aec1 100644
--- a/src/drivers/emulation/qemu/bochs.c
+++ b/src/drivers/emulation/qemu/bochs.c
@@ -58,7 +58,7 @@ static int bochs_read(int index)
}
#endif
-static void bochs_init(device_t dev)
+static void bochs_init(struct device *dev)
{
#if IS_ENABLED(CONFIG_FRAMEBUFFER_KEEP_VESA_MODE)
struct edid edid;
diff --git a/src/drivers/emulation/qemu/cirrus.c b/src/drivers/emulation/qemu/cirrus.c
index c96e032216..1c659eb5f0 100644
--- a/src/drivers/emulation/qemu/cirrus.c
+++ b/src/drivers/emulation/qemu/cirrus.c
@@ -212,7 +212,7 @@ write_hidden_dac (uint8_t data)
}
#endif
-static void cirrus_init(device_t dev)
+static void cirrus_init(struct device *dev)
{
#if IS_ENABLED(CONFIG_FRAMEBUFFER_KEEP_VESA_MODE)
uint8_t cr_ext, cr_overlay;
diff --git a/src/drivers/generic/ioapic/ioapic.c b/src/drivers/generic/ioapic/ioapic.c
index 42b2f071f3..9c4bc7d6ce 100644
--- a/src/drivers/generic/ioapic/ioapic.c
+++ b/src/drivers/generic/ioapic/ioapic.c
@@ -12,7 +12,7 @@
#include <arch/io.h>
#include <cpu/x86/lapic.h>
-static void ioapic_init(device_t dev)
+static void ioapic_init(struct device *dev)
{
struct drivers_generic_ioapic_config *config = dev->chip_info;
u32 bsp_lapicid = lapicid();
@@ -86,15 +86,15 @@ static void ioapic_init(device_t dev)
}
}
-static void ioapic_enable_resources(device_t dev)
+static void ioapic_enable_resources(struct device *dev)
{
}
-static void ioapic_nop(device_t dummy)
+static void ioapic_nop(struct device *dummy)
{
}
-static void ioapic_read_resources(device_t dev)
+static void ioapic_read_resources(struct device *dev)
{
struct drivers_generic_ioapic_config *config = (struct drivers_generic_ioapic_config *)dev->chip_info;
struct resource *res;
diff --git a/src/drivers/i2c/adm1026/adm1026.c b/src/drivers/i2c/adm1026/adm1026.c
index ab85eb56a6..e8baea1c40 100644
--- a/src/drivers/i2c/adm1026/adm1026.c
+++ b/src/drivers/i2c/adm1026/adm1026.c
@@ -19,7 +19,7 @@
#define ADM1026_REG_CONFIG2 0x01
#define ADM1026_REG_CONFIG3 0x07
-static void adm1026_enable_monitoring(device_t dev)
+static void adm1026_enable_monitoring(struct device *dev)
{
int result;
result = smbus_read_byte(dev, ADM1026_REG_CONFIG1);
@@ -33,7 +33,7 @@ static void adm1026_enable_monitoring(device_t dev)
}
}
-static void adm1026_init(device_t dev)
+static void adm1026_init(struct device *dev)
{
if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) {
if (ops_smbus_bus(get_pbus_smbus(dev))) {
@@ -44,7 +44,7 @@ static void adm1026_init(device_t dev)
}
}
-static void adm1026_noop(device_t dummy)
+static void adm1026_noop(struct device *dummy)
{
}
diff --git a/src/drivers/i2c/adm1027/adm1027.c b/src/drivers/i2c/adm1027/adm1027.c
index e83f2c44d0..9841c81954 100644
--- a/src/drivers/i2c/adm1027/adm1027.c
+++ b/src/drivers/i2c/adm1027/adm1027.c
@@ -18,7 +18,7 @@
#define ADM1027_REG_CONFIG2 0x73
#define ADM1027_REG_CONFIG3 0x78
-static void adm1027_enable_monitoring(device_t dev)
+static void adm1027_enable_monitoring(struct device *dev)
{
int result;
@@ -39,7 +39,7 @@ static void adm1027_enable_monitoring(device_t dev)
printk(BIOS_DEBUG, "ADM1027: monitoring enabled\n");
}
-static void adm1027_init(device_t dev)
+static void adm1027_init(struct device *dev)
{
if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) {
if (ops_smbus_bus(get_pbus_smbus(dev))) {
@@ -50,7 +50,7 @@ static void adm1027_init(device_t dev)
}
}
-static void adm1027_noop(device_t dummy)
+static void adm1027_noop(struct device *dummy)
{
}
diff --git a/src/drivers/i2c/adt7463/adt7463.c b/src/drivers/i2c/adt7463/adt7463.c
index 9ca9f37d4e..dd6d8372c3 100644
--- a/src/drivers/i2c/adt7463/adt7463.c
+++ b/src/drivers/i2c/adt7463/adt7463.c
@@ -32,7 +32,7 @@
* See Analog Devices ADT7463 datasheet, Rev C (2004):
* http://www.analog.com/en/prod/0,,766_825_ADT7463,00.html
*/
-static void adt7463_init(device_t adt7463)
+static void adt7463_init(struct device *adt7463)
{
int result;
@@ -85,7 +85,7 @@ static void adt7463_init(device_t adt7463)
printk(BIOS_DEBUG, "ADT7463 properly initialized\n");
}
-static void adt7463_noop(device_t dummy)
+static void adt7463_noop(struct device *dummy)
{
}
diff --git a/src/drivers/i2c/at24rf08c/at24rf08c.c b/src/drivers/i2c/at24rf08c/at24rf08c.c
index a9cf2c5031..a03564f8db 100644
--- a/src/drivers/i2c/at24rf08c/at24rf08c.c
+++ b/src/drivers/i2c/at24rf08c/at24rf08c.c
@@ -25,7 +25,7 @@
#include <smbios.h>
#include <console/console.h>
-static void at24rf08c_init(device_t dev)
+static void at24rf08c_init(struct device *dev)
{
int i, j;
@@ -52,7 +52,7 @@ static void at24rf08c_init(device_t dev)
printk (BIOS_DEBUG, "init EEPROM done\n");
}
-static void at24rf08c_noop(device_t dummy)
+static void at24rf08c_noop(struct device *dummy)
{
}
@@ -63,7 +63,7 @@ static struct device_operations at24rf08c_operations = {
.init = at24rf08c_init,
};
-static void enable_dev(device_t dev)
+static void enable_dev(struct device *dev)
{
dev->ops = &at24rf08c_operations;
}
diff --git a/src/drivers/i2c/at24rf08c/lenovo_serials.c b/src/drivers/i2c/at24rf08c/lenovo_serials.c
index 53e76da033..65928be427 100644
--- a/src/drivers/i2c/at24rf08c/lenovo_serials.c
+++ b/src/drivers/i2c/at24rf08c/lenovo_serials.c
@@ -28,16 +28,16 @@
#define ERROR_STRING "*INVALID*"
-static device_t at24rf08c_find_bank(u8 bank)
+static struct device *at24rf08c_find_bank(u8 bank)
{
- device_t dev;
+ struct device *dev;
dev = dev_find_slot_on_smbus(1, 0x54 | bank);
if (!dev)
printk(BIOS_WARNING, "EEPROM not found\n");
return dev;
}
-static int at24rf08c_read_byte(device_t dev, u8 addr)
+static int at24rf08c_read_byte(struct device *dev, u8 addr)
{
int t = -1;
int j;
@@ -54,7 +54,7 @@ static int at24rf08c_read_byte(device_t dev, u8 addr)
return t;
}
-static void at24rf08c_read_string_dev(device_t dev, u8 start,
+static void at24rf08c_read_string_dev(struct device *dev, u8 start,
u8 len, char *result)
{
int i;
@@ -72,7 +72,7 @@ static void at24rf08c_read_string_dev(device_t dev, u8 start,
static void at24rf08c_read_string(u8 bank, u8 start, u8 len, char *result)
{
- device_t dev;
+ struct device *dev;
dev = at24rf08c_find_bank(bank);
if (dev == 0) {
@@ -124,7 +124,7 @@ void smbios_mainboard_set_uuid(u8 *uuid)
static char result[16];
unsigned i;
static int already_read;
- device_t dev;
+ struct device *dev;
const int remap[16] = {
/* UUID byteswap. */
3, 2, 1, 0, 5, 4, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15
@@ -173,7 +173,7 @@ const char *smbios_mainboard_version(void)
{
static char result[100];
static int already_read;
- device_t dev;
+ struct device *dev;
int len;
if (already_read)
diff --git a/src/drivers/i2c/i2cmux/i2cmux.c b/src/drivers/i2c/i2cmux/i2cmux.c
index b318508ae2..d8ad40b691 100644
--- a/src/drivers/i2c/i2cmux/i2cmux.c
+++ b/src/drivers/i2c/i2cmux/i2cmux.c
@@ -6,7 +6,7 @@
#include <device/pci_ops.h>
#include <cpu/x86/msr.h>
-static void i2cmux_set_link(device_t dev, unsigned int link)
+static void i2cmux_set_link(struct device *dev, unsigned int link)
{
if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) {
if (ops_smbus_bus(get_pbus_smbus(dev))) {
@@ -16,7 +16,7 @@ static void i2cmux_set_link(device_t dev, unsigned int link)
}
}
-static void i2cmux_noop(device_t dummy)
+static void i2cmux_noop(struct device *dummy)
{
}
diff --git a/src/drivers/i2c/i2cmux2/i2cmux2.c b/src/drivers/i2c/i2cmux2/i2cmux2.c
index a7d40e2176..6b05508a1b 100644
--- a/src/drivers/i2c/i2cmux2/i2cmux2.c
+++ b/src/drivers/i2c/i2cmux2/i2cmux2.c
@@ -6,7 +6,7 @@
#include <device/pci_ops.h>
#include <cpu/x86/msr.h>
-static void i2cmux2_set_link(device_t dev, unsigned int link)
+static void i2cmux2_set_link(struct device *dev, unsigned int link)
{
if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) {
if (ops_smbus_bus(get_pbus_smbus(dev))) {
@@ -15,7 +15,7 @@ static void i2cmux2_set_link(device_t dev, unsigned int link)
}
}
-static void i2cmux2_noop(device_t dummy)
+static void i2cmux2_noop(struct device *dummy)
{
}
diff --git a/src/drivers/i2c/lm63/lm63.c b/src/drivers/i2c/lm63/lm63.c
index 47a548946f..b64751e300 100644
--- a/src/drivers/i2c/lm63/lm63.c
+++ b/src/drivers/i2c/lm63/lm63.c
@@ -6,7 +6,7 @@
#include <device/pci_ops.h>
#include <cpu/x86/msr.h>
-static void lm63_init(device_t dev)
+static void lm63_init(struct device *dev)
{
int result;
if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) {
@@ -21,7 +21,7 @@ static void lm63_init(device_t dev)
}
}
-static void lm63_noop(device_t dummy)
+static void lm63_noop(struct device *dummy)
{
}
diff --git a/src/drivers/i2c/rtd2132/rtd2132.c b/src/drivers/i2c/rtd2132/rtd2132.c
index 44333ac669..4dbfb41890 100644
--- a/src/drivers/i2c/rtd2132/rtd2132.c
+++ b/src/drivers/i2c/rtd2132/rtd2132.c
@@ -75,7 +75,7 @@
#define RTD2132_DEBUG_REG 0
-static void rtd2132_write_reg(device_t dev, u8 reg, u8 value)
+static void rtd2132_write_reg(struct device *dev, u8 reg, u8 value)
{
if (RTD2132_DEBUG_REG)
printk(BIOS_DEBUG, "RTD2132 0x%02x <- 0x%02x\n", reg, value);
@@ -83,18 +83,18 @@ static void rtd2132_write_reg(device_t dev, u8 reg, u8 value)
smbus_write_byte(dev, RTD2132_DATA, value);
}
-static void rtd2132_firmware_stop(device_t dev)
+static void rtd2132_firmware_stop(struct device *dev)
{
smbus_write_byte(dev, RTD2132_FIRMWARE, RTD2132_FIRMWARE_STOP);
mdelay(60);
}
-static void rtd2132_firmware_start(device_t dev)
+static void rtd2132_firmware_start(struct device *dev)
{
smbus_write_byte(dev, RTD2132_FIRMWARE, RTD2132_FIRMWARE_START);
}
-static void rtd2132_pps(device_t dev, struct drivers_i2c_rtd2132_config *cfg)
+static void rtd2132_pps(struct device *dev, struct drivers_i2c_rtd2132_config *cfg)
{
/* T2, T5, and T7 register values are in units of 4ms. */
rtd2132_write_reg(dev, RTD2132_COMMAND_PWR_SEQ_T1, cfg->t1);
@@ -106,7 +106,7 @@ static void rtd2132_pps(device_t dev, struct drivers_i2c_rtd2132_config *cfg)
rtd2132_write_reg(dev, RTD2132_COMMAND_PWR_SEQ_T7, cfg->t7 / 4);
}
-static void rtd2132_sscg_enable(device_t dev, u8 sscg_percent)
+static void rtd2132_sscg_enable(struct device *dev, u8 sscg_percent)
{
/* SSCG_Config_0 */
rtd2132_write_reg(dev, RTD2132_COMMAND_SSCG_CONFIG_0,
@@ -116,7 +116,7 @@ static void rtd2132_sscg_enable(device_t dev, u8 sscg_percent)
rtd2132_write_reg(dev, RTD2132_COMMAND_SSCG_CONFIG_1, sscg_percent);
}
-static void rtd2132_sscg_disable(device_t dev)
+static void rtd2132_sscg_disable(struct device *dev)
{
/* SSCG_Config_0 */
rtd2132_write_reg(dev, RTD2132_COMMAND_SSCG_CONFIG_0,
@@ -127,7 +127,7 @@ static void rtd2132_sscg_disable(device_t dev)
RTD2132_SSCG_CONFIG_DISABLED);
}
-static void rtd2132_sscg(device_t dev, struct drivers_i2c_rtd2132_config *cfg)
+static void rtd2132_sscg(struct device *dev, struct drivers_i2c_rtd2132_config *cfg)
{
switch (cfg->sscg_percent) {
case RTD2132_SSCG_PERCENT_0_0:
@@ -152,7 +152,7 @@ static void rtd2132_sscg(device_t dev, struct drivers_i2c_rtd2132_config *cfg)
}
}
-static void rtd2132_lvds_swap(device_t dev,
+static void rtd2132_lvds_swap(struct device *dev,
struct drivers_i2c_rtd2132_config *cfg)
{
u8 swap_value = RTD2132_LVDS_SWAP_NORMAL;
@@ -186,7 +186,7 @@ static void rtd2132_lvds_swap(device_t dev,
rtd2132_write_reg(dev, RTD2132_COMMAND_LVDS_SWAP, swap_value);
}
-static void rtd2132_defaults(device_t dev)
+static void rtd2132_defaults(struct device *dev)
{
static const struct def_setting {
u8 reg;
@@ -207,7 +207,7 @@ static void rtd2132_defaults(device_t dev)
def_settings[i].value);
}
-static void rtd2132_setup(device_t dev)
+static void rtd2132_setup(struct device *dev)
{
struct drivers_i2c_rtd2132_config *config = dev->chip_info;
@@ -233,7 +233,7 @@ static void rtd2132_setup(device_t dev)
rtd2132_firmware_start(dev);
}
-static void rtd2132_init(device_t dev)
+static void rtd2132_init(struct device *dev)
{
if (dev->enabled && dev->path.type == DEVICE_PATH_I2C &&
ops_smbus_bus(get_pbus_smbus(dev))) {
@@ -241,7 +241,7 @@ static void rtd2132_init(device_t dev)
}
}
-static void rtd2132_noop(device_t dummy)
+static void rtd2132_noop(struct device *dummy)
{
}
diff --git a/src/drivers/i2c/w83793/w83793.c b/src/drivers/i2c/w83793/w83793.c
index 8dcfb2822c..732fdb4c6d 100644
--- a/src/drivers/i2c/w83793/w83793.c
+++ b/src/drivers/i2c/w83793/w83793.c
@@ -25,18 +25,18 @@
#include <device/smbus.h>
#include "chip.h"
-static int w83793_fan_limit(device_t dev, int fan, uint16_t limit)
+static int w83793_fan_limit(struct device *dev, int fan, uint16_t limit)
{
return smbus_write_byte(dev, 0x90 + fan * 2, limit >> 8) ||
smbus_write_byte(dev, 0x91 + fan * 2, limit & 0xff);
}
-static int w83793_bank(device_t dev, int bank)
+static int w83793_bank(struct device *dev, int bank)
{
return smbus_write_byte(dev, 0, bank);
}
-static int w83793_td_level(device_t dev, int fan, const char *level)
+static int w83793_td_level(struct device *dev, int fan, const char *level)
{
fan *= 0x10;
@@ -50,7 +50,7 @@ static int w83793_td_level(device_t dev, int fan, const char *level)
return 0;
}
-static int w83793_tr_level(device_t dev, int fan, const char *level)
+static int w83793_tr_level(struct device *dev, int fan, const char *level)
{
fan *= 0x10;
@@ -65,7 +65,7 @@ static int w83793_tr_level(device_t dev, int fan, const char *level)
}
-static int w83793_td_fan_level(device_t dev, int fan, const char *level)
+static int w83793_td_fan_level(struct device *dev, int fan, const char *level)
{
fan *= 0x10;
@@ -79,7 +79,7 @@ static int w83793_td_fan_level(device_t dev, int fan, const char *level)
return 0;
}
-static int w83793_tr_fan_level(device_t dev, int fan, const char *level)
+static int w83793_tr_fan_level(struct device *dev, int fan, const char *level)
{
fan *= 0x10;
@@ -94,7 +94,7 @@ static int w83793_tr_fan_level(device_t dev, int fan, const char *level)
}
-static void w83793_init(device_t dev)
+static void w83793_init(struct device *dev)
{
struct drivers_i2c_w83793_config *config = dev->chip_info;
uint16_t id;
@@ -220,7 +220,7 @@ static void w83793_init(device_t dev)
}
-static void w83793_noop(device_t dummy)
+static void w83793_noop(struct device *dummy)
{
}
@@ -231,7 +231,7 @@ static struct device_operations w83793_operations = {
.init = w83793_init,
};
-static void enable_dev(device_t dev)
+static void enable_dev(struct device *dev)
{
dev->ops = &w83793_operations;
}
diff --git a/src/drivers/i2c/w83795/w83795.c b/src/drivers/i2c/w83795/w83795.c
index 87aa7f5d6a..5559666f9a 100644
--- a/src/drivers/i2c/w83795/w83795.c
+++ b/src/drivers/i2c/w83795/w83795.c
@@ -221,7 +221,7 @@ static void w83795_init(w83795_fan_mode_t mode, u8 dts_src)
}
}
-static void w83795_hwm_init(device_t dev)
+static void w83795_hwm_init(struct device *dev)
{
struct device *cpu;
struct cpu_info *info;
@@ -239,7 +239,7 @@ static void w83795_hwm_init(device_t dev)
printk(BIOS_ERR, "Neither AMD nor INTEL CPU detected\n");
}
-static void w83795_noop(device_t dummy)
+static void w83795_noop(struct device *dummy)
{
}
@@ -250,7 +250,7 @@ static struct device_operations w83795_operations = {
.init = w83795_hwm_init,
};
-static void enable_dev(device_t dev)
+static void enable_dev(struct device *dev)
{
dev->ops = &w83795_operations;
}
diff --git a/src/drivers/ics/954309/ics954309.c b/src/drivers/ics/954309/ics954309.c
index ef62879e46..0aa15c059e 100644
--- a/src/drivers/ics/954309/ics954309.c
+++ b/src/drivers/ics/954309/ics954309.c
@@ -29,7 +29,7 @@
#include "chip.h"
#include <string.h>
-static void ics954309_init(device_t dev)
+static void ics954309_init(struct device *dev)
{
struct drivers_ics_954309_config *config;
u8 initdata[12];
@@ -55,7 +55,7 @@ static void ics954309_init(device_t dev)
smbus_block_write(dev, 0, 12, initdata);
}
-static void ics954309_noop(device_t dummy)
+static void ics954309_noop(struct device *dummy)
{
}
diff --git a/src/ec/compal/ene932/ec.c b/src/ec/compal/ene932/ec.c
index 2e83b4ccc4..4bf6727afc 100644
--- a/src/ec/compal/ene932/ec.c
+++ b/src/ec/compal/ene932/ec.c
@@ -132,7 +132,7 @@ static u8 ec_io_read(u16 addr)
*/
#ifndef __SMM__
-static void ene932_init(device_t dev)
+static void ene932_init(struct device *dev)
{
if (!dev->enabled)
return;
@@ -143,13 +143,13 @@ static void ene932_init(device_t dev)
}
-static void ene932_read_resources(device_t dev)
+static void ene932_read_resources(struct device *dev)
{
/* This function avoids an error on serial console. */
}
-static void ene932_enable_resources(device_t dev)
+static void ene932_enable_resources(struct device *dev)
{
/* This function avoids an error on serial console. */
}
@@ -164,7 +164,7 @@ static struct pnp_info pnp_dev_info[] = {
{ &ops, 0, 0, { 0, 0 }, }
};
-static void enable_dev(device_t dev)
+static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
pnp_dev_info);
diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c
index 4cd30f3469..5344716d47 100644
--- a/src/ec/google/chromeec/ec_lpc.c
+++ b/src/ec/google/chromeec/ec_lpc.c
@@ -137,7 +137,7 @@ int google_chromeec_command(struct chromeec_command *cec_command)
#ifndef __PRE_RAM__
#ifndef __SMM__
-static void lpc_ec_init(device_t dev)
+static void lpc_ec_init(struct device *dev)
{
if (!dev->enabled)
return;
@@ -146,12 +146,12 @@ static void lpc_ec_init(device_t dev)
google_chromeec_init();
}
-static void lpc_ec_read_resources(device_t dev)
+static void lpc_ec_read_resources(struct device *dev)
{
/* Nothing, but this function avoids an error on serial console. */
}
-static void lpc_ec_enable_resources(device_t dev)
+static void lpc_ec_enable_resources(struct device *dev)
{
/* Nothing, but this function avoids an error on serial console. */
}
@@ -166,7 +166,7 @@ static struct pnp_info pnp_dev_info[] = {
{ &ops, 0, 0, { 0, 0 }, }
};
-static void enable_dev(device_t dev)
+static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
pnp_dev_info);
diff --git a/src/ec/kontron/it8516e/ec.c b/src/ec/kontron/it8516e/ec.c
index 925b7ea524..7827a1d409 100644
--- a/src/ec/kontron/it8516e/ec.c
+++ b/src/ec/kontron/it8516e/ec.c
@@ -211,7 +211,7 @@ static void it8516e_set_fan_from_options(const config_t *const config,
}
}
-static void it8516e_pm2_init(const device_t dev)
+static void it8516e_pm2_init(struct device *dev)
{
const config_t *const config = dev->chip_info;
@@ -251,7 +251,7 @@ static struct pnp_info it8516e_dev_infos[] = {
{ NULL, IT8516E_LDN_PM3, PNP_IO0 | PNP_IO1 | PNP_IRQ0, { 0x07ff, }, { 0x07ff, }, },
};
-static void it8516e_enable(const device_t dev)
+static void it8516e_enable(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops,
ARRAY_SIZE(it8516e_dev_infos), it8516e_dev_infos);
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index 79ef3cdeeb..13b048390a 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -167,7 +167,7 @@ u8 h8_build_id_and_function_spec_version(char *buf, u8 buf_len)
return i;
}
-static void h8_smbios_strings(device_t dev, struct smbios_type11 *t)
+static void h8_smbios_strings(struct device *dev, struct smbios_type11 *t)
{
char tpec[] = "IBM ThinkPad Embedded Controller -[ ]-";
@@ -180,7 +180,7 @@ struct device_operations h8_dev_ops = {
.get_smbios_strings = h8_smbios_strings
};
-static void h8_enable(device_t dev)
+static void h8_enable(struct device *dev)
{
struct ec_lenovo_h8_config *conf = dev->chip_info;
u8 val, tmp;
diff --git a/src/ec/lenovo/pmh7/pmh7.c b/src/ec/lenovo/pmh7/pmh7.c
index cb0e27b89b..f67fbda49e 100644
--- a/src/ec/lenovo/pmh7/pmh7.c
+++ b/src/ec/lenovo/pmh7/pmh7.c
@@ -102,7 +102,7 @@ void pmh7_register_write(int reg, int val)
#ifndef __PRE_RAM__
#ifndef __SMM__
-static void enable_dev(device_t dev)
+static void enable_dev(struct device *dev)
{
struct ec_lenovo_pmh7_config *conf = dev->chip_info;
struct resource *resource;
diff --git a/src/ec/quanta/ene_kb3940q/ec.c b/src/ec/quanta/ene_kb3940q/ec.c
index f0a2308e8a..dcd9c4af05 100644
--- a/src/ec/quanta/ene_kb3940q/ec.c
+++ b/src/ec/quanta/ene_kb3940q/ec.c
@@ -141,7 +141,7 @@ static void ene_kb3940q_log_events(void)
#endif
}
-static void ene_kb3940q_init(device_t dev)
+static void ene_kb3940q_init(struct device *dev)
{
if (!dev->enabled)
return;
@@ -153,13 +153,13 @@ static void ene_kb3940q_init(device_t dev)
}
-static void ene_kb3940q_read_resources(device_t dev)
+static void ene_kb3940q_read_resources(struct device *dev)
{
/* This function avoids an error on serial console. */
}
-static void ene_kb3940q_enable_resources(device_t dev)
+static void ene_kb3940q_enable_resources(struct device *dev)
{
/* This function avoids an error on serial console. */
}
@@ -174,7 +174,7 @@ static struct pnp_info pnp_dev_info[] = {
{ &ops, 0, 0, { 0, 0 }, }
};
-static void enable_dev(device_t dev)
+static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
pnp_dev_info);
diff --git a/src/ec/quanta/it8518/ec.c b/src/ec/quanta/it8518/ec.c
index b9cb68f088..cd976e6cc0 100644
--- a/src/ec/quanta/it8518/ec.c
+++ b/src/ec/quanta/it8518/ec.c
@@ -156,7 +156,7 @@ void ec_it8518_enable_wake_events(void)
}
#ifndef __SMM__
-static void it8518_init(device_t dev)
+static void it8518_init(struct device *dev)
{
if (!dev->enabled)
return;
@@ -166,13 +166,13 @@ static void it8518_init(device_t dev)
}
-static void it8518_read_resources(device_t dev)
+static void it8518_read_resources(struct device *dev)
{
/* This function avoids an error on serial console. */
}
-static void it8518_enable_resources(device_t dev)
+static void it8518_enable_resources(struct device *dev)
{
/* This function avoids an error on serial console. */
}
@@ -187,7 +187,7 @@ static struct pnp_info pnp_dev_info[] = {
{ &ops, 0, 0, { 0, 0 }, }
};
-static void enable_dev(device_t dev)
+static void enable_dev(struct device *dev)
{
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
pnp_dev_info);
diff --git a/src/ec/smsc/mec1308/ec.c b/src/ec/smsc/mec1308/ec.c
index 4d3b30a118..0a7c4ae5a2 100644
--- a/src/ec/smsc/mec1308/ec.c
+++ b/src/ec/smsc/mec1308/ec.c
@@ -121,7 +121,7 @@ void ec_set_ports(u16 cmd_reg, u16 data_reg)
}
#if !defined(__PRE_RAM__) && !defined(__SMM__)
-static void mec1308_enable(device_t dev)
+static void mec1308_enable(struct device *dev)
{
struct ec_smsc_mec1308_config *conf = dev->chip_info;
diff --git a/src/superio/fintek/f71869ad/f71869ad_hwm.c b/src/superio/fintek/f71869ad/f71869ad_hwm.c
index 0475081193..25bc1ffaed 100644
--- a/src/superio/fintek/f71869ad/f71869ad_hwm.c
+++ b/src/superio/fintek/f71869ad/f71869ad_hwm.c
@@ -62,7 +62,7 @@ static void pnp_write_index(u16 port, u8 reg, u8 value)
}
/* note: multifunc registers need to be tweaked before here */
-void f71869ad_hwm_init(device_t dev)
+void f71869ad_hwm_init(struct device *dev)
{
const struct superio_fintek_f71869ad_config *conf = dev->chip_info;
struct resource *res = find_resource(dev, PNP_IDX_IO0);
diff --git a/src/superio/fintek/f71869ad/f71869ad_multifunc.c b/src/superio/fintek/f71869ad/f71869ad_multifunc.c
index e0182ed8c2..3374ef1f55 100644
--- a/src/superio/fintek/f71869ad/f71869ad_multifunc.c
+++ b/src/superio/fintek/f71869ad/f71869ad_multifunc.c
@@ -30,7 +30,7 @@
#define MULTI_FUNC_SEL_REG4 0x2B
#define MULTI_FUNC_SEL_REG5 0x2C
-void f71869ad_multifunc_init(device_t dev)
+void f71869ad_multifunc_init(struct device *dev)
{
const struct superio_fintek_f71869ad_config *conf = dev->chip_info;
diff --git a/src/superio/fintek/f71869ad/fintek_internal.h b/src/superio/fintek/f71869ad/fintek_internal.h
index 6856c01f99..ac96a1e4b1 100644
--- a/src/superio/fintek/f71869ad/fintek_internal.h
+++ b/src/superio/fintek/f71869ad/fintek_internal.h
@@ -24,7 +24,7 @@
#include <arch/io.h>
#include <device/pnp.h>
-void f71869ad_multifunc_init(device_t dev);
-void f71869ad_hwm_init(device_t dev);
+void f71869ad_multifunc_init(struct device *dev);
+void f71869ad_hwm_init(struct device *dev);
#endif /* SUPERIO_FINTEK_F71869AD_INTERNAL_H */
diff --git a/src/superio/ite/it8728f/it8728f_hwm.c b/src/superio/ite/it8728f/it8728f_hwm.c
index fd486a8ee6..23fa9e8830 100644
--- a/src/superio/ite/it8728f/it8728f_hwm.c
+++ b/src/superio/ite/it8728f/it8728f_hwm.c
@@ -41,7 +41,7 @@ static void pnp_write_index(u16 port, u8 reg, u8 value)
outb(value, port + 1);
}
-void it8728f_hwm_ec_init(device_t dev)
+void it8728f_hwm_ec_init(struct device *dev)
{
struct superio_ite_it8728f_config *conf = dev->chip_info;
struct resource *res = find_resource(dev, PNP_IDX_IO0);
diff --git a/src/superio/ite/it8728f/it8728f_internal.h b/src/superio/ite/it8728f/it8728f_internal.h
index 89aecb4663..6eb16afdec 100644
--- a/src/superio/ite/it8728f/it8728f_internal.h
+++ b/src/superio/ite/it8728f/it8728f_internal.h
@@ -23,6 +23,6 @@
#include <device/device.h>
-void it8728f_hwm_ec_init(device_t dev);
+void it8728f_hwm_ec_init(struct device *dev);
#endif /* SUPERIO_ITE_IT8728F_INTERNAL_H */
diff --git a/src/superio/smsc/fdc37n972/fdc37n972.c b/src/superio/smsc/fdc37n972/fdc37n972.c
index 97dea9fc3b..ff045262ff 100644
--- a/src/superio/smsc/fdc37n972/fdc37n972.c
+++ b/src/superio/smsc/fdc37n972/fdc37n972.c
@@ -24,7 +24,7 @@
#include "fdc37n972.h"
-static void init(device_t dev)
+static void init(struct device *dev)
{
if (!dev->enabled)
return;
diff --git a/src/superio/smsc/sio10n268/sio10n268.c b/src/superio/smsc/sio10n268/sio10n268.c
index fab7c41274..4635080ef9 100644
--- a/src/superio/smsc/sio10n268/sio10n268.c
+++ b/src/superio/smsc/sio10n268/sio10n268.c
@@ -23,7 +23,7 @@
#include <pc80/keyboard.h>
#include "sio10n268.h"
-static void init(device_t dev)
+static void init(struct device *dev)
{
if (!dev->enabled)
return;
diff --git a/src/superio/via/vt1211/vt1211.c b/src/superio/via/vt1211/vt1211.c
index f7a5cd9d13..8e9904bcf9 100644
--- a/src/superio/via/vt1211/vt1211.c
+++ b/src/superio/via/vt1211/vt1211.c
@@ -44,7 +44,7 @@ static u8 hwm_io_regs[] = {
0x5c,0x00, 0x5f,0x33, 0x40,0x01,
};
-static void vt1211_set_iobase(device_t dev, u8 index, u16 iobase)
+static void vt1211_set_iobase(struct device *dev, u8 index, u16 iobase)
{
switch (dev->path.pnp.device) {
case VT1211_FDC:
@@ -107,7 +107,7 @@ static void vt1211_init(struct device *dev)
}
}
-static void vt1211_pnp_enable_resources(device_t dev)
+static void vt1211_pnp_enable_resources(struct device *dev)
{
printk(BIOS_DEBUG, "%s - enabling\n", dev_path(dev));
pnp_enable_resources(dev);