summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/clksrc-of.c
diff options
context:
space:
mode:
authorMarc Zyngier2015-09-28 16:49:15 +0200
committerRafael J. Wysocki2015-10-01 02:18:38 +0200
commitc625f76a9910b9d51df5d6ca40a8da0684326996 (patch)
tree21750fd3b7b039d83a53d7e1f7254d6ae8810467 /drivers/clocksource/clksrc-of.c
parentirqchip / GIC: Convert the GIC driver to ACPI probing (diff)
downloadkernel-qcow2-linux-c625f76a9910b9d51df5d6ca40a8da0684326996.tar.gz
kernel-qcow2-linux-c625f76a9910b9d51df5d6ca40a8da0684326996.tar.xz
kernel-qcow2-linux-c625f76a9910b9d51df5d6ca40a8da0684326996.zip
clocksource / ACPI: Add probing infrastructure for ACPI-based clocksources
DT enjoys a rather nice probing infrastructure for clocksources, while ACPI is so far stuck into a very distant past. This patch introduces a declarative API, allowing clocksources to be self-contained and be called when parsing the GTDT table. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/clocksource/clksrc-of.c')
-rw-r--r--drivers/clocksource/clksrc-of.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c
index 0093a8e49e14..a2105bd620a0 100644
--- a/drivers/clocksource/clksrc-of.c
+++ b/drivers/clocksource/clksrc-of.c
@@ -14,6 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <linux/acpi.h>
#include <linux/init.h>
#include <linux/of.h>
#include <linux/clocksource.h>
@@ -38,6 +39,9 @@ void __init clocksource_of_init(void)
init_func(np);
clocksources++;
}
+
+ clocksources += acpi_probe_device_table(clksrc);
+
if (!clocksources)
pr_crit("%s: no matching clocksources found\n", __func__);
}