{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)
This commit is contained in:
parent
06413ff513
commit
2c9d2cf75c
|
@ -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)
|
unsigned long acpi_create_madt_lapics(unsigned long current)
|
||||||
{
|
{
|
||||||
device_t cpu;
|
struct device *cpu;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
for (cpu = all_devices; cpu; cpu = cpu->next) {
|
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);
|
acpigen_set_current((char *) current);
|
||||||
{
|
{
|
||||||
#if IS_ENABLED(CONFIG_PER_DEVICE_ACPI_TABLES)
|
#if IS_ENABLED(CONFIG_PER_DEVICE_ACPI_TABLES)
|
||||||
device_t dev;
|
struct device *dev;
|
||||||
for (dev = all_devices; dev; dev = dev->next)
|
for (dev = all_devices; dev; dev = dev->next)
|
||||||
if (dev->ops && dev->ops->acpi_fill_ssdt_generator) {
|
if (dev->ops && dev->ops->acpi_fill_ssdt_generator) {
|
||||||
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_header_t *dsdt;
|
||||||
acpi_mcfg_t *mcfg;
|
acpi_mcfg_t *mcfg;
|
||||||
acpi_madt_t *madt;
|
acpi_madt_t *madt;
|
||||||
device_t dev;
|
struct device *dev;
|
||||||
|
|
||||||
current = start;
|
current = start;
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ void smp_write_processors(struct mp_config_table *mc)
|
||||||
unsigned cpu_features;
|
unsigned cpu_features;
|
||||||
unsigned cpu_feature_flags;
|
unsigned cpu_feature_flags;
|
||||||
struct cpuid_result result;
|
struct cpuid_result result;
|
||||||
device_t cpu;
|
struct device *cpu;
|
||||||
|
|
||||||
boot_apic_id = lapicid();
|
boot_apic_id = lapicid();
|
||||||
apic_version = lapic_read(LAPIC_LVR) & 0xff;
|
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 drivers_generic_ioapic_config *ioapic_config;
|
||||||
struct mp_config_table *mc;
|
struct mp_config_table *mc;
|
||||||
int isa_bus, pin, parentpin;
|
int isa_bus, pin, parentpin;
|
||||||
device_t dev, parent, oldparent;
|
struct device *dev;
|
||||||
|
struct device *parent;
|
||||||
|
struct device *oldparent;
|
||||||
void *tmp, *v;
|
void *tmp, *v;
|
||||||
int isaioapic = -1, have_fixed_entries;
|
int isaioapic = -1, have_fixed_entries;
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,7 @@ static int smbios_write_type11(unsigned long *current, int *handle)
|
||||||
{
|
{
|
||||||
struct smbios_type11 *t = (struct smbios_type11 *)*current;
|
struct smbios_type11 *t = (struct smbios_type11 *)*current;
|
||||||
int len;
|
int len;
|
||||||
device_t dev;
|
struct device *dev;
|
||||||
|
|
||||||
memset(t, 0, sizeof *t);
|
memset(t, 0, sizeof *t);
|
||||||
t->type = SMBIOS_OEM_STRINGS;
|
t->type = SMBIOS_OEM_STRINGS;
|
||||||
|
@ -379,9 +379,9 @@ static int smbios_write_type127(unsigned long *current, int handle)
|
||||||
return len;
|
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;
|
int len = 0;
|
||||||
|
|
||||||
for(dev = tree; dev; dev = dev->next) {
|
for(dev = tree; dev; dev = dev->next) {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <cbmem.h>
|
#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,
|
ram_resource(dev, 0, CONFIG_SYS_SDRAM_BASE >> 10,
|
||||||
CONFIG_DRAM_SIZE_MB << 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 */
|
/* 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,
|
.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;
|
dev->ops = &cpu_ops;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <cpu/x86/cache.h>
|
#include <cpu/x86/cache.h>
|
||||||
#include <cpu/x86/mtrr.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 */
|
/* Turn on caching if we haven't already */
|
||||||
x86_enable_cache();
|
x86_enable_cache();
|
||||||
|
|
|
@ -89,7 +89,7 @@ static int generate_C_state_entries(void)
|
||||||
struct cpu_info *info;
|
struct cpu_info *info;
|
||||||
struct cpu_driver *cpu;
|
struct cpu_driver *cpu;
|
||||||
int len, lenif;
|
int len, lenif;
|
||||||
device_t lapic;
|
struct device *lapic;
|
||||||
struct cpu_intel_fsp_model_206ax_config *conf = NULL;
|
struct cpu_intel_fsp_model_206ax_config *conf = NULL;
|
||||||
|
|
||||||
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
|
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
|
||||||
|
|
|
@ -290,7 +290,7 @@ static void configure_mca(void)
|
||||||
/*
|
/*
|
||||||
* Initialize any extra cores/threads in this package.
|
* 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;
|
struct cpuid_result result;
|
||||||
unsigned threads_per_package, threads_per_core, i;
|
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) {
|
for (i = 1; i < threads_per_package; ++i) {
|
||||||
struct device_path cpu_path;
|
struct device_path cpu_path;
|
||||||
device_t new;
|
struct device *new;
|
||||||
|
|
||||||
/* Build the cpu device path */
|
/* Build the cpu device path */
|
||||||
cpu_path.type = DEVICE_PATH_APIC;
|
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];
|
char processor_name[49];
|
||||||
struct cpuid_result cpuid_regs;
|
struct cpuid_result cpuid_regs;
|
||||||
|
|
|
@ -55,7 +55,7 @@ static int generate_C_state_entries(void)
|
||||||
struct cpu_info *info;
|
struct cpu_info *info;
|
||||||
struct cpu_driver *cpu;
|
struct cpu_driver *cpu;
|
||||||
int len, lenif;
|
int len, lenif;
|
||||||
device_t lapic;
|
struct device *lapic;
|
||||||
struct cpu_intel_model_406dx_config *conf = NULL;
|
struct cpu_intel_model_406dx_config *conf = NULL;
|
||||||
|
|
||||||
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
|
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
|
||||||
|
|
|
@ -112,7 +112,7 @@ static void configure_mca(void)
|
||||||
/*
|
/*
|
||||||
* Initialize any extra cores/threads in this package.
|
* 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;
|
struct cpuid_result result;
|
||||||
unsigned threads_per_package, threads_per_core, i;
|
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) {
|
for (i = 1; i < threads_per_package; ++i) {
|
||||||
struct device_path cpu_path;
|
struct device_path cpu_path;
|
||||||
device_t new;
|
struct device *new;
|
||||||
|
|
||||||
/* Build the cpu device path */
|
/* Build the cpu device path */
|
||||||
cpu_path.type = DEVICE_PATH_APIC;
|
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];
|
char processor_name[49];
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ static int generate_C_state_entries(void)
|
||||||
struct cpu_info *info;
|
struct cpu_info *info;
|
||||||
struct cpu_driver *cpu;
|
struct cpu_driver *cpu;
|
||||||
int len, lenif;
|
int len, lenif;
|
||||||
device_t lapic;
|
struct device *lapic;
|
||||||
struct cpu_intel_haswell_config *conf = NULL;
|
struct cpu_intel_haswell_config *conf = NULL;
|
||||||
|
|
||||||
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
|
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
|
||||||
|
|
|
@ -597,7 +597,7 @@ static void configure_c_states(void)
|
||||||
static void configure_thermal_target(void)
|
static void configure_thermal_target(void)
|
||||||
{
|
{
|
||||||
struct cpu_intel_haswell_config *conf;
|
struct cpu_intel_haswell_config *conf;
|
||||||
device_t lapic;
|
struct device *lapic;
|
||||||
msr_t msr;
|
msr_t msr;
|
||||||
|
|
||||||
/* Find pointer to CPU configuration */
|
/* 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. */
|
/* 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 */
|
/* Clear out pending MCEs */
|
||||||
configure_mca();
|
configure_mca();
|
||||||
|
|
|
@ -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;
|
u32 value;
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ static u32 northbridge_get_base_reg(device_t dev, int reg)
|
||||||
return value;
|
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)
|
struct smm_relocation_params *params)
|
||||||
{
|
{
|
||||||
u32 tseg_size;
|
u32 tseg_size;
|
||||||
|
@ -387,7 +387,7 @@ static int install_permanent_handler(int num_cpus,
|
||||||
|
|
||||||
static int cpu_smm_setup(void)
|
static int cpu_smm_setup(void)
|
||||||
{
|
{
|
||||||
device_t dev;
|
struct device *dev;
|
||||||
int num_cpus;
|
int num_cpus;
|
||||||
msr_t msr;
|
msr_t msr;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ int intel_ht_sibling(void)
|
||||||
return !!(lapicid() & (threads-1));
|
return !!(lapicid() & (threads-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void intel_sibling_init(device_t cpu)
|
void intel_sibling_init(struct device *cpu)
|
||||||
{
|
{
|
||||||
unsigned i, siblings;
|
unsigned i, siblings;
|
||||||
struct cpuid_result result;
|
struct cpuid_result result;
|
||||||
|
@ -74,7 +74,7 @@ void intel_sibling_init(device_t cpu)
|
||||||
/* I am the primary cpu start up my siblings */
|
/* I am the primary cpu start up my siblings */
|
||||||
for(i = 1; i < siblings; i++) {
|
for(i = 1; i < siblings; i++) {
|
||||||
struct device_path cpu_path;
|
struct device_path cpu_path;
|
||||||
device_t new;
|
struct device *new;
|
||||||
/* Build the cpu device path */
|
/* Build the cpu device path */
|
||||||
cpu_path.type = DEVICE_PATH_APIC;
|
cpu_path.type = DEVICE_PATH_APIC;
|
||||||
cpu_path.apic.apic_id = cpu->path.apic.apic_id + i;
|
cpu_path.apic.apic_id = cpu->path.apic.apic_id + i;
|
||||||
|
|
|
@ -86,7 +86,7 @@ static void configure_c_states(const int quad)
|
||||||
msr_t msr;
|
msr_t msr;
|
||||||
|
|
||||||
/* Find pointer to CPU configuration. */
|
/* 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 =
|
const struct cpu_intel_model_1067x_config *const conf =
|
||||||
(lapic && lapic->chip_info) ? lapic->chip_info : NULL;
|
(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;
|
msr_t msr;
|
||||||
|
|
||||||
/* Find pointer to CPU configuration. */
|
/* 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 =
|
struct cpu_intel_model_1067x_config *const conf =
|
||||||
(lapic && lapic->chip_info) ? lapic->chip_info : NULL;
|
(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);
|
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];
|
char processor_name[49];
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ static void configure_misc(void)
|
||||||
wrmsr(IA32_MISC_ENABLE, msr);
|
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];
|
char processor_name[49];
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ static int generate_C_state_entries(void)
|
||||||
struct cpu_info *info;
|
struct cpu_info *info;
|
||||||
struct cpu_driver *cpu;
|
struct cpu_driver *cpu;
|
||||||
int len, lenif;
|
int len, lenif;
|
||||||
device_t lapic;
|
struct device *lapic;
|
||||||
struct cpu_intel_model_2065x_config *conf = NULL;
|
struct cpu_intel_model_2065x_config *conf = NULL;
|
||||||
|
|
||||||
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
|
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
|
||||||
|
|
|
@ -182,7 +182,7 @@ int cpu_config_tdp_levels(void)
|
||||||
static void configure_thermal_target(void)
|
static void configure_thermal_target(void)
|
||||||
{
|
{
|
||||||
struct cpu_intel_model_2065x_config *conf;
|
struct cpu_intel_model_2065x_config *conf;
|
||||||
device_t lapic;
|
struct device *lapic;
|
||||||
msr_t msr;
|
msr_t msr;
|
||||||
|
|
||||||
/* Find pointer to CPU configuration */
|
/* Find pointer to CPU configuration */
|
||||||
|
@ -286,7 +286,7 @@ static void configure_mca(void)
|
||||||
/*
|
/*
|
||||||
* Initialize any extra cores/threads in this package.
|
* 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;
|
struct cpuid_result result;
|
||||||
unsigned threads_per_package, threads_per_core, i;
|
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) {
|
for (i = 1; i < threads_per_package; ++i) {
|
||||||
struct device_path cpu_path;
|
struct device_path cpu_path;
|
||||||
device_t new;
|
struct device *new;
|
||||||
|
|
||||||
/* Build the cpu device path */
|
/* Build the cpu device path */
|
||||||
cpu_path.type = DEVICE_PATH_APIC;
|
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];
|
char processor_name[49];
|
||||||
struct cpuid_result cpuid_regs;
|
struct cpuid_result cpuid_regs;
|
||||||
|
|
|
@ -89,7 +89,7 @@ static int generate_C_state_entries(void)
|
||||||
struct cpu_info *info;
|
struct cpu_info *info;
|
||||||
struct cpu_driver *cpu;
|
struct cpu_driver *cpu;
|
||||||
int len, lenif;
|
int len, lenif;
|
||||||
device_t lapic;
|
struct device *lapic;
|
||||||
struct cpu_intel_model_206ax_config *conf = NULL;
|
struct cpu_intel_model_206ax_config *conf = NULL;
|
||||||
|
|
||||||
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
|
/* Find the SpeedStep CPU in the device tree using magic APIC ID */
|
||||||
|
|
|
@ -364,7 +364,7 @@ static void configure_c_states(void)
|
||||||
static void configure_thermal_target(void)
|
static void configure_thermal_target(void)
|
||||||
{
|
{
|
||||||
struct cpu_intel_model_206ax_config *conf;
|
struct cpu_intel_model_206ax_config *conf;
|
||||||
device_t lapic;
|
struct device *lapic;
|
||||||
msr_t msr;
|
msr_t msr;
|
||||||
|
|
||||||
/* Find pointer to CPU configuration */
|
/* Find pointer to CPU configuration */
|
||||||
|
@ -477,7 +477,7 @@ static void configure_mca(void)
|
||||||
/*
|
/*
|
||||||
* Initialize any extra cores/threads in this package.
|
* 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;
|
struct cpuid_result result;
|
||||||
unsigned threads_per_package, threads_per_core, i;
|
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) {
|
for (i = 1; i < threads_per_package; ++i) {
|
||||||
struct device_path cpu_path;
|
struct device_path cpu_path;
|
||||||
device_t new;
|
struct device *new;
|
||||||
|
|
||||||
/* Build the cpu device path */
|
/* Build the cpu device path */
|
||||||
cpu_path.type = DEVICE_PATH_APIC;
|
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];
|
char processor_name[49];
|
||||||
struct cpuid_result cpuid_regs;
|
struct cpuid_result cpuid_regs;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <cpu/x86/cache.h>
|
#include <cpu/x86/cache.h>
|
||||||
#include <cpu/intel/l2_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 */
|
/* Update the microcode */
|
||||||
intel_update_microcode_from_cbfs();
|
intel_update_microcode_from_cbfs();
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <cpu/x86/msr.h>
|
#include <cpu/x86/msr.h>
|
||||||
#include <cpu/intel/l2_cache.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 */
|
/* Update the microcode */
|
||||||
intel_update_microcode_from_cbfs();
|
intel_update_microcode_from_cbfs();
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include <cpu/x86/cache.h>
|
#include <cpu/x86/cache.h>
|
||||||
#include <cpu/x86/name.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];
|
char processor_name[49];
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <cpu/intel/microcode.h>
|
#include <cpu/intel/microcode.h>
|
||||||
#include <cpu/x86/cache.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 */
|
/* Turn on caching if we haven't already */
|
||||||
x86_enable_cache();
|
x86_enable_cache();
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include <cpu/x86/cache.h>
|
#include <cpu/x86/cache.h>
|
||||||
#include <cpu/x86/name.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];
|
char processor_name[49];
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <cpu/intel/microcode.h>
|
#include <cpu/intel/microcode.h>
|
||||||
#include <cpu/x86/cache.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 */
|
/* Turn on caching if we haven't already */
|
||||||
x86_enable_cache();
|
x86_enable_cache();
|
||||||
|
|
|
@ -141,7 +141,7 @@ static void configure_pic_thermal_sensors(void)
|
||||||
wrmsr(PIC_SENS_CFG, msr);
|
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];
|
char processor_name[49];
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ static void configure_pic_thermal_sensors(void)
|
||||||
wrmsr(PIC_SENS_CFG, msr);
|
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];
|
char processor_name[49];
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <cpu/intel/microcode.h>
|
#include <cpu/intel/microcode.h>
|
||||||
#include <cpu/x86/cache.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 */
|
/* Turn on caching if we haven't already */
|
||||||
x86_enable_cache();
|
x86_enable_cache();
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <cpu/intel/microcode.h>
|
#include <cpu/intel/microcode.h>
|
||||||
#include <cpu/x86/cache.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 */
|
/* Turn on caching if we haven't already */
|
||||||
x86_enable_cache();
|
x86_enable_cache();
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <cpu/intel/microcode.h>
|
#include <cpu/intel/microcode.h>
|
||||||
#include <cpu/x86/cache.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 */
|
/* Turn on caching if we haven't already */
|
||||||
x86_enable_cache();
|
x86_enable_cache();
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <cpu/intel/hyperthreading.h>
|
#include <cpu/intel/hyperthreading.h>
|
||||||
#include <cpu/x86/cache.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 */
|
/* Turn on caching if we haven't already */
|
||||||
x86_enable_cache();
|
x86_enable_cache();
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <cpu/intel/hyperthreading.h>
|
#include <cpu/intel/hyperthreading.h>
|
||||||
#include <cpu/x86/cache.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 */
|
/* Turn on caching if we haven't already */
|
||||||
x86_enable_cache();
|
x86_enable_cache();
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <cpu/intel/hyperthreading.h>
|
#include <cpu/intel/hyperthreading.h>
|
||||||
#include <cpu/x86/cache.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 */
|
/* Turn on caching if we haven't already */
|
||||||
x86_enable_cache();
|
x86_enable_cache();
|
||||||
|
|
|
@ -44,7 +44,7 @@ int __attribute__((weak)) get_cst_entries(acpi_cstate_t **entries
|
||||||
|
|
||||||
static int determine_total_number_of_cores(void)
|
static int determine_total_number_of_cores(void)
|
||||||
{
|
{
|
||||||
device_t cpu;
|
struct device *cpu;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for(cpu = all_devices; cpu; cpu = cpu->next) {
|
for(cpu = all_devices; cpu; cpu = cpu->next) {
|
||||||
if ((cpu->path.type != DEVICE_PATH_APIC) ||
|
if ((cpu->path.type != DEVICE_PATH_APIC) ||
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <cpu/x86/lapic.h>
|
#include <cpu/x86/lapic.h>
|
||||||
#include <cpu/x86/cache.h>
|
#include <cpu/x86/cache.h>
|
||||||
|
|
||||||
static void c3_init(device_t dev)
|
static void c3_init(struct device *dev)
|
||||||
{
|
{
|
||||||
x86_enable_cache();
|
x86_enable_cache();
|
||||||
x86_setup_mtrrs();
|
x86_setup_mtrrs();
|
||||||
|
|
|
@ -147,7 +147,7 @@ static void set_c7_speed(int model) {
|
||||||
printk(BIOS_INFO, "Current CPU multiplier: %dx\n", (int)((msr.lo >> 8) & 0xff));
|
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;
|
u8 brand;
|
||||||
struct cpuinfo_x86 c;
|
struct cpuinfo_x86 c;
|
||||||
|
|
|
@ -139,7 +139,7 @@ static void nano_power(void)
|
||||||
wrmsr(MSR_IA32_MISC_ENABLE, msr);
|
wrmsr(MSR_IA32_MISC_ENABLE, msr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nano_init(device_t dev)
|
static void nano_init(struct device *dev)
|
||||||
{
|
{
|
||||||
struct cpuinfo_x86 c;
|
struct cpuinfo_x86 c;
|
||||||
|
|
||||||
|
|
|
@ -253,7 +253,7 @@ static void *stacks[CONFIG_MAX_CPUS];
|
||||||
volatile unsigned long secondary_stack;
|
volatile unsigned long secondary_stack;
|
||||||
volatile unsigned int secondary_cpu_index;
|
volatile unsigned int secondary_cpu_index;
|
||||||
|
|
||||||
int start_cpu(device_t cpu)
|
int start_cpu(struct device *cpu)
|
||||||
{
|
{
|
||||||
struct cpu_info *info;
|
struct cpu_info *info;
|
||||||
unsigned long stack_end;
|
unsigned long stack_end;
|
||||||
|
@ -430,9 +430,9 @@ void asmlinkage secondary_cpu_init(unsigned int index)
|
||||||
stop_this_cpu();
|
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 */
|
/* Loop through the cpus once getting them started */
|
||||||
|
|
||||||
for(cpu = cpu_bus->children; cpu ; cpu = cpu->sibling) {
|
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)
|
static void wait_other_cpus_stop(struct bus *cpu_bus)
|
||||||
{
|
{
|
||||||
device_t cpu;
|
struct device *cpu;
|
||||||
int old_active_count, active_count;
|
int old_active_count, active_count;
|
||||||
long loopcount = 0;
|
long loopcount = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -86,7 +86,7 @@ struct mp_flight_plan {
|
||||||
static struct mp_flight_plan mp_info;
|
static struct mp_flight_plan mp_info;
|
||||||
|
|
||||||
struct cpu_map {
|
struct cpu_map {
|
||||||
device_t dev;
|
struct device *dev;
|
||||||
int apic_id;
|
int apic_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ static int allocate_cpu_devices(struct bus *cpu_bus, struct mp_params *p)
|
||||||
info = cpu_info();
|
info = cpu_info();
|
||||||
for (i = 1; i < max_cpus; i++) {
|
for (i = 1; i < max_cpus; i++) {
|
||||||
struct device_path cpu_path;
|
struct device_path cpu_path;
|
||||||
device_t new;
|
struct device *new;
|
||||||
int apic_id;
|
int apic_id;
|
||||||
|
|
||||||
/* Build the cpu device path */
|
/* Build the cpu device path */
|
||||||
|
|
|
@ -489,7 +489,7 @@ static void aty_calc_mem_refresh(struct fb_info_aty *info, u16 id, int xclk)
|
||||||
info->mem_refresh_rate = i;
|
info->mem_refresh_rate = i;
|
||||||
}
|
}
|
||||||
#endif /*CONFIG_CONSOLE_BTEXT */
|
#endif /*CONFIG_CONSOLE_BTEXT */
|
||||||
static void ati_ragexl_init(device_t dev)
|
static void ati_ragexl_init(struct device *dev)
|
||||||
{
|
{
|
||||||
u32 chip_id;
|
u32 chip_id;
|
||||||
int j;
|
int j;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <device/pci_ids.h>
|
#include <device/pci_ids.h>
|
||||||
#include <console/console.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");
|
printk(BIOS_DEBUG, "Initializing DECchip 21143\n");
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ static int bochs_read(int index)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void bochs_init(device_t dev)
|
static void bochs_init(struct device *dev)
|
||||||
{
|
{
|
||||||
#if IS_ENABLED(CONFIG_FRAMEBUFFER_KEEP_VESA_MODE)
|
#if IS_ENABLED(CONFIG_FRAMEBUFFER_KEEP_VESA_MODE)
|
||||||
struct edid edid;
|
struct edid edid;
|
||||||
|
|
|
@ -212,7 +212,7 @@ write_hidden_dac (uint8_t data)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void cirrus_init(device_t dev)
|
static void cirrus_init(struct device *dev)
|
||||||
{
|
{
|
||||||
#if IS_ENABLED(CONFIG_FRAMEBUFFER_KEEP_VESA_MODE)
|
#if IS_ENABLED(CONFIG_FRAMEBUFFER_KEEP_VESA_MODE)
|
||||||
uint8_t cr_ext, cr_overlay;
|
uint8_t cr_ext, cr_overlay;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#include <cpu/x86/lapic.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;
|
struct drivers_generic_ioapic_config *config = dev->chip_info;
|
||||||
u32 bsp_lapicid = lapicid();
|
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 drivers_generic_ioapic_config *config = (struct drivers_generic_ioapic_config *)dev->chip_info;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#define ADM1026_REG_CONFIG2 0x01
|
#define ADM1026_REG_CONFIG2 0x01
|
||||||
#define ADM1026_REG_CONFIG3 0x07
|
#define ADM1026_REG_CONFIG3 0x07
|
||||||
|
|
||||||
static void adm1026_enable_monitoring(device_t dev)
|
static void adm1026_enable_monitoring(struct device *dev)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
result = smbus_read_byte(dev, ADM1026_REG_CONFIG1);
|
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 (dev->enabled && dev->path.type == DEVICE_PATH_I2C) {
|
||||||
if (ops_smbus_bus(get_pbus_smbus(dev))) {
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#define ADM1027_REG_CONFIG2 0x73
|
#define ADM1027_REG_CONFIG2 0x73
|
||||||
#define ADM1027_REG_CONFIG3 0x78
|
#define ADM1027_REG_CONFIG3 0x78
|
||||||
|
|
||||||
static void adm1027_enable_monitoring(device_t dev)
|
static void adm1027_enable_monitoring(struct device *dev)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ static void adm1027_enable_monitoring(device_t dev)
|
||||||
printk(BIOS_DEBUG, "ADM1027: monitoring enabled\n");
|
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 (dev->enabled && dev->path.type == DEVICE_PATH_I2C) {
|
||||||
if (ops_smbus_bus(get_pbus_smbus(dev))) {
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
* See Analog Devices ADT7463 datasheet, Rev C (2004):
|
* See Analog Devices ADT7463 datasheet, Rev C (2004):
|
||||||
* http://www.analog.com/en/prod/0,,766_825_ADT7463,00.html
|
* 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;
|
int result;
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ static void adt7463_init(device_t adt7463)
|
||||||
printk(BIOS_DEBUG, "ADT7463 properly initialized\n");
|
printk(BIOS_DEBUG, "ADT7463 properly initialized\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void adt7463_noop(device_t dummy)
|
static void adt7463_noop(struct device *dummy)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <smbios.h>
|
#include <smbios.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
|
|
||||||
static void at24rf08c_init(device_t dev)
|
static void at24rf08c_init(struct device *dev)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ static void at24rf08c_init(device_t dev)
|
||||||
printk (BIOS_DEBUG, "init EEPROM done\n");
|
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,
|
.init = at24rf08c_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
dev->ops = &at24rf08c_operations;
|
dev->ops = &at24rf08c_operations;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,16 +28,16 @@
|
||||||
|
|
||||||
#define ERROR_STRING "*INVALID*"
|
#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);
|
dev = dev_find_slot_on_smbus(1, 0x54 | bank);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
printk(BIOS_WARNING, "EEPROM not found\n");
|
printk(BIOS_WARNING, "EEPROM not found\n");
|
||||||
return dev;
|
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 t = -1;
|
||||||
int j;
|
int j;
|
||||||
|
@ -54,7 +54,7 @@ static int at24rf08c_read_byte(device_t dev, u8 addr)
|
||||||
return t;
|
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)
|
u8 len, char *result)
|
||||||
{
|
{
|
||||||
int i;
|
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)
|
static void at24rf08c_read_string(u8 bank, u8 start, u8 len, char *result)
|
||||||
{
|
{
|
||||||
device_t dev;
|
struct device *dev;
|
||||||
|
|
||||||
dev = at24rf08c_find_bank(bank);
|
dev = at24rf08c_find_bank(bank);
|
||||||
if (dev == 0) {
|
if (dev == 0) {
|
||||||
|
@ -124,7 +124,7 @@ void smbios_mainboard_set_uuid(u8 *uuid)
|
||||||
static char result[16];
|
static char result[16];
|
||||||
unsigned i;
|
unsigned i;
|
||||||
static int already_read;
|
static int already_read;
|
||||||
device_t dev;
|
struct device *dev;
|
||||||
const int remap[16] = {
|
const int remap[16] = {
|
||||||
/* UUID byteswap. */
|
/* UUID byteswap. */
|
||||||
3, 2, 1, 0, 5, 4, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15
|
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 char result[100];
|
||||||
static int already_read;
|
static int already_read;
|
||||||
device_t dev;
|
struct device *dev;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
if (already_read)
|
if (already_read)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
#include <cpu/x86/msr.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 (dev->enabled && dev->path.type == DEVICE_PATH_I2C) {
|
||||||
if (ops_smbus_bus(get_pbus_smbus(dev))) {
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
#include <cpu/x86/msr.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 (dev->enabled && dev->path.type == DEVICE_PATH_I2C) {
|
||||||
if (ops_smbus_bus(get_pbus_smbus(dev))) {
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
#include <cpu/x86/msr.h>
|
#include <cpu/x86/msr.h>
|
||||||
|
|
||||||
static void lm63_init(device_t dev)
|
static void lm63_init(struct device *dev)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) {
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
|
|
||||||
#define RTD2132_DEBUG_REG 0
|
#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)
|
if (RTD2132_DEBUG_REG)
|
||||||
printk(BIOS_DEBUG, "RTD2132 0x%02x <- 0x%02x\n", reg, value);
|
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);
|
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);
|
smbus_write_byte(dev, RTD2132_FIRMWARE, RTD2132_FIRMWARE_STOP);
|
||||||
mdelay(60);
|
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);
|
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. */
|
/* T2, T5, and T7 register values are in units of 4ms. */
|
||||||
rtd2132_write_reg(dev, RTD2132_COMMAND_PWR_SEQ_T1, cfg->t1);
|
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);
|
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 */
|
/* SSCG_Config_0 */
|
||||||
rtd2132_write_reg(dev, RTD2132_COMMAND_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);
|
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 */
|
/* SSCG_Config_0 */
|
||||||
rtd2132_write_reg(dev, RTD2132_COMMAND_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);
|
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) {
|
switch (cfg->sscg_percent) {
|
||||||
case RTD2132_SSCG_PERCENT_0_0:
|
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)
|
struct drivers_i2c_rtd2132_config *cfg)
|
||||||
{
|
{
|
||||||
u8 swap_value = RTD2132_LVDS_SWAP_NORMAL;
|
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);
|
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 {
|
static const struct def_setting {
|
||||||
u8 reg;
|
u8 reg;
|
||||||
|
@ -207,7 +207,7 @@ static void rtd2132_defaults(device_t dev)
|
||||||
def_settings[i].value);
|
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;
|
struct drivers_i2c_rtd2132_config *config = dev->chip_info;
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ static void rtd2132_setup(device_t dev)
|
||||||
rtd2132_firmware_start(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 &&
|
if (dev->enabled && dev->path.type == DEVICE_PATH_I2C &&
|
||||||
ops_smbus_bus(get_pbus_smbus(dev))) {
|
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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,18 +25,18 @@
|
||||||
#include <device/smbus.h>
|
#include <device/smbus.h>
|
||||||
#include "chip.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) ||
|
return smbus_write_byte(dev, 0x90 + fan * 2, limit >> 8) ||
|
||||||
smbus_write_byte(dev, 0x91 + fan * 2, limit & 0xff);
|
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);
|
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;
|
fan *= 0x10;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ static int w83793_td_level(device_t dev, int fan, const char *level)
|
||||||
return 0;
|
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;
|
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;
|
fan *= 0x10;
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ static int w83793_td_fan_level(device_t dev, int fan, const char *level)
|
||||||
return 0;
|
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;
|
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;
|
struct drivers_i2c_w83793_config *config = dev->chip_info;
|
||||||
uint16_t id;
|
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,
|
.init = w83793_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
dev->ops = &w83793_operations;
|
dev->ops = &w83793_operations;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 device *cpu;
|
||||||
struct cpu_info *info;
|
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");
|
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,
|
.init = w83795_hwm_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void enable_dev(device_t dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
dev->ops = &w83795_operations;
|
dev->ops = &w83795_operations;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static void ics954309_init(device_t dev)
|
static void ics954309_init(struct device *dev)
|
||||||
{
|
{
|
||||||
struct drivers_ics_954309_config *config;
|
struct drivers_ics_954309_config *config;
|
||||||
u8 initdata[12];
|
u8 initdata[12];
|
||||||
|
@ -55,7 +55,7 @@ static void ics954309_init(device_t dev)
|
||||||
smbus_block_write(dev, 0, 12, initdata);
|
smbus_block_write(dev, 0, 12, initdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ics954309_noop(device_t dummy)
|
static void ics954309_noop(struct device *dummy)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ static u8 ec_io_read(u16 addr)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SMM__
|
#ifndef __SMM__
|
||||||
static void ene932_init(device_t dev)
|
static void ene932_init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
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. */
|
/* 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. */
|
/* This function avoids an error on serial console. */
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, 0, 0, { 0, 0 }, }
|
{ &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_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
|
||||||
pnp_dev_info);
|
pnp_dev_info);
|
||||||
|
|
|
@ -137,7 +137,7 @@ int google_chromeec_command(struct chromeec_command *cec_command)
|
||||||
#ifndef __PRE_RAM__
|
#ifndef __PRE_RAM__
|
||||||
|
|
||||||
#ifndef __SMM__
|
#ifndef __SMM__
|
||||||
static void lpc_ec_init(device_t dev)
|
static void lpc_ec_init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
@ -146,12 +146,12 @@ static void lpc_ec_init(device_t dev)
|
||||||
google_chromeec_init();
|
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. */
|
/* 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. */
|
/* 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 }, }
|
{ &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_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
|
||||||
pnp_dev_info);
|
pnp_dev_info);
|
||||||
|
|
|
@ -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;
|
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, }, },
|
{ 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,
|
pnp_enable_devices(dev, &pnp_ops,
|
||||||
ARRAY_SIZE(it8516e_dev_infos), it8516e_dev_infos);
|
ARRAY_SIZE(it8516e_dev_infos), it8516e_dev_infos);
|
||||||
|
|
|
@ -167,7 +167,7 @@ u8 h8_build_id_and_function_spec_version(char *buf, u8 buf_len)
|
||||||
return i;
|
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 -[ ]-";
|
char tpec[] = "IBM ThinkPad Embedded Controller -[ ]-";
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ struct device_operations h8_dev_ops = {
|
||||||
.get_smbios_strings = h8_smbios_strings
|
.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;
|
struct ec_lenovo_h8_config *conf = dev->chip_info;
|
||||||
u8 val, tmp;
|
u8 val, tmp;
|
||||||
|
|
|
@ -102,7 +102,7 @@ void pmh7_register_write(int reg, int val)
|
||||||
|
|
||||||
#ifndef __PRE_RAM__
|
#ifndef __PRE_RAM__
|
||||||
#ifndef __SMM__
|
#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 ec_lenovo_pmh7_config *conf = dev->chip_info;
|
||||||
struct resource *resource;
|
struct resource *resource;
|
||||||
|
|
|
@ -141,7 +141,7 @@ static void ene_kb3940q_log_events(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ene_kb3940q_init(device_t dev)
|
static void ene_kb3940q_init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
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. */
|
/* 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. */
|
/* This function avoids an error on serial console. */
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, 0, 0, { 0, 0 }, }
|
{ &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_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
|
||||||
pnp_dev_info);
|
pnp_dev_info);
|
||||||
|
|
|
@ -156,7 +156,7 @@ void ec_it8518_enable_wake_events(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __SMM__
|
#ifndef __SMM__
|
||||||
static void it8518_init(device_t dev)
|
static void it8518_init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
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. */
|
/* 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. */
|
/* This function avoids an error on serial console. */
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ static struct pnp_info pnp_dev_info[] = {
|
||||||
{ &ops, 0, 0, { 0, 0 }, }
|
{ &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_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info),
|
||||||
pnp_dev_info);
|
pnp_dev_info);
|
||||||
|
|
|
@ -121,7 +121,7 @@ void ec_set_ports(u16 cmd_reg, u16 data_reg)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(__PRE_RAM__) && !defined(__SMM__)
|
#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;
|
struct ec_smsc_mec1308_config *conf = dev->chip_info;
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ static void pnp_write_index(u16 port, u8 reg, u8 value)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* note: multifunc registers need to be tweaked before here */
|
/* 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;
|
const struct superio_fintek_f71869ad_config *conf = dev->chip_info;
|
||||||
struct resource *res = find_resource(dev, PNP_IDX_IO0);
|
struct resource *res = find_resource(dev, PNP_IDX_IO0);
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#define MULTI_FUNC_SEL_REG4 0x2B
|
#define MULTI_FUNC_SEL_REG4 0x2B
|
||||||
#define MULTI_FUNC_SEL_REG5 0x2C
|
#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;
|
const struct superio_fintek_f71869ad_config *conf = dev->chip_info;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#include <device/pnp.h>
|
#include <device/pnp.h>
|
||||||
|
|
||||||
void f71869ad_multifunc_init(device_t dev);
|
void f71869ad_multifunc_init(struct device *dev);
|
||||||
void f71869ad_hwm_init(device_t dev);
|
void f71869ad_hwm_init(struct device *dev);
|
||||||
|
|
||||||
#endif /* SUPERIO_FINTEK_F71869AD_INTERNAL_H */
|
#endif /* SUPERIO_FINTEK_F71869AD_INTERNAL_H */
|
||||||
|
|
|
@ -41,7 +41,7 @@ static void pnp_write_index(u16 port, u8 reg, u8 value)
|
||||||
outb(value, port + 1);
|
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 superio_ite_it8728f_config *conf = dev->chip_info;
|
||||||
struct resource *res = find_resource(dev, PNP_IDX_IO0);
|
struct resource *res = find_resource(dev, PNP_IDX_IO0);
|
||||||
|
|
|
@ -23,6 +23,6 @@
|
||||||
|
|
||||||
#include <device/device.h>
|
#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 */
|
#endif /* SUPERIO_ITE_IT8728F_INTERNAL_H */
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include "fdc37n972.h"
|
#include "fdc37n972.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include "sio10n268.h"
|
#include "sio10n268.h"
|
||||||
|
|
||||||
static void init(device_t dev)
|
static void init(struct device *dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -44,7 +44,7 @@ static u8 hwm_io_regs[] = {
|
||||||
0x5c,0x00, 0x5f,0x33, 0x40,0x01,
|
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) {
|
switch (dev->path.pnp.device) {
|
||||||
case VT1211_FDC:
|
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));
|
printk(BIOS_DEBUG, "%s - enabling\n", dev_path(dev));
|
||||||
pnp_enable_resources(dev);
|
pnp_enable_resources(dev);
|
||||||
|
|
Loading…
Reference in New Issue