summaryrefslogtreecommitdiff
path: root/src/mainboard/siemens/sitemp_g1p1
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2012-10-05 21:54:38 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2012-10-08 21:23:08 +0200
commit9aeb69447d3839675b2cac51c3e95a4724fd9b0d (patch)
treed9b1cc7483a51ab340d6d9fae78a30e562f99767 /src/mainboard/siemens/sitemp_g1p1
parentec2c18ee6068ef6adf6f5be437d7047c91773654 (diff)
hpet: common ACPI generation
HPET's min ticks (minimum time between events to avoid losing interrupts) is chipset specific, so move it to Kconfig. Via also has a special base address, so move it as well. Apart from these (and the base address was already #defined), the table is very uniform. Change-Id: I848a2e2b0b16021c7ee5ba99097fa6a5886c3286 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/1562 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Dave Frodin <dave.frodin@se-eng.com>
Diffstat (limited to 'src/mainboard/siemens/sitemp_g1p1')
-rw-r--r--src/mainboard/siemens/sitemp_g1p1/acpi_tables.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/mainboard/siemens/sitemp_g1p1/acpi_tables.c b/src/mainboard/siemens/sitemp_g1p1/acpi_tables.c
index 9cdaa649d4..ea69034802 100644
--- a/src/mainboard/siemens/sitemp_g1p1/acpi_tables.c
+++ b/src/mainboard/siemens/sitemp_g1p1/acpi_tables.c
@@ -76,37 +76,6 @@ static void acpi_write_gvars(global_vars_t *gvars)
gvars->mpen = 1;
}
-static void acpi_create_my_hpet(acpi_hpet_t *hpet)
-{
-#define HPET_ADDR 0xfed00000ULL
- acpi_header_t *header=&(hpet->header);
- acpi_addr_t *addr=&(hpet->addr);
-
- memset((void *)hpet, 0, sizeof(acpi_hpet_t));
-
- /* fill out header fields */
- memcpy(header->signature, "HPET", 4);
- memcpy(header->oem_id, OEM_ID, 6);
- memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
- memcpy(header->asl_compiler_id, ASLC, 4);
-
- header->length = sizeof(acpi_hpet_t);
- header->revision = 1;
-
- /* fill out HPET address */
- addr->space_id = 0; /* Memory */
- addr->bit_width = 64;
- addr->bit_offset = 0;
- addr->addrl = HPET_ADDR & 0xffffffff;
- addr->addrh = HPET_ADDR >> 32;
-
- hpet->id = 0x43538301;
- hpet->number = 0;
- hpet->min_tick = 20;
-
- header->checksum = acpi_checksum((void *)hpet, sizeof(acpi_hpet_t));
-}
-
#if DUMP_ACPI_TABLES == 1
static void dump_mem(u32 start, u32 end)
{
@@ -231,7 +200,7 @@ unsigned long write_acpi_tables(unsigned long start)
/* HPET */
printk(BIOS_DEBUG, "ACPI: * HPET\n");
hpet = (acpi_hpet_t *) current;
- acpi_create_my_hpet(hpet);
+ acpi_create_hpet(hpet);
current += sizeof(acpi_hpet_t);
acpi_add_table(rsdp, hpet);