From patchwork Fri Sep 4 17:06:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 7124951 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0D9879F1D5 for ; Fri, 4 Sep 2015 17:08:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D03E20857 for ; Fri, 4 Sep 2015 17:08:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E6122084B for ; Fri, 4 Sep 2015 17:07:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759939AbbIDRHf (ORCPT ); Fri, 4 Sep 2015 13:07:35 -0400 Received: from foss.arm.com ([217.140.101.70]:44861 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760374AbbIDRHU (ORCPT ); Fri, 4 Sep 2015 13:07:20 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6DB19545; Fri, 4 Sep 2015 10:07:26 -0700 (PDT) Received: from approximate.cambridge.arm.com (approximate.cambridge.arm.com [10.1.209.148]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3B4C33F21A; Fri, 4 Sep 2015 10:07:18 -0700 (PDT) From: Marc Zyngier To: "Rafael J. Wysocki" , Len Brown , Hanjun Guo , Tomasz Nowicki , Thomas Gleixner , Jason Cooper , Lorenzo Pieralisi , Sudeep Holla , Will Deacon , Catalin Marinas Cc: linaro-acpi@lists.linaro.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/5] clocksource/acpi: Add probing infrastructure for ACPI-based clocksources Date: Fri, 4 Sep 2015 18:06:51 +0100 Message-Id: <1441386412-8139-5-git-send-email-marc.zyngier@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1441386412-8139-1-git-send-email-marc.zyngier@arm.com> References: <1441386412-8139-1-git-send-email-marc.zyngier@arm.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/clocksource/clksrc-of.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c index 0093a8e..b351b1e 100644 --- a/drivers/clocksource/clksrc-of.c +++ b/drivers/clocksource/clksrc-of.c @@ -14,6 +14,7 @@ * along with this program. If not, see . */ +#include #include #include #include @@ -38,6 +39,9 @@ void __init clocksource_of_init(void) init_func(np); clocksources++; } + + clocksources += acpi_probe_device_table(ACPI_SIG_GTDT); + if (!clocksources) pr_crit("%s: no matching clocksources found\n", __func__); }