lkml.org 
[lkml]   [2003]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH][2.6][1/5]Support for HPET based timer
Date
From
[Resend - The original mail hasn't yet appeared on lkml, even 5 hours 
after posting]

diff -purN linux-2.6.0-test1/arch/i386/kernel/acpi/boot.c linux-2.6.0-test1-hpet/arch/i386/kernel/acpi/boot.c
--- linux-2.6.0-test1/arch/i386/kernel/acpi/boot.c 2003-07-13 20:37:31.000000000 -0700
+++ linux-2.6.0-test1-hpet/arch/i386/kernel/acpi/boot.c 2003-08-18 19:54:47.000000000 -0700
@@ -289,6 +289,27 @@ acpi_find_rsdp (void)
return rsdp_phys;
}

+#ifdef CONFIG_HPET_TIMER
+extern unsigned long hpet_address;
+
+static int __init acpi_parse_hpet(unsigned long phys, unsigned long size)
+{
+ struct acpi_table_hpet *hpet_tbl;
+
+ hpet_tbl = __va(phys);
+
+ if (hpet_tbl->addr.space_id != ACPI_SPACE_MEM) {
+ printk(KERN_WARNING "acpi: HPET timers must be located in "
+ "memory.\n");
+ return -1;
+ }
+
+ hpet_address = hpet_tbl->addr.addrl;
+ printk(KERN_INFO "acpi: HPET id: %#x base: %#lx\n", hpet_tbl->id,
+ hpet_address);
+ return 0;
+}
+#endif

int __init
acpi_boot_init (void)
@@ -426,6 +447,12 @@ acpi_boot_init (void)
clustered_apic_check();
}
#endif
+#ifdef CONFIG_HPET_TIMER
+ acpi_table_parse(ACPI_HPET, acpi_parse_hpet);
+ if (hpet_address == 0) {
+ printk("ACPI: no HPET table found\n");
+ }
+#endif

return 0;
}

[unhandled content-type:application/x-zip-compressed]
\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.027 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site