Merge branch 'acpi-init'

* acpi-init:
  clocksource: cosmetic: Drop OF 'dependency' from symbols
  clocksource / arm_arch_timer: Convert to ACPI probing
  clocksource: Add new CLKSRC_{PROBE,ACPI} config symbols
  clocksource / ACPI: Add probing infrastructure for ACPI-based clocksources
  irqchip / GIC: Convert the GIC driver to ACPI probing
  irqchip / ACPI: Add probing infrastructure for ACPI-based irqchips
  ACPI: Add early device probing infrastructure
This commit is contained in:
Rafael J. Wysocki
2015-10-25 22:55:14 +01:00
32 changed files with 211 additions and 161 deletions
+1 -1
View File
@@ -120,6 +120,6 @@ void __init time_init(void)
#ifdef CONFIG_COMMON_CLK
of_clk_init(NULL);
#endif
clocksource_of_init();
clocksource_probe();
}
}
+2 -2
View File
@@ -647,7 +647,7 @@ static OMAP_SYS_32K_TIMER_INIT(4, 1, "timer_32k_ck", "ti,timer-alwon",
void __init omap4_local_timer_init(void)
{
omap4_sync32k_timer_init();
clocksource_of_init();
clocksource_probe();
}
#else
void __init omap4_local_timer_init(void)
@@ -663,7 +663,7 @@ void __init omap5_realtime_timer_init(void)
omap4_sync32k_timer_init();
realtime_counter_init();
clocksource_of_init();
clocksource_probe();
}
#endif /* CONFIG_SOC_OMAP5 || CONFIG_SOC_DRA7XX */
+1 -1
View File
@@ -67,7 +67,7 @@ static void __init rockchip_timer_init(void)
}
of_clk_init(NULL);
clocksource_of_init();
clocksource_probe();
}
static void __init rockchip_dt_init(void)
+1 -1
View File
@@ -97,7 +97,7 @@ static u32 __init r8a7779_read_mode_pins(void)
static void __init r8a7779_init_time(void)
{
r8a7779_clocks_init(r8a7779_read_mode_pins());
clocksource_of_init();
clocksource_probe();
}
static const char *const r8a7779_compat_dt[] __initconst = {
+1 -1
View File
@@ -128,7 +128,7 @@ void __init rcar_gen2_timer_init(void)
#endif /* CONFIG_ARM_ARCH_TIMER */
rcar_gen2_clocks_init(mode);
clocksource_of_init();
clocksource_probe();
}
struct memory_reserve_config {
+1 -1
View File
@@ -124,5 +124,5 @@ void __init spear13xx_timer_init(void)
clk_put(pclk);
spear_setup_of_timer();
clocksource_of_init();
clocksource_probe();
}
+1 -1
View File
@@ -46,7 +46,7 @@ static void __init sun6i_timer_init(void)
of_clk_init(NULL);
if (IS_ENABLED(CONFIG_RESET_CONTROLLER))
sun6i_reset_init();
clocksource_of_init();
clocksource_probe();
}
DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
+1 -1
View File
@@ -408,7 +408,7 @@ static const char * u300_board_compat[] = {
DT_MACHINE_START(U300_DT, "U300 S335/B335 (Device Tree)")
.map_io = u300_map_io,
.init_irq = u300_init_irq_dt,
.init_time = clocksource_of_init,
.init_time = clocksource_probe,
.init_machine = u300_init_machine_dt,
.restart = u300_restart,
.dt_compat = u300_board_compat,
+1 -1
View File
@@ -44,5 +44,5 @@ void __init ux500_timer_init(void)
dt_fail:
clksrc_dbx500_prcmu_init(prcmu_timer_base);
clocksource_of_init();
clocksource_probe();
}
+1 -1
View File
@@ -154,7 +154,7 @@ static void __init zynq_timer_init(void)
zynq_clock_init();
of_clk_init(NULL);
clocksource_of_init();
clocksource_probe();
}
static struct map_desc zynq_cortex_a9_scu_map __initdata = {
-1
View File
@@ -12,7 +12,6 @@
#ifndef _ASM_ACPI_H
#define _ASM_ACPI_H
#include <linux/irqchip/arm-gic-acpi.h>
#include <linux/mm.h>
#include <linux/psci.h>
-13
View File
@@ -1,8 +1,6 @@
#ifndef __ASM_IRQ_H
#define __ASM_IRQ_H
#include <linux/irqchip/arm-gic-acpi.h>
#include <asm-generic/irq.h>
struct pt_regs;
@@ -10,15 +8,4 @@ struct pt_regs;
extern void migrate_irqs(void);
extern void set_handle_irq(void (*handle_irq)(struct pt_regs *));
static inline void acpi_irq_init(void)
{
/*
* Hardcode ACPI IRQ chip initialization to GICv2 for now.
* Proper irqchip infrastructure will be implemented along with
* incoming GICv2m|GICv3|ITS bits.
*/
acpi_gic_init();
}
#define acpi_irq_init acpi_irq_init
#endif
-25
View File
@@ -205,28 +205,3 @@ void __init acpi_boot_table_init(void)
disable_acpi();
}
}
void __init acpi_gic_init(void)
{
struct acpi_table_header *table;
acpi_status status;
acpi_size tbl_size;
int err;
if (acpi_disabled)
return;
status = acpi_get_table_with_size(ACPI_SIG_MADT, 0, &table, &tbl_size);
if (ACPI_FAILURE(status)) {
const char *msg = acpi_format_exception(status);
pr_err("Failed to get MADT table, %s\n", msg);
return;
}
err = gic_v2_acpi_init(table);
if (err)
pr_err("Failed to initialize GIC IRQ controller");
early_acpi_os_unmap_memory((char *)table, tbl_size);
}
+1 -7
View File
@@ -67,16 +67,10 @@ void __init time_init(void)
u32 arch_timer_rate;
of_clk_init(NULL);
clocksource_of_init();
clocksource_probe();
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();
if (!arch_timer_rate)
panic("Unable to initialise architected timer.\n");
+1 -1
View File
@@ -194,7 +194,7 @@ void __init time_init(void)
{
of_clk_init(NULL);
setup_cpuinfo_clk();
clocksource_of_init();
clocksource_probe();
}
#ifdef CONFIG_DEBUG_FS
+1 -1
View File
@@ -39,7 +39,7 @@ void __init plat_time_init(void)
struct clk *clk;
of_clk_init(NULL);
clocksource_of_init();
clocksource_probe();
np = of_get_cpu_node(0, NULL);
if (!np) {
+1 -1
View File
@@ -75,5 +75,5 @@ void __init plat_time_init(void)
pr_info("CPU Clock: %ldMHz\n", clk_get_rate(clk) / 1000000);
mips_hpt_frequency = clk_get_rate(clk) / 2;
clk_put(clk);
clocksource_of_init();
clocksource_probe();
}
+1 -1
View File
@@ -324,7 +324,7 @@ void __init time_init(void)
if (count < 2)
panic("%d timer is found, it needs 2 timers in system\n", count);
clocksource_of_init();
clocksource_probe();
}
CLOCKSOURCE_OF_DECLARE(nios2_timer, ALTR_TIMER_COMPATIBLE, nios2_time_init);
+1 -1
View File
@@ -148,7 +148,7 @@ void __init time_init(void)
local_timer_setup(0);
setup_irq(this_cpu_ptr(&ccount_timer)->evt.irq, &timer_irqaction);
sched_clock_register(ccount_sched_clock_read, 32, ccount_freq);
clocksource_of_init();
clocksource_probe();
}
/*
+39
View File
@@ -1913,3 +1913,42 @@ int __init acpi_scan_init(void)
mutex_unlock(&acpi_scan_lock);
return result;
}
static struct acpi_probe_entry *ape;
static int acpi_probe_count;
static DEFINE_SPINLOCK(acpi_probe_lock);
static int __init acpi_match_madt(struct acpi_subtable_header *header,
const unsigned long end)
{
if (!ape->subtable_valid || ape->subtable_valid(header, ape))
if (!ape->probe_subtbl(header, end))
acpi_probe_count++;
return 0;
}
int __init __acpi_probe_device_table(struct acpi_probe_entry *ap_head, int nr)
{
int count = 0;
if (acpi_disabled)
return 0;
spin_lock(&acpi_probe_lock);
for (ape = ap_head; nr; ape++, nr--) {
if (ACPI_COMPARE_NAME(ACPI_SIG_MADT, ape->id)) {
acpi_probe_count = 0;
acpi_table_parse_madt(ape->type, acpi_match_madt, 0);
count += acpi_probe_count;
} else {
int res;
res = acpi_table_parse(ape->id, ape->probe_table);
if (!res)
count++;
}
}
spin_unlock(&acpi_probe_lock);
return count;
}

Some files were not shown because too many files have changed in this diff Show More