acpi: Remove explicit pointer tracking in per-device ssdt.
It's useless and error-prone. Change-Id: Ie385e147d42b05290ab8c3ca193c5c871306f4ac Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/7018 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
parent
334fd8e28b
commit
0a66991a34
|
@ -281,8 +281,9 @@ void acpi_create_ssdt_generator(acpi_header_t *ssdt, const char *oem_table_id)
|
|||
device_t dev;
|
||||
for (dev = all_devices; dev; dev = dev->next)
|
||||
if (dev->ops && dev->ops->acpi_fill_ssdt_generator) {
|
||||
current = dev->ops->acpi_fill_ssdt_generator(current, oem_table_id);
|
||||
dev->ops->acpi_fill_ssdt_generator();
|
||||
}
|
||||
current = (unsigned long) acpigen_get_current();
|
||||
#else
|
||||
current = acpi_fill_ssdt_generator(current, oem_table_id);
|
||||
#endif
|
||||
|
|
|
@ -59,8 +59,7 @@ struct device_operations {
|
|||
#endif
|
||||
#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLES) && IS_ENABLED(CONFIG_PER_DEVICE_ACPI_TABLES)
|
||||
unsigned long (*write_acpi_tables)(unsigned long start, struct acpi_rsdp *rsdp);
|
||||
unsigned long (*acpi_fill_ssdt_generator)(unsigned long current,
|
||||
const char *oem_table_id);
|
||||
void (*acpi_fill_ssdt_generator)(void);
|
||||
void (*acpi_inject_dsdt_generator)(void);
|
||||
#endif
|
||||
const struct pci_operations *ops_pci;
|
||||
|
|
|
@ -112,11 +112,9 @@ static void mainboard_init(device_t dev)
|
|||
0x42, 0x142);
|
||||
}
|
||||
|
||||
static unsigned long fill_ssdt(unsigned long current,
|
||||
const char *oem_table_id)
|
||||
static void fill_ssdt(void)
|
||||
{
|
||||
drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0);
|
||||
return (unsigned long) (acpigen_get_current());
|
||||
}
|
||||
|
||||
static void mainboard_enable(device_t dev)
|
||||
|
|
|
@ -194,10 +194,3 @@ int init_igd_opregion(igd_opregion_t *opregion)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long northbridge_acpi_fill_ssdt_generator(unsigned long current,
|
||||
const char *oem_table_id)
|
||||
{
|
||||
generate_cpu_entries();
|
||||
return (unsigned long) (acpigen_get_current());
|
||||
}
|
||||
|
|
|
@ -229,8 +229,6 @@ struct mrc_data_container *find_current_mrc_cache(void);
|
|||
#if !defined(__PRE_RAM__)
|
||||
#include "gma.h"
|
||||
int init_igd_opregion(igd_opregion_t *igd_opregion);
|
||||
unsigned long northbridge_acpi_fill_ssdt_generator(unsigned long current,
|
||||
const char *oem_table_id);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -463,7 +463,7 @@ static struct device_operations mc_ops = {
|
|||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = northbridge_init,
|
||||
.enable = northbridge_enable,
|
||||
.acpi_fill_ssdt_generator = northbridge_acpi_fill_ssdt_generator,
|
||||
.acpi_fill_ssdt_generator = generate_cpu_entries,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &intel_pci_ops,
|
||||
};
|
||||
|
|
|
@ -211,11 +211,3 @@ void *igd_make_opregion(void)
|
|||
init_igd_opregion(opregion);
|
||||
return opregion;
|
||||
}
|
||||
|
||||
unsigned long northbridge_acpi_fill_ssdt_generator(unsigned long current,
|
||||
const char *oem_table_id)
|
||||
{
|
||||
generate_cpu_entries();
|
||||
return (unsigned long) (acpigen_get_current());
|
||||
}
|
||||
|
||||
|
|
|
@ -619,8 +619,6 @@ struct mrc_data_container *find_current_mrc_cache(void);
|
|||
#if !defined(__PRE_RAM__)
|
||||
#include "gma.h"
|
||||
int init_igd_opregion(igd_opregion_t *igd_opregion);
|
||||
unsigned long northbridge_acpi_fill_ssdt_generator(unsigned long current,
|
||||
const char *oem_table_id);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -313,7 +313,7 @@ static struct device_operations mc_ops = {
|
|||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = northbridge_init,
|
||||
.enable = northbridge_enable,
|
||||
.acpi_fill_ssdt_generator = northbridge_acpi_fill_ssdt_generator,
|
||||
.acpi_fill_ssdt_generator = generate_cpu_entries,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &intel_pci_ops,
|
||||
};
|
||||
|
|
|
@ -214,10 +214,3 @@ void *igd_make_opregion(void)
|
|||
return opregion;
|
||||
}
|
||||
|
||||
unsigned long northbridge_acpi_fill_ssdt_generator(unsigned long current,
|
||||
const char *oem_table_id)
|
||||
{
|
||||
generate_cpu_entries();
|
||||
return (unsigned long) (acpigen_get_current());
|
||||
}
|
||||
|
||||
|
|
|
@ -444,8 +444,7 @@ static struct device_operations mc_ops = {
|
|||
.enable = northbridge_enable,
|
||||
.scan_bus = 0,
|
||||
.ops_pci = &intel_pci_ops,
|
||||
.acpi_fill_ssdt_generator = northbridge_acpi_fill_ssdt_generator,
|
||||
|
||||
.acpi_fill_ssdt_generator = generate_cpu_entries,
|
||||
};
|
||||
|
||||
static const struct pci_driver mc_driver_0100 __pci_driver = {
|
||||
|
|
|
@ -235,8 +235,6 @@ struct mrc_data_container *find_current_mrc_cache(void);
|
|||
#if !defined(__PRE_RAM__)
|
||||
#include "gma.h"
|
||||
int init_igd_opregion(igd_opregion_t *igd_opregion);
|
||||
unsigned long northbridge_acpi_fill_ssdt_generator(unsigned long current,
|
||||
const char *oem_table_id);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue