mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
9952f6918d
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms and conditions of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 228 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190528171438.107155473@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
44 lines
916 B
C
44 lines
916 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
|
|
*/
|
|
|
|
#include <linux/acpi.h>
|
|
#include <linux/init.h>
|
|
#include <linux/of.h>
|
|
#include <linux/clocksource.h>
|
|
|
|
extern struct of_device_id __timer_of_table[];
|
|
|
|
static const struct of_device_id __timer_of_table_sentinel
|
|
__used __section(__timer_of_table_end);
|
|
|
|
void __init timer_probe(void)
|
|
{
|
|
struct device_node *np;
|
|
const struct of_device_id *match;
|
|
of_init_fn_1_ret init_func_ret;
|
|
unsigned timers = 0;
|
|
int ret;
|
|
|
|
for_each_matching_node_and_match(np, __timer_of_table, &match) {
|
|
if (!of_device_is_available(np))
|
|
continue;
|
|
|
|
init_func_ret = match->data;
|
|
|
|
ret = init_func_ret(np);
|
|
if (ret) {
|
|
pr_err("Failed to initialize '%pOF': %d\n", np, ret);
|
|
continue;
|
|
}
|
|
|
|
timers++;
|
|
}
|
|
|
|
timers += acpi_probe_device_table(timer);
|
|
|
|
if (!timers)
|
|
pr_crit("%s: no matching timers found\n", __func__);
|
|
}
|