summaryrefslogtreecommitdiff
path: root/src/mainboard/via
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/via')
-rw-r--r--src/mainboard/via/epia-m700/Kconfig1
-rw-r--r--src/mainboard/via/epia-m700/acpi_tables.c89
2 files changed, 1 insertions, 89 deletions
diff --git a/src/mainboard/via/epia-m700/Kconfig b/src/mainboard/via/epia-m700/Kconfig
index c64f8d282f..7d21038d91 100644
--- a/src/mainboard/via/epia-m700/Kconfig
+++ b/src/mainboard/via/epia-m700/Kconfig
@@ -9,6 +9,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
# Note: For ACPI, you need to use the 'get_dsdt' script and uncomment
# the "select HAVE_ACPI_TABLES" line below.
# select HAVE_ACPI_TABLES
+ # select PER_DEVICE_ACPI_TABLES
select HAVE_OPTION_TABLE
select BOARD_ROMSIZE_KB_512
diff --git a/src/mainboard/via/epia-m700/acpi_tables.c b/src/mainboard/via/epia-m700/acpi_tables.c
index 7d956166b2..c841f2c01e 100644
--- a/src/mainboard/via/epia-m700/acpi_tables.c
+++ b/src/mainboard/via/epia-m700/acpi_tables.c
@@ -113,92 +113,3 @@ unsigned long acpi_fill_srat(unsigned long current)
/* No NUMA, no SRAT. */
return current;
}
-
-#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
-#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
-
-unsigned long write_acpi_tables(unsigned long start)
-{
- unsigned long current;
- acpi_rsdp_t *rsdp;
- acpi_rsdt_t *rsdt;
- acpi_hpet_t *hpet;
- acpi_madt_t *madt;
- acpi_fadt_t *fadt;
- acpi_facs_t *facs;
- acpi_header_t *dsdt;
-#if 0
- acpi_header_t *ssdt;
-#endif
-
- /* Align ACPI tables to 16 byte. */
- start = ALIGN(start, 16);
- current = start;
-
- printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
-
- /* We need at least an RSDP and an RSDT table. */
- rsdp = (acpi_rsdp_t *) current;
- current += sizeof(acpi_rsdp_t);
- rsdt = (acpi_rsdt_t *) current;
- current += sizeof(acpi_rsdt_t);
-
- /* Clear all table memory. */
- memset((void *)start, 0, current - start);
-
- acpi_write_rsdp(rsdp, rsdt, NULL);
- acpi_write_rsdt(rsdt);
-
- /* We explicitly add these tables later on: */
- printk(BIOS_DEBUG, "ACPI: * FACS\n");
- current = ALIGN(current, 64);
- facs = (acpi_facs_t *) current;
- current += sizeof(acpi_facs_t);
- acpi_create_facs(facs);
-
- printk(BIOS_DEBUG, "ACPI: * DSDT\n");
- dsdt = (acpi_header_t *) current;
- memcpy(dsdt, &AmlCode_dsdt, sizeof(acpi_header_t));
- current += dsdt->length;
- memcpy(dsdt, &AmlCode_dsdt, dsdt->length);
- dsdt->checksum = 0; /* Don't trust iasl to get this right. */
- dsdt->checksum = acpi_checksum((u8*)dsdt, dsdt->length);
- printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt, dsdt->length);
-
- printk(BIOS_DEBUG, "ACPI: * FADT\n");
- fadt = (acpi_fadt_t *) current;
- current += sizeof(acpi_fadt_t);
-
- acpi_create_fadt(fadt, facs, dsdt);
- acpi_add_table(rsdp, fadt);
-
- /* If we want to use HPET timers Linux wants it in MADT. */
- printk(BIOS_DEBUG, "ACPI: * MADT\n");
- madt = (acpi_madt_t *) current;
- acpi_create_madt(madt);
- current += madt->header.length;
- acpi_add_table(rsdp, madt);
-
- /* NO MCFG in VX855, no PCI-E. */
-
- printk(BIOS_DEBUG, "ACPI: * HPET\n");
- hpet = (acpi_hpet_t *) current;
- acpi_create_hpet(hpet);
- current += hpet->header.length;
- acpi_add_table(rsdp, hpet);
-
-#if 0
- printk(BIOS_DEBUG, "ACPI: * SSDT\n");
- ssdt = (acpi_header_t *) current;
- memcpy(ssdt, &AmlCode_ssdt, sizeof(acpi_header_t));
- current += ssdt->length;
- memcpy(ssdt, &AmlCode_ssdt, ssdt->length);
- ssdt->checksum = 0; /* Don't trust iasl to get this right. */
- ssdt->checksum = acpi_checksum((u8*)ssdt, ssdt->length);
- acpi_add_table(rsdp, ssdt);
- printk(BIOS_DEBUG, "ACPI: * SSDT @ %08x Length %x\n", ssdt, ssdt->length);
-#endif
-
- printk(BIOS_INFO, "ACPI: done.\n");
- return current;
-}