HPET is definite not for ARM/ARM64, remove its related stuff.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- drivers/acpi/plat/arm/boot.c | 75 ------------------------------------------ 1 file changed, 75 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 3bfe86e..a6c5a5e 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -466,79 +466,6 @@ static int __init acpi_parse_sbf(struct acpi_table_header *table) return 0; }
-#ifdef CONFIG_HPET_TIMER -#include <asm/hpet.h> - -static struct __initdata resource * hpet_res; - -static int __init acpi_parse_hpet(struct acpi_table_header *table) -{ - struct acpi_table_hpet *hpet_tbl; - - hpet_tbl = (struct acpi_table_hpet *)table; - if (!hpet_tbl) { - printk(KERN_WARNING PREFIX "Unable to map HPET\n"); - return -ENODEV; - } - - if (hpet_tbl->address.space_id != ACPI_SPACE_MEM) { - printk(KERN_WARNING PREFIX "HPET timers must be located in " - "memory.\n"); - return -1; - } - - hpet_address = hpet_tbl->address.address; - hpet_blockid = hpet_tbl->sequence; - - /* - * Some broken BIOSes advertise HPET at 0x0. We really do not - * want to allocate a resource there. - */ - if (!hpet_address) { - printk(KERN_WARNING PREFIX - "HPET id: %#x base: %#lx is invalid\n", - hpet_tbl->id, hpet_address); - return 0; - } - printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", - hpet_tbl->id, hpet_address); - - /* - * Allocate and initialize the HPET firmware resource for adding into - * the resource tree during the lateinit timeframe. - */ -#define HPET_RESOURCE_NAME_SIZE 9 - hpet_res = alloc_bootmem(sizeof(*hpet_res) + HPET_RESOURCE_NAME_SIZE); - - hpet_res->name = (void *)&hpet_res[1]; - hpet_res->flags = IORESOURCE_MEM; - snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE, "HPET %u", - hpet_tbl->sequence); - - hpet_res->start = hpet_address; - hpet_res->end = hpet_address + (1 * 1024) - 1; - - return 0; -} - -/* - * hpet_insert_resource inserts the HPET resources used into the resource - * tree. - */ -static int __init hpet_insert_resource(void) -{ - if (!hpet_res) - return 1; - - return insert_resource(&iomem_resource, hpet_res); -} - -late_initcall(hpet_insert_resource); - -#else -#define acpi_parse_hpet NULL -#endif - /* Local APIC = GIC cpu interface on ARM */ static int __init acpi_parse_madt_lapic_entries(void) { @@ -741,8 +668,6 @@ int __init acpi_boot_init(void) */ acpi_process_madt();
- acpi_table_parse(ACPI_SIG_HPET, acpi_parse_hpet); - return 0; }
For BOOT table, I find its describing in the Simple Boot Flag Specification:
On PC-AT BIOS computer, a BOOT register is defined in main CMOS memory (typically accessed through I/O ports 70h/71h on Intel Architecture platforms). The location of the BOOT register in CMOS is indicated by a BOOT table found via the ACPI RSDT table.
So this totally Intel platform related, remove it for ARM.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- drivers/acpi/plat/arm/boot.c | 17 ----------------- 1 file changed, 17 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index a6c5a5e..a912a7a 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -453,19 +453,6 @@ int acpi_unmap_lsapic(int cpu) EXPORT_SYMBOL(acpi_unmap_lsapic); #endif /* CONFIG_ACPI_HOTPLUG_CPU */
-static int __init acpi_parse_sbf(struct acpi_table_header *table) -{ - struct acpi_table_boot *sb; - - sb = (struct acpi_table_boot *)table; - if (!sb) { - printk(KERN_WARNING PREFIX "Unable to map SBF\n"); - return -ENODEV; - } - - return 0; -} - /* Local APIC = GIC cpu interface on ARM */ static int __init acpi_parse_madt_lapic_entries(void) { @@ -628,8 +615,6 @@ void __init acpi_boot_table_init(void) disable_acpi(); return; } - - acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf); }
int __init early_acpi_boot_init(void) @@ -656,8 +641,6 @@ int __init acpi_boot_init(void) if (acpi_disabled) return 1;
- acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf); - /* * set sci_int and PM timer address */
Nice catch.
Acked-by: Graeme Gregory graeme.gregory@linaro.org
On Tue, Nov 19, 2013 at 06:39:09PM +0800, Hanjun Guo wrote:
HPET is definite not for ARM/ARM64, remove its related stuff.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org
drivers/acpi/plat/arm/boot.c | 75 ------------------------------------------ 1 file changed, 75 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 3bfe86e..a6c5a5e 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -466,79 +466,6 @@ static int __init acpi_parse_sbf(struct acpi_table_header *table) return 0; } -#ifdef CONFIG_HPET_TIMER -#include <asm/hpet.h>
-static struct __initdata resource * hpet_res;
-static int __init acpi_parse_hpet(struct acpi_table_header *table) -{
- struct acpi_table_hpet *hpet_tbl;
- hpet_tbl = (struct acpi_table_hpet *)table;
- if (!hpet_tbl) {
printk(KERN_WARNING PREFIX "Unable to map HPET\n");
return -ENODEV;
- }
- if (hpet_tbl->address.space_id != ACPI_SPACE_MEM) {
printk(KERN_WARNING PREFIX "HPET timers must be located in "
"memory.\n");
return -1;
- }
- hpet_address = hpet_tbl->address.address;
- hpet_blockid = hpet_tbl->sequence;
- /*
* Some broken BIOSes advertise HPET at 0x0. We really do not
* want to allocate a resource there.
*/
- if (!hpet_address) {
printk(KERN_WARNING PREFIX
"HPET id: %#x base: %#lx is invalid\n",
hpet_tbl->id, hpet_address);
return 0;
- }
- printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
hpet_tbl->id, hpet_address);
- /*
* Allocate and initialize the HPET firmware resource for adding into
* the resource tree during the lateinit timeframe.
*/
-#define HPET_RESOURCE_NAME_SIZE 9
- hpet_res = alloc_bootmem(sizeof(*hpet_res) + HPET_RESOURCE_NAME_SIZE);
- hpet_res->name = (void *)&hpet_res[1];
- hpet_res->flags = IORESOURCE_MEM;
- snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE, "HPET %u",
hpet_tbl->sequence);
- hpet_res->start = hpet_address;
- hpet_res->end = hpet_address + (1 * 1024) - 1;
- return 0;
-}
-/*
- hpet_insert_resource inserts the HPET resources used into the resource
- tree.
- */
-static int __init hpet_insert_resource(void) -{
- if (!hpet_res)
return 1;
- return insert_resource(&iomem_resource, hpet_res);
-}
-late_initcall(hpet_insert_resource);
-#else -#define acpi_parse_hpet NULL -#endif
/* Local APIC = GIC cpu interface on ARM */ static int __init acpi_parse_madt_lapic_entries(void) { @@ -741,8 +668,6 @@ int __init acpi_boot_init(void) */ acpi_process_madt();
- acpi_table_parse(ACPI_SIG_HPET, acpi_parse_hpet);
- return 0;
} -- 1.7.9.5
Linaro-acpi mailing list Linaro-acpi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-acpi
On 11/19/2013 03:44 AM, Graeme Gregory wrote:
Nice catch.
Acked-by: Graeme Gregory graeme.gregory@linaro.org
Indeed -- nice catch on both of these.
On Tue, Nov 19, 2013 at 06:39:09PM +0800, Hanjun Guo wrote:
HPET is definite not for ARM/ARM64, remove its related stuff.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org
drivers/acpi/plat/arm/boot.c | 75 ------------------------------------------ 1 file changed, 75 deletions(-)
diff --git a/drivers/acpi/plat/arm/boot.c b/drivers/acpi/plat/arm/boot.c index 3bfe86e..a6c5a5e 100644 --- a/drivers/acpi/plat/arm/boot.c +++ b/drivers/acpi/plat/arm/boot.c @@ -466,79 +466,6 @@ static int __init acpi_parse_sbf(struct acpi_table_header *table) return 0; }
-#ifdef CONFIG_HPET_TIMER -#include <asm/hpet.h>
-static struct __initdata resource * hpet_res;
-static int __init acpi_parse_hpet(struct acpi_table_header *table) -{
- struct acpi_table_hpet *hpet_tbl;
- hpet_tbl = (struct acpi_table_hpet *)table;
- if (!hpet_tbl) {
printk(KERN_WARNING PREFIX "Unable to map HPET\n");
return -ENODEV;
- }
- if (hpet_tbl->address.space_id != ACPI_SPACE_MEM) {
printk(KERN_WARNING PREFIX "HPET timers must be located in "
"memory.\n");
return -1;
- }
- hpet_address = hpet_tbl->address.address;
- hpet_blockid = hpet_tbl->sequence;
- /*
* Some broken BIOSes advertise HPET at 0x0. We really do not
* want to allocate a resource there.
*/
- if (!hpet_address) {
printk(KERN_WARNING PREFIX
"HPET id: %#x base: %#lx is invalid\n",
hpet_tbl->id, hpet_address);
return 0;
- }
- printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",
hpet_tbl->id, hpet_address);
- /*
* Allocate and initialize the HPET firmware resource for adding into
* the resource tree during the lateinit timeframe.
*/
-#define HPET_RESOURCE_NAME_SIZE 9
- hpet_res = alloc_bootmem(sizeof(*hpet_res) + HPET_RESOURCE_NAME_SIZE);
- hpet_res->name = (void *)&hpet_res[1];
- hpet_res->flags = IORESOURCE_MEM;
- snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE, "HPET %u",
hpet_tbl->sequence);
- hpet_res->start = hpet_address;
- hpet_res->end = hpet_address + (1 * 1024) - 1;
- return 0;
-}
-/*
- hpet_insert_resource inserts the HPET resources used into the resource
- tree.
- */
-static int __init hpet_insert_resource(void) -{
- if (!hpet_res)
return 1;
- return insert_resource(&iomem_resource, hpet_res);
-}
-late_initcall(hpet_insert_resource);
-#else -#define acpi_parse_hpet NULL -#endif
- /* Local APIC = GIC cpu interface on ARM */ static int __init acpi_parse_madt_lapic_entries(void) {
@@ -741,8 +668,6 @@ int __init acpi_boot_init(void) */ acpi_process_madt();
- acpi_table_parse(ACPI_SIG_HPET, acpi_parse_hpet);
- return 0; }
-- 1.7.9.5
Linaro-acpi mailing list Linaro-acpi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-acpi
Linaro-acpi mailing list Linaro-acpi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-acpi