aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/getac/p470/acpi_tables.c34
-rw-r--r--src/mainboard/ibase/mb899/acpi_tables.c34
-rw-r--r--src/mainboard/intel/d945gclf/acpi_tables.c34
-rw-r--r--src/mainboard/intel/eagleheights/acpi_tables.c34
-rw-r--r--src/mainboard/intel/emeraldlake2/acpi_tables.c34
-rw-r--r--src/mainboard/intel/emeraldlake2/romstage.c2
-rw-r--r--src/mainboard/iwave/iWRainbowG6/acpi_tables.c33
-rw-r--r--src/mainboard/kontron/986lcd-m/acpi_tables.c34
-rw-r--r--src/mainboard/lenovo/t60/acpi_tables.c34
-rw-r--r--src/mainboard/lenovo/x60/acpi_tables.c34
-rw-r--r--src/mainboard/msi/ms7135/acpi_tables.c72
-rw-r--r--src/mainboard/roda/rk886ex/acpi_tables.c34
-rw-r--r--src/mainboard/samsung/lumpy/acpi_tables.c34
-rw-r--r--src/mainboard/samsung/lumpy/romstage.c2
-rw-r--r--src/mainboard/samsung/stumpy/acpi_tables.c34
-rw-r--r--src/mainboard/samsung/stumpy/romstage.c2
-rw-r--r--src/mainboard/siemens/sitemp_g1p1/acpi_tables.c33
-rw-r--r--src/mainboard/via/vt8454c/acpi_tables.c36
18 files changed, 18 insertions, 536 deletions
diff --git a/src/mainboard/getac/p470/acpi_tables.c b/src/mainboard/getac/p470/acpi_tables.c
index a4ca0a8eba..9a10087002 100644
--- a/src/mainboard/getac/p470/acpi_tables.c
+++ b/src/mainboard/getac/p470/acpi_tables.c
@@ -53,38 +53,6 @@ static void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
}
-static void acpi_create_intel_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 = 0x8086a201; /* Intel */
- hpet->number = 0x00;
- hpet->min_tick = 0x0080;
-
- header->checksum =
- acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
-}
-
static long acpi_create_ecdt(acpi_ecdt_t * ecdt)
{
/* Attention: Make sure these match the values from
@@ -230,7 +198,7 @@ unsigned long write_acpi_tables(unsigned long start)
hpet = (acpi_hpet_t *) current;
current += sizeof(acpi_hpet_t);
ALIGN_CURRENT;
- acpi_create_intel_hpet(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
/* If we want to use HPET Timers Linux wants an MADT */
diff --git a/src/mainboard/ibase/mb899/acpi_tables.c b/src/mainboard/ibase/mb899/acpi_tables.c
index 9ff5b1da27..e6a517ece8 100644
--- a/src/mainboard/ibase/mb899/acpi_tables.c
+++ b/src/mainboard/ibase/mb899/acpi_tables.c
@@ -54,38 +54,6 @@ static void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
}
-static void acpi_create_intel_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 = 0x8086a201; /* Intel */
- hpet->number = 0x00;
- hpet->min_tick = 0x0080;
-
- header->checksum =
- acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
@@ -176,7 +144,7 @@ unsigned long write_acpi_tables(unsigned long start)
hpet = (acpi_hpet_t *) current;
current += sizeof(acpi_hpet_t);
ALIGN_CURRENT;
- acpi_create_intel_hpet(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
/* If we want to use HPET Timers Linux wants an MADT */
diff --git a/src/mainboard/intel/d945gclf/acpi_tables.c b/src/mainboard/intel/d945gclf/acpi_tables.c
index d32dc811f8..fba2b42616 100644
--- a/src/mainboard/intel/d945gclf/acpi_tables.c
+++ b/src/mainboard/intel/d945gclf/acpi_tables.c
@@ -43,38 +43,6 @@ static void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->mpen = 1; /* Enable Multi Processing */
}
-static void acpi_create_intel_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 = 0x8086a201; /* Intel */
- hpet->number = 0x00;
- hpet->min_tick = 0x0080;
-
- header->checksum =
- acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
@@ -162,7 +130,7 @@ unsigned long write_acpi_tables(unsigned long start)
hpet = (acpi_hpet_t *) current;
current += sizeof(acpi_hpet_t);
ALIGN_CURRENT;
- acpi_create_intel_hpet(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
/* If we want to use HPET Timers Linux wants an MADT */
diff --git a/src/mainboard/intel/eagleheights/acpi_tables.c b/src/mainboard/intel/eagleheights/acpi_tables.c
index ce67645ca8..e1d83880ca 100644
--- a/src/mainboard/intel/eagleheights/acpi_tables.c
+++ b/src/mainboard/intel/eagleheights/acpi_tables.c
@@ -51,38 +51,6 @@ unsigned long acpi_fill_mcfg(unsigned long current)
return current;
}
-static void acpi_create_intel_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, "IC ", 8);
- memcpy(header->asl_compiler_id, ASLC, 4);
-
- header->length = sizeof(acpi_hpet_t);
- header->revision = 1;
-
- /* fill out HPET address */
- // XXX factory bios just puts an address here -- who's right?
- 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 = 0x80861234;
- hpet->number = 0x00;
- hpet->min_tick = 0x0090;
-
- header->checksum = acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
-}
-
#define IO_APIC0 2
#define IO_APIC1 3
@@ -177,7 +145,7 @@ unsigned long write_acpi_tables(unsigned long start)
hpet = (acpi_hpet_t *) current;
current += sizeof(acpi_hpet_t);
ALIGN_CURRENT;
- acpi_create_intel_hpet(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
/* If we want to use HPET Timers Linux wants an MADT */
diff --git a/src/mainboard/intel/emeraldlake2/acpi_tables.c b/src/mainboard/intel/emeraldlake2/acpi_tables.c
index e32fc5b32a..c22dcab494 100644
--- a/src/mainboard/intel/emeraldlake2/acpi_tables.c
+++ b/src/mainboard/intel/emeraldlake2/acpi_tables.c
@@ -109,38 +109,6 @@ static void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO;
}
-static void acpi_create_intel_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 = 0x8086a201; /* Intel */
- hpet->number = 0x00;
- hpet->min_tick = 0x0080;
-
- header->checksum =
- acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
@@ -254,7 +222,7 @@ unsigned long write_acpi_tables(unsigned long start)
hpet = (acpi_hpet_t *) current;
current += sizeof(acpi_hpet_t);
ALIGN_CURRENT;
- acpi_create_intel_hpet(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
/* If we want to use HPET Timers Linux wants an MADT */
diff --git a/src/mainboard/intel/emeraldlake2/romstage.c b/src/mainboard/intel/emeraldlake2/romstage.c
index 7a3124269d..75e3b0d8e6 100644
--- a/src/mainboard/intel/emeraldlake2/romstage.c
+++ b/src/mainboard/intel/emeraldlake2/romstage.c
@@ -189,7 +189,7 @@ void main(unsigned long bist)
smbusbar: SMBUS_IO_BASE,
wdbbar: 0x4000000,
wdbsize: 0x1000,
- hpet_address: HPET_ADDR,
+ hpet_address: CONFIG_HPET_ADDRESS,
rcba: DEFAULT_RCBABASE,
pmbase: DEFAULT_PMBASE,
gpiobase: DEFAULT_GPIOBASE,
diff --git a/src/mainboard/iwave/iWRainbowG6/acpi_tables.c b/src/mainboard/iwave/iWRainbowG6/acpi_tables.c
index 3951cff17e..8095ab05eb 100644
--- a/src/mainboard/iwave/iWRainbowG6/acpi_tables.c
+++ b/src/mainboard/iwave/iWRainbowG6/acpi_tables.c
@@ -55,37 +55,6 @@ static void acpi_create_gnvs(global_nvs_t * gnvs)
gnvs->did[4] = 0x00000005;
}
-static void acpi_create_intel_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 = 0x8086a201; /* Intel */
- hpet->number = 0x00;
- hpet->min_tick = 0x0080;
-
- header->checksum = acpi_checksum((void *)hpet, sizeof(acpi_hpet_t));
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
@@ -180,7 +149,7 @@ unsigned long write_acpi_tables(unsigned long start)
hpet = (acpi_hpet_t *) current;
current += sizeof(acpi_hpet_t);
ALIGN_CURRENT;
- acpi_create_intel_hpet(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
/* If we want to use HPET Timers Linux wants an MADT */
diff --git a/src/mainboard/kontron/986lcd-m/acpi_tables.c b/src/mainboard/kontron/986lcd-m/acpi_tables.c
index 9ff5b1da27..e6a517ece8 100644
--- a/src/mainboard/kontron/986lcd-m/acpi_tables.c
+++ b/src/mainboard/kontron/986lcd-m/acpi_tables.c
@@ -54,38 +54,6 @@ static void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
}
-static void acpi_create_intel_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 = 0x8086a201; /* Intel */
- hpet->number = 0x00;
- hpet->min_tick = 0x0080;
-
- header->checksum =
- acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
@@ -176,7 +144,7 @@ unsigned long write_acpi_tables(unsigned long start)
hpet = (acpi_hpet_t *) current;
current += sizeof(acpi_hpet_t);
ALIGN_CURRENT;
- acpi_create_intel_hpet(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
/* If we want to use HPET Timers Linux wants an MADT */
diff --git a/src/mainboard/lenovo/t60/acpi_tables.c b/src/mainboard/lenovo/t60/acpi_tables.c
index db86317c97..f6ed4ae6dd 100644
--- a/src/mainboard/lenovo/t60/acpi_tables.c
+++ b/src/mainboard/lenovo/t60/acpi_tables.c
@@ -55,38 +55,6 @@ static void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
}
-static void acpi_create_intel_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 = 0x8086a201; /* Intel */
- hpet->number = 0x00;
- hpet->min_tick = 0x0080;
-
- header->checksum =
- acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
@@ -188,7 +156,7 @@ unsigned long write_acpi_tables(unsigned long start)
hpet = (acpi_hpet_t *) current;
current += sizeof(acpi_hpet_t);
ALIGN_CURRENT;
- acpi_create_intel_hpet(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
/* If we want to use HPET Timers Linux wants an MADT */
diff --git a/src/mainboard/lenovo/x60/acpi_tables.c b/src/mainboard/lenovo/x60/acpi_tables.c
index db86317c97..f6ed4ae6dd 100644
--- a/src/mainboard/lenovo/x60/acpi_tables.c
+++ b/src/mainboard/lenovo/x60/acpi_tables.c
@@ -55,38 +55,6 @@ static void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
}
-static void acpi_create_intel_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 = 0x8086a201; /* Intel */
- hpet->number = 0x00;
- hpet->min_tick = 0x0080;
-
- header->checksum =
- acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
@@ -188,7 +156,7 @@ unsigned long write_acpi_tables(unsigned long start)
hpet = (acpi_hpet_t *) current;
current += sizeof(acpi_hpet_t);
ALIGN_CURRENT;
- acpi_create_intel_hpet(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
/* If we want to use HPET Timers Linux wants an MADT */
diff --git a/src/mainboard/msi/ms7135/acpi_tables.c b/src/mainboard/msi/ms7135/acpi_tables.c
index 4a3fbe296b..6bd3183acb 100644
--- a/src/mainboard/msi/ms7135/acpi_tables.c
+++ b/src/mainboard/msi/ms7135/acpi_tables.c
@@ -23,76 +23,6 @@
extern const unsigned char AmlCode[];
-static void acpi_create_hpet_new(acpi_hpet_t *);
-static int acpi_create_hpet_new_fill(acpi_hpet_t *, u32, u16, u8);
-static unsigned long acpi_fill_hpet_new(unsigned long);
-
-void acpi_create_hpet_new(acpi_hpet_t *hpet)
-{
- acpi_header_t *header=&(hpet->header);
- unsigned long current=(unsigned long)hpet;
-
- 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;
-
- current = acpi_fill_hpet_new(current);
-
- /* recalculate length */
- header->length = current - (unsigned long)hpet;
-
- header->checksum = acpi_checksum((void *)hpet, header->length);
-}
-
-
-int acpi_create_hpet_new_fill(acpi_hpet_t *hpet, u32 base, u16 min, u8 attr)
-{
- static u8 num = 0;
- acpi_addr_t *addr = &(hpet->addr);
-
- hpet->id = read32(base + 0x000);
-
- /* fill out HPET address */
- addr->space_id = 0; /* Memory */
- addr->bit_width = 0;
- addr->bit_offset = 0;
- addr->addrl = base;
- addr->addrh = 0;
-
- hpet->number = num++;
- hpet->min_tick = min;
- hpet->attributes = attr;
-
- return (sizeof(acpi_hpet_t));
-}
-
-static unsigned long acpi_fill_hpet_new(unsigned long current)
-{
-#if 1
- device_t dev;
- unsigned long hpet_base;
-
- dev = dev_find_slot(0x0, PCI_DEVFN(0x1,0));
- if (!dev)
- return current;
-
- hpet_base = pci_read_config32(dev, 0x44) & ~0xf;
-
- printk(BIOS_INFO, "hpet_base %lx.\n", hpet_base);
-
- current += acpi_create_hpet_new_fill((acpi_hpet_t *)current, hpet_base, 250, 1);
-#endif
-
- return current;
-}
-
unsigned long acpi_fill_mcfg(unsigned long current)
{
device_t dev;
@@ -239,7 +169,7 @@ unsigned long write_acpi_tables(unsigned long start)
current = ALIGN(current, 16);
hpet = (acpi_hpet_t *) current;
printk(BIOS_DEBUG, "ACPI: * HPET @ %p\n", hpet);
- acpi_create_hpet_new(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
current += hpet->header.length;
diff --git a/src/mainboard/roda/rk886ex/acpi_tables.c b/src/mainboard/roda/rk886ex/acpi_tables.c
index db86317c97..f6ed4ae6dd 100644
--- a/src/mainboard/roda/rk886ex/acpi_tables.c
+++ b/src/mainboard/roda/rk886ex/acpi_tables.c
@@ -55,38 +55,6 @@ static void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->did[4] = 0x00000005;
}
-static void acpi_create_intel_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 = 0x8086a201; /* Intel */
- hpet->number = 0x00;
- hpet->min_tick = 0x0080;
-
- header->checksum =
- acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
@@ -188,7 +156,7 @@ unsigned long write_acpi_tables(unsigned long start)
hpet = (acpi_hpet_t *) current;
current += sizeof(acpi_hpet_t);
ALIGN_CURRENT;
- acpi_create_intel_hpet(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
/* If we want to use HPET Timers Linux wants an MADT */
diff --git a/src/mainboard/samsung/lumpy/acpi_tables.c b/src/mainboard/samsung/lumpy/acpi_tables.c
index 71b0c593d0..fca9c82578 100644
--- a/src/mainboard/samsung/lumpy/acpi_tables.c
+++ b/src/mainboard/samsung/lumpy/acpi_tables.c
@@ -106,38 +106,6 @@ static void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->chromeos.vbt2 = ec_read(0xcb) ? ACTIVE_ECFW_RW : ACTIVE_ECFW_RO;
}
-static void acpi_create_intel_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 = 0x8086a201; /* Intel */
- hpet->number = 0x00;
- hpet->min_tick = 0x0080;
-
- header->checksum =
- acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
@@ -251,7 +219,7 @@ unsigned long write_acpi_tables(unsigned long start)
hpet = (acpi_hpet_t *) current;
current += sizeof(acpi_hpet_t);
ALIGN_CURRENT;
- acpi_create_intel_hpet(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
/* If we want to use HPET Timers Linux wants an MADT */
diff --git a/src/mainboard/samsung/lumpy/romstage.c b/src/mainboard/samsung/lumpy/romstage.c
index 4bba76ec9d..57c6eea23f 100644
--- a/src/mainboard/samsung/lumpy/romstage.c
+++ b/src/mainboard/samsung/lumpy/romstage.c
@@ -155,7 +155,7 @@ void main(unsigned long bist)
.smbusbar = SMBUS_IO_BASE,
.wdbbar = 0x4000000,
.wdbsize = 0x1000,
- .hpet_address = HPET_ADDR,
+ .hpet_address = CONFIG_HPET_ADDRESS,
.rcba = DEFAULT_RCBABASE,
.pmbase = DEFAULT_PMBASE,
.gpiobase = DEFAULT_GPIOBASE,
diff --git a/src/mainboard/samsung/stumpy/acpi_tables.c b/src/mainboard/samsung/stumpy/acpi_tables.c
index 56544608ad..b91e1e3ba0 100644
--- a/src/mainboard/samsung/stumpy/acpi_tables.c
+++ b/src/mainboard/samsung/stumpy/acpi_tables.c
@@ -110,38 +110,6 @@ static void acpi_create_gnvs(global_nvs_t *gnvs)
gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO;
}
-static void acpi_create_intel_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 = 0x8086a201; /* Intel */
- hpet->number = 0x00;
- hpet->min_tick = 0x0080;
-
- header->checksum =
- acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local APICs */
@@ -255,7 +223,7 @@ unsigned long write_acpi_tables(unsigned long start)
hpet = (acpi_hpet_t *) current;
current += sizeof(acpi_hpet_t);
ALIGN_CURRENT;
- acpi_create_intel_hpet(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
/* If we want to use HPET Timers Linux wants an MADT */
diff --git a/src/mainboard/samsung/stumpy/romstage.c b/src/mainboard/samsung/stumpy/romstage.c
index 58305c894c..5602c63fd7 100644
--- a/src/mainboard/samsung/stumpy/romstage.c
+++ b/src/mainboard/samsung/stumpy/romstage.c
@@ -190,7 +190,7 @@ void main(unsigned long bist)
smbusbar: SMBUS_IO_BASE,
wdbbar: 0x4000000,
wdbsize: 0x1000,
- hpet_address: HPET_ADDR,
+ hpet_address: CONFIG_HPET_ADDRESS,
rcba: DEFAULT_RCBABASE,
pmbase: DEFAULT_PMBASE,
gpiobase: DEFAULT_GPIOBASE,
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);
diff --git a/src/mainboard/via/vt8454c/acpi_tables.c b/src/mainboard/via/vt8454c/acpi_tables.c
index a191ada0f4..a13395acf3 100644
--- a/src/mainboard/via/vt8454c/acpi_tables.c
+++ b/src/mainboard/via/vt8454c/acpi_tables.c
@@ -51,40 +51,6 @@ unsigned long acpi_fill_mcfg(unsigned long current)
return current;
}
-
-static void acpi_create_via_hpet(acpi_hpet_t * hpet)
-{
-#define HPET_ADDR 0xfe800000ULL
- 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 */
- // XXX factory bios just puts an address here -- who's right?
- 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 = 0x11068201; /* VIA */
- hpet->number = 0x00;
- hpet->min_tick = 0x0090;
-
- header->checksum =
- acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* Local Apic */
@@ -153,7 +119,7 @@ unsigned long write_acpi_tables(unsigned long start)
hpet = (acpi_hpet_t *) current;
current += sizeof(acpi_hpet_t);
- acpi_create_via_hpet(hpet);
+ acpi_create_hpet(hpet);
acpi_add_table(rsdp, hpet);
/* If we want to use HPET Timers Linux wants an MADT */