device_ops: add device_t argument to write_acpi_tables

`device_t device` is missing as argument. Every device_op function
should have a `device_t device` argument.

Change-Id: I1ba4bfa0ac36a09a82b108249158c80c50f9f5fd
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: http://review.coreboot.org/9599
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Alexander Couzens 2015-04-12 22:28:37 +02:00 committed by Stefan Reinauer
parent 5eea458822
commit 83fc32f7a7
29 changed files with 63 additions and 32 deletions

View File

@ -508,7 +508,7 @@ void acpi_create_hpet(acpi_hpet_t *hpet)
header->checksum = acpi_checksum((void *)hpet, sizeof(acpi_hpet_t));
}
unsigned long acpi_write_hpet(unsigned long current, acpi_rsdp_t *rsdp)
unsigned long acpi_write_hpet(device_t device, unsigned long current, acpi_rsdp_t *rsdp)
{
acpi_hpet_t *hpet;
@ -898,7 +898,7 @@ unsigned long write_acpi_tables(unsigned long start)
for (dev = all_devices; dev; dev = dev->next) {
if (dev->ops && dev->ops->write_acpi_tables) {
current = dev->ops->write_acpi_tables(current, rsdp);
current = dev->ops->write_acpi_tables(dev, current, rsdp);
ALIGN_CURRENT;
}
}

View File

@ -537,7 +537,7 @@ void acpi_create_slit(acpi_slit_t *slit,
#if ENV_RAMSTAGE
void acpi_create_hpet(acpi_hpet_t *hpet);
unsigned long acpi_write_hpet(unsigned long start, acpi_rsdp_t *rsdp);
unsigned long acpi_write_hpet(device_t device, unsigned long start, acpi_rsdp_t *rsdp);
/* cpu/intel/speedstep/acpi.c */
void generate_cpu_entries(device_t device);

View File

@ -56,7 +56,7 @@ struct device_operations {
void (*get_smbios_strings)(device_t dev, struct smbios_type11 *t);
#endif
#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
unsigned long (*write_acpi_tables)(unsigned long start, struct acpi_rsdp *rsdp);
unsigned long (*write_acpi_tables)(device_t dev, unsigned long start, struct acpi_rsdp *rsdp);
void (*acpi_fill_ssdt_generator)(device_t dev);
void (*acpi_inject_dsdt_generator)(device_t dev);
#endif

View File

@ -119,7 +119,7 @@ unsigned long acpi_fill_madt(unsigned long current)
return current;
}
unsigned long mainboard_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp)
unsigned long mainboard_write_acpi_tables(device_t dev, unsigned long start, acpi_rsdp_t *rsdp)
{
unsigned long current;
acpi_header_t *ssdtx;

View File

@ -1 +1 @@
unsigned long mainboard_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp);
unsigned long mainboard_write_acpi_tables(device_t device, unsigned long start, acpi_rsdp_t *rsdp);

View File

@ -127,7 +127,8 @@ unsigned long acpi_fill_madt(unsigned long current)
return current;
}
unsigned long mainboard_write_acpi_tables(unsigned long current,
unsigned long mainboard_write_acpi_tables(device_t device,
unsigned long current,
acpi_rsdp_t *rsdp)
{
acpi_header_t *ssdtx;

View File

@ -1,2 +1,2 @@
unsigned long mainboard_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp);
unsigned long mainboard_write_acpi_tables(device_t device, unsigned long start, acpi_rsdp_t *rsdp);

View File

@ -1 +1 @@
unsigned long northbridge_write_acpi_tables(unsigned long start);
unsigned long northbridge_write_acpi_tables(device_t device, unsigned long start);

View File

@ -110,7 +110,9 @@ unsigned long acpi_fill_madt(unsigned long current)
}
#define ALIGN_CURRENT current = (ALIGN(current, 16))
unsigned long mainboard_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp)
unsigned long mainboard_write_acpi_tables(device_t device,
unsigned long start,
acpi_rsdp_t *rsdp)
{
unsigned long current;
acpi_header_t *ecdt;

View File

@ -1,4 +1,5 @@
struct acpi_rsdp;
unsigned long mainboard_write_acpi_tables(unsigned long start,
unsigned long mainboard_write_acpi_tables(device_t device,
unsigned long start,
struct acpi_rsdp *rsdp);

View File

@ -125,7 +125,9 @@ unsigned long acpi_fill_madt(unsigned long current)
return current;
}
unsigned long mainboard_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp)
unsigned long mainboard_write_acpi_tables(device_t device,
unsigned long start,
acpi_rsdp_t *rsdp)
{
unsigned long current;
acpi_header_t *ssdtx;

View File

@ -1 +1 @@
unsigned long mainboard_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp);
unsigned long mainboard_write_acpi_tables(device_t device, unsigned long start, acpi_rsdp_t *rsdp);

