From patchwork Tue Jul 2 07:55:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 1126043 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nxp.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45dGwy1cFhz9sNs for ; Tue, 2 Jul 2019 18:04:34 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727745AbfGBIEd (ORCPT ); Tue, 2 Jul 2019 04:04:33 -0400 Received: from inva021.nxp.com ([92.121.34.21]:40878 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727741AbfGBIEc (ORCPT ); Tue, 2 Jul 2019 04:04:32 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 70737200B50; Tue, 2 Jul 2019 10:04:30 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id AC13B200B61; Tue, 2 Jul 2019 10:04:19 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 7A1F240327; Tue, 2 Jul 2019 16:04:06 +0800 (SGT) From: Anson.Huang@nxp.com To: daniel.lezcano@linaro.org, tglx@linutronix.de, robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, leonard.crestez@nxp.com, viresh.kumar@linaro.org, daniel.baluta@nxp.com, ping.bai@nxp.com, l.stach@pengutronix.de, abel.vesa@nxp.com, andrew.smirnov@gmail.com, ccaione@baylibre.com, angus@akkea.ca, agx@sigxcpu.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Linux-imx@nxp.com Subject: [PATCH RESEND V4 2/5] clocksource/drivers/sysctr: Add clock-frequency property Date: Tue, 2 Jul 2019 15:55:10 +0800 Message-Id: <20190702075513.17451-2-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20190702075513.17451-1-Anson.Huang@nxp.com> References: <20190702075513.17451-1-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Anson Huang Systems which use platform driver model for clock driver require the clock frequency to be supplied via device tree when system counter driver is enabled. This is necessary as in the platform driver model the of_clk operations do not work correctly because system counter driver is initialized in early phase of system boot up, and clock driver using platform driver model is NOT ready at that time, it will cause system counter driver initialization failed. Add clock-frequency property to the device tree bindings of the NXP system counter, so the driver can tell timer-of driver to get clock frequency from DT directly instead of doing of_clk operations via clk APIs. Signed-off-by: Anson Huang --- No changes. --- .../devicetree/bindings/timer/nxp,sysctr-timer.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.txt b/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.txt index d576599..7088a0e 100644 --- a/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.txt +++ b/Documentation/devicetree/bindings/timer/nxp,sysctr-timer.txt @@ -11,15 +11,18 @@ Required properties: - reg : Specifies the base physical address and size of the comapre frame and the counter control, read & compare. - interrupts : should be the first compare frames' interrupt -- clocks : Specifies the counter clock. -- clock-names: Specifies the clock's name of this module +- clocks : Specifies the counter clock, mutually exclusive with clock-frequency. +- clock-names : Specifies the clock's name of this module, mutually exclusive with + clock-frequency. +- clock-frequency : Specifies system counter clock frequency, mutually exclusive with + clocks/clock-names. Example: system_counter: timer@306a0000 { compatible = "nxp,sysctr-timer"; - reg = <0x306a0000 0x20000>;/* system-counter-rd & compare */ - clocks = <&clk_8m>; - clock-names = "per"; - interrupts = ; + reg = <0x306a0000 0x30000>; + interrupts = , + ; + clock-frequency = <8333333>; };