summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/facebook/fbg1701/acpi_tables.c16
-rw-r--r--src/mainboard/google/cyan/acpi_tables.c17
-rw-r--r--src/mainboard/intel/strago/acpi_tables.c19
-rw-r--r--src/mainboard/portwell/m107/acpi_tables.c16
-rw-r--r--src/mainboard/protectli/vault_bsw/acpi_tables.c14
-rw-r--r--src/soc/intel/braswell/acpi.c18
-rw-r--r--src/soc/intel/braswell/include/soc/acpi.h1
7 files changed, 16 insertions, 85 deletions
diff --git a/src/mainboard/facebook/fbg1701/acpi_tables.c b/src/mainboard/facebook/fbg1701/acpi_tables.c
index 92db5b69db..226da413fc 100644
--- a/src/mainboard/facebook/fbg1701/acpi_tables.c
+++ b/src/mainboard/facebook/fbg1701/acpi_tables.c
@@ -2,8 +2,6 @@
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
-#include <arch/ioapic.h>
-#include <soc/acpi.h>
#include <soc/nvs.h>
#include <soc/device_nvs.h>
@@ -25,20 +23,6 @@ void mainboard_fill_gnvs(struct global_nvs *gnvs)
dev_nvs->lpss_en[LPSS_NVS_I2C2] = 0;
}
-unsigned long acpi_fill_madt(unsigned long current)
-{
- /* Local APICs */
- current = acpi_create_madt_lapics(current);
-
- /* IOAPIC */
- current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current,
- 2, IO_APIC_ADDR, 0);
-
- current = acpi_madt_irq_overrides(current);
-
- return current;
-}
-
void mainboard_fill_fadt(acpi_fadt_t *fadt)
{
fadt->preferred_pm_profile = PM_MOBILE;
diff --git a/src/mainboard/google/cyan/acpi_tables.c b/src/mainboard/google/cyan/acpi_tables.c
index 08f21ba1cf..42380d51b3 100644
--- a/src/mainboard/google/cyan/acpi_tables.c
+++ b/src/mainboard/google/cyan/acpi_tables.c
@@ -1,10 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
-#include <arch/ioapic.h>
#include <boardid.h>
-#include <soc/acpi.h>
#include <soc/nvs.h>
#include <soc/device_nvs.h>
@@ -28,17 +25,3 @@ void mainboard_fill_gnvs(struct global_nvs *gnvs)
gnvs->bdid = board_id();
}
-
-unsigned long acpi_fill_madt(unsigned long current)
-{
- /* Local APICs */
- current = acpi_create_madt_lapics(current);
-
- /* IOAPIC */
- current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current,
- 2, IO_APIC_ADDR, 0);
-
- current = acpi_madt_irq_overrides(current);
-
- return current;
-}
diff --git a/src/mainboard/intel/strago/acpi_tables.c b/src/mainboard/intel/strago/acpi_tables.c
index 9f8187fcf2..c47e582322 100644
--- a/src/mainboard/intel/strago/acpi_tables.c
+++ b/src/mainboard/intel/strago/acpi_tables.c
@@ -2,13 +2,8 @@
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
-#include <arch/ioapic.h>
-#include <device/device.h>
-#include <soc/acpi.h>
-#include <soc/iomap.h>
#include <soc/nvs.h>
#include <soc/device_nvs.h>
-#include "onboard.h"
void mainboard_fill_gnvs(struct global_nvs *gnvs)
{
@@ -28,20 +23,6 @@ void mainboard_fill_gnvs(struct global_nvs *gnvs)
dev_nvs->lpss_en[LPSS_NVS_I2C2] = 0;
}
-unsigned long acpi_fill_madt(unsigned long current)
-{
- /* Local APICs */
- current = acpi_create_madt_lapics(current);
-
- /* IOAPIC */
- current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current,
- 2, IO_APIC_ADDR, 0);
-
- current = acpi_madt_irq_overrides(current);
-
- return current;
-}
-
void mainboard_fill_fadt(acpi_fadt_t *fadt)
{
fadt->preferred_pm_profile = PM_MOBILE;
diff --git a/src/mainboard/portwell/m107/acpi_tables.c b/src/mainboard/portwell/m107/acpi_tables.c
index 92db5b69db..226da413fc 100644
--- a/src/mainboard/portwell/m107/acpi_tables.c
+++ b/src/mainboard/portwell/m107/acpi_tables.c
@@ -2,8 +2,6 @@
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
-#include <arch/ioapic.h>
-#include <soc/acpi.h>
#include <soc/nvs.h>
#include <soc/device_nvs.h>
@@ -25,20 +23,6 @@ void mainboard_fill_gnvs(struct global_nvs *gnvs)
dev_nvs->lpss_en[LPSS_NVS_I2C2] = 0;
}
-unsigned long acpi_fill_madt(unsigned long current)
-{
- /* Local APICs */
- current = acpi_create_madt_lapics(current);
-
- /* IOAPIC */
- current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current,
- 2, IO_APIC_ADDR, 0);
-
- current = acpi_madt_irq_overrides(current);
-
- return current;
-}
-
void mainboard_fill_fadt(acpi_fadt_t *fadt)
{
fadt->preferred_pm_profile = PM_MOBILE;
diff --git a/src/mainboard/protectli/vault_bsw/acpi_tables.c b/src/mainboard/protectli/vault_bsw/acpi_tables.c
index 87a1c40fce..4206cde022 100644
--- a/src/mainboard/protectli/vault_bsw/acpi_tables.c
+++ b/src/mainboard/protectli/vault_bsw/acpi_tables.c
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <acpi/acpi_gnvs.h>
-#include <arch/ioapic.h>
#include <soc/acpi.h>
#include <soc/nvs.h>
@@ -12,19 +11,6 @@ void mainboard_fill_gnvs(struct global_nvs *gnvs)
gnvs->s3u1 = 1;
}
-unsigned long acpi_fill_madt(unsigned long current)
-{
- /* Local APICs */
- current = acpi_create_madt_lapics(current);
-
- /* IOAPIC */
- current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 2, IO_APIC_ADDR, 0);
-
- current = acpi_madt_irq_overrides(current);
-
- return current;
-}
-
void mainboard_fill_fadt(acpi_fadt_t *fadt)
{
fadt->preferred_pm_profile = PM_MOBILE;
diff --git a/src/soc/intel/braswell/acpi.c b/src/soc/intel/braswell/acpi.c
index c55632c4e5..2d7ca3c9ca 100644
--- a/src/soc/intel/braswell/acpi.c
+++ b/src/soc/intel/braswell/acpi.c
@@ -3,8 +3,9 @@
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <acpi/acpigen.h>
-#include <device/mmio.h>
+#include <arch/ioapic.h>
#include <arch/smp/mpspec.h>
+#include <device/mmio.h>
#include <console/console.h>
#include <cpu/intel/turbo.h>
#include <cpu/x86/msr.h>
@@ -305,7 +306,7 @@ void generate_cpu_entries(const struct device *device)
acpigen_write_processor_cnot(pattrs->num_cpus);
}
-unsigned long acpi_madt_irq_overrides(unsigned long current)
+static unsigned long acpi_madt_irq_overrides(unsigned long current)
{
int sci_irq = acpi_sci_irq();
acpi_madt_irqoverride_t *irqovr;
@@ -326,6 +327,19 @@ unsigned long acpi_madt_irq_overrides(unsigned long current)
return current;
}
+unsigned long acpi_fill_madt(unsigned long current)
+{
+ /* Local APICs */
+ current = acpi_create_madt_lapics(current);
+
+ /* IOAPIC */
+ current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, 2, IO_APIC_ADDR, 0);
+
+ current = acpi_madt_irq_overrides(current);
+
+ return current;
+}
+
unsigned long southcluster_write_acpi_tables(const struct device *device, unsigned long current,
struct acpi_rsdp *rsdp)
{
diff --git a/src/soc/intel/braswell/include/soc/acpi.h b/src/soc/intel/braswell/include/soc/acpi.h
index 461913dda3..ccb48eb447 100644
--- a/src/soc/intel/braswell/include/soc/acpi.h
+++ b/src/soc/intel/braswell/include/soc/acpi.h
@@ -7,7 +7,6 @@
int acpi_sci_irq(void);
void acpi_create_serialio_ssdt(acpi_header_t *ssdt);
-unsigned long acpi_madt_irq_overrides(unsigned long current);
unsigned long southcluster_write_acpi_tables(const struct device *device,
unsigned long current, struct acpi_rsdp *rsdp);