View File

@ -832,7 +832,8 @@ static void northbridge_fill_ssdt_generator(device_t device)
acpigen_pop_len();
}
static unsigned long agesa_write_acpi_tables(unsigned long current,
static unsigned long agesa_write_acpi_tables(device_t device,
unsigned long current,
acpi_rsdp_t *rsdp)
{
acpi_srat_t *srat;

View File

@ -832,7 +832,8 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest)
return (unsigned long)current;
}
static unsigned long agesa_write_acpi_tables(unsigned long current,
static unsigned long agesa_write_acpi_tables(device_t device,
unsigned long current,
acpi_rsdp_t *rsdp)
{
acpi_srat_t *srat;

View File

@ -523,7 +523,8 @@ static void northbridge_fill_ssdt_generator(device_t device)
acpigen_pop_len();
}
static unsigned long agesa_write_acpi_tables(unsigned long current,
static unsigned long agesa_write_acpi_tables(device_t device,
unsigned long current,
acpi_rsdp_t *rsdp)
{
acpi_srat_t *srat;

View File

@ -498,7 +498,8 @@ static void northbridge_fill_ssdt_generator(device_t device)
acpigen_pop_len();
}
static unsigned long agesa_write_acpi_tables(unsigned long current,
static unsigned long agesa_write_acpi_tables(device_t device,
unsigned long current,
acpi_rsdp_t *rsdp)
{
acpi_srat_t *srat;

View File

@ -498,7 +498,8 @@ static void northbridge_fill_ssdt_generator(device_t device)
acpigen_pop_len();
}
static unsigned long agesa_write_acpi_tables(unsigned long current,
static unsigned long agesa_write_acpi_tables(device_t device,
unsigned long current,
acpi_rsdp_t *rsdp)
{
acpi_srat_t *srat;

View File

@ -498,7 +498,8 @@ static void northbridge_fill_ssdt_generator(device_t device)
acpigen_pop_len();
}
static unsigned long agesa_write_acpi_tables(unsigned long current,
static unsigned long agesa_write_acpi_tables(device_t device,
unsigned long current,
acpi_rsdp_t *rsdp)
{
acpi_srat_t *srat;

View File

@ -330,8 +330,9 @@ void northbridge_acpi_write_vars(device_t device)
acpigen_pop_len();
}
unsigned long northbridge_write_acpi_tables(unsigned long current,
struct acpi_rsdp *rsdp)
unsigned long northbridge_write_acpi_tables(device_t device,
unsigned long current,
struct acpi_rsdp *rsdp)
{
acpi_srat_t *srat;
acpi_slit_t *slit;

View File

@ -1074,7 +1074,8 @@ BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, const u8 **List);
struct acpi_rsdp;
unsigned long northbridge_write_acpi_tables(unsigned long start,
unsigned long northbridge_write_acpi_tables(device_t device,
unsigned long start,
struct acpi_rsdp *rsdp);
void northbridge_acpi_write_vars(device_t device);

View File

@ -204,7 +204,10 @@ static unsigned long acpi_fill_slit(unsigned long current)
return current;
}
unsigned long northbridge_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp)
unsigned long northbridge_write_acpi_tables(
device_t device,
unsigned long start,
acpi_rsdp_t *rsdp)
{
unsigned long current;
acpi_srat_t *srat;

View File

@ -22,6 +22,6 @@
#include <arch/acpigen.h>
void k8acpi_write_vars(device_t device);
unsigned long northbridge_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp);
unsigned long northbridge_write_acpi_tables(device_t device, unsigned long start, acpi_rsdp_t *rsdp);
#endif

View File

@ -492,7 +492,8 @@ static void northbridge_fill_ssdt_generator(device_t device)
acpigen_pop_len();
}
static unsigned long agesa_write_acpi_tables(unsigned long current,
static unsigned long agesa_write_acpi_tables(device_t device,
unsigned long current,
acpi_rsdp_t *rsdp)
{
acpi_srat_t *srat;

View File

@ -486,7 +486,8 @@ static void northbridge_fill_ssdt_generator(device_t device)
acpigen_pop_len();
}
static unsigned long agesa_write_acpi_tables(unsigned long current,
static unsigned long agesa_write_acpi_tables(device_t device,
unsigned long current,
acpi_rsdp_t *rsdp)
{
acpi_srat_t *srat;

View File

@ -109,7 +109,9 @@ static unsigned long acpi_fill_dmar(unsigned long current)
}
#define ALIGN_CURRENT current = (ALIGN(current, 16))
unsigned long northbridge_write_acpi_tables(unsigned long start, struct acpi_rsdp *rsdp)
unsigned long northbridge_write_acpi_tables(device_t device,
unsigned long start,
struct acpi_rsdp *rsdp)
{
unsigned long current;
#if CONFIG_IOMMU

View File

@ -25,6 +25,7 @@
#ifndef __ACPI__
#include <rules.h>
#include <stdint.h>
typedef enum {
@ -435,8 +436,13 @@ u32 decode_igd_gtt_size(u32 gsm);
void init_iommu(void);
#if ENV_RAMSTAGE
#include <device/device.h>
struct acpi_rsdp;
unsigned long northbridge_write_acpi_tables(unsigned long start, struct acpi_rsdp *rsdp);
unsigned long northbridge_write_acpi_tables(device_t device, unsigned long start, struct acpi_rsdp *rsdp);
#endif
#endif /* !__ACPI__ */
#endif /* __NORTHBRIDGE_INTEL_GM45_GM45_H__ */

View File

@ -569,12 +569,13 @@ unsigned long acpi_madt_irq_overrides(unsigned long current)
#define ALIGN_CURRENT current = (ALIGN(current, 16))
unsigned long southcluster_write_acpi_tables(unsigned long current,
unsigned long southcluster_write_acpi_tables(device_t device,
unsigned long current,
struct acpi_rsdp *rsdp)
{
acpi_header_t *ssdt2;
current = acpi_write_hpet(current, rsdp);
current = acpi_write_hpet(device, current, rsdp);
ALIGN_CURRENT;
ssdt2 = (acpi_header_t *)current;

View File

@ -30,7 +30,8 @@ void acpi_create_serialio_ssdt(acpi_header_t *ssdt);
void acpi_fill_in_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt);
unsigned long acpi_madt_irq_overrides(unsigned long current);
void acpi_init_gnvs(global_nvs_t *gnvs);
unsigned long southcluster_write_acpi_tables(unsigned long current,
unsigned long southcluster_write_acpi_tables(device_t device,
unsigned long current,
struct acpi_rsdp *rsdp);
void southcluster_inject_dsdt(device_t device);

View File

@ -786,7 +786,9 @@ static void southbridge_inject_dsdt(device_t dev)
}
#define ALIGN_CURRENT current = (ALIGN(current, 16))
static unsigned long southbridge_write_acpi_tables(unsigned long start, struct acpi_rsdp *rsdp)
static unsigned long southbridge_write_acpi_tables(device_t device,
unsigned long start,
struct acpi_rsdp *rsdp)
{
unsigned long current;
acpi_hpet_t *hpet;