Commit ae281cbd authored by Marc Zyngier's avatar Marc Zyngier Committed by Rafael J. Wysocki

clocksource / arm_arch_timer: Convert to ACPI probing

It is now absolutely trivial to convert the arch timer driver to
use ACPI probing, just like its DT counterpart.

Let's enjoy another crapectomy.
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Tested-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent aad83b15
...@@ -71,12 +71,6 @@ void __init time_init(void) ...@@ -71,12 +71,6 @@ void __init time_init(void)
tick_setup_hrtimer_broadcast(); tick_setup_hrtimer_broadcast();
/*
* Since ACPI or FDT will only one be available in the system,
* we can use acpi_generic_timer_init() here safely
*/
acpi_generic_timer_init();
arch_timer_rate = arch_timer_get_rate(); arch_timer_rate = arch_timer_get_rate();
if (!arch_timer_rate) if (!arch_timer_rate)
panic("Unable to initialise architected timer.\n"); panic("Unable to initialise architected timer.\n");
......
...@@ -131,6 +131,7 @@ config CLKSRC_STM32 ...@@ -131,6 +131,7 @@ config CLKSRC_STM32
config ARM_ARCH_TIMER config ARM_ARCH_TIMER
bool bool
select CLKSRC_OF if OF select CLKSRC_OF if OF
select CLKSRC_ACPI if ACPI
config ARM_ARCH_TIMER_EVTSTREAM config ARM_ARCH_TIMER_EVTSTREAM
bool "Support for ARM architected timer event stream generation" bool "Support for ARM architected timer event stream generation"
......
...@@ -864,13 +864,5 @@ static int __init arch_timer_acpi_init(struct acpi_table_header *table) ...@@ -864,13 +864,5 @@ static int __init arch_timer_acpi_init(struct acpi_table_header *table)
arch_timer_init(); arch_timer_init();
return 0; return 0;
} }
CLOCKSOURCE_ACPI_DECLARE(arch_timer, ACPI_SIG_GTDT, arch_timer_acpi_init);
/* Initialize all the generic timers presented in GTDT */
void __init acpi_generic_timer_init(void)
{
if (acpi_disabled)
return;
acpi_table_parse(ACPI_SIG_GTDT, arch_timer_acpi_init);
}
#endif #endif
...@@ -252,12 +252,6 @@ extern void clocksource_of_init(void); ...@@ -252,12 +252,6 @@ extern void clocksource_of_init(void);
static inline void clocksource_of_init(void) {} static inline void clocksource_of_init(void) {}
#endif #endif
#ifdef CONFIG_ACPI
void acpi_generic_timer_init(void);
#else
static inline void acpi_generic_timer_init(void) { }
#endif
#define CLOCKSOURCE_ACPI_DECLARE(name, table_id, fn) \ #define CLOCKSOURCE_ACPI_DECLARE(name, table_id, fn) \
ACPI_DECLARE_PROBE_ENTRY(clksrc, name, table_id, 0, NULL, 0, fn) ACPI_DECLARE_PROBE_ENTRY(clksrc, name, table_id, 0, NULL, 0, fn)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment