Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2816269ybd; Thu, 27 Jun 2019 20:40:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqywOKFCqVRtoybjQ8g3I09i0s97+xNnlVmBKomcqM7cyKWaWSfJJgw2nOsukq+iEfATCWte X-Received: by 2002:a63:360d:: with SMTP id d13mr7188126pga.80.1561693241831; Thu, 27 Jun 2019 20:40:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561693241; cv=none; d=google.com; s=arc-20160816; b=u0qlo+MAf9vj4N8bn6nsYClolru/hL+6NycIIR0pu6vbcvQcJmVaYXS0lFEL0N6t77 /VNV/U05Yf2OE6FjC/wS+OK/7szTcrA/gKhQ1t7iLwhZic03UCH+p9i62a3w1prQoAvO FXIwJFsTF8wiXkG29vLFntkf+VhGZA41OSt0cwet7a/0hiTm2VMbGzeXqjzv04HLZSba vg7K6gpIgMSgwfF3+POZBrnFUxmlVWmqSSkWG3+AClw3CFJkBXyWpjhjpr7XP6KIv44R h0DsKDmnp+4aFb3NrslwU2r/iTEjbCDZ3UKAVnUffeTCuz4jWJ8CVlDkV08HIAI3Mi97 //Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=vANemLPP73f7Nvck9JxLrY5wpW6t5XZqZK2ePcfEfL0=; b=wxr5qR3wfkkAKxpMZ0i5NW45k/M7u+QcVWl1nZIzuQ+bG7CcQy3HKhBZhU/PfFtqmV WGrNNY8a8woTGVr1QnjjdktxD4+xfRWicSVWbKvJ6bncvn0FHO8mC1Dl5xg+S5FOrZf9 COd7xzyVQpCWyLd+CnfQDoaVxGQLyseP8+ProncnMgx+7rX6IL4CA1lq7T63BULqctko WHAdZaaHzJfH+fPLrXIB/cTxMufjx/H40KHWsYL/SHqvQuYnEFi+fqkf2/tjUqaG9wxM D34dJQh2gV9O5pAPHe3b9AXVGdJl4RvtXpYmaKdyBYXNNo2IJkiGnuw17JAToij10osk TCpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t135si1125189pfc.251.2019.06.27.20.40.26; Thu, 27 Jun 2019 20:40:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727099AbfF1Dj7 (ORCPT + 99 others); Thu, 27 Jun 2019 23:39:59 -0400 Received: from inva021.nxp.com ([92.121.34.21]:58670 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726894AbfF1Dj5 (ORCPT ); Thu, 27 Jun 2019 23:39:57 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 8C86A2002F0; Fri, 28 Jun 2019 05:39:55 +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 D1F7F200D3E; Fri, 28 Jun 2019 05:39:44 +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 CD3F5402FB; Fri, 28 Jun 2019 11:39:31 +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 V3 2/5] clocksource/drivers/sysctr: Add clock-frequency property Date: Fri, 28 Jun 2019 11:30:38 +0800 Message-Id: <20190628033041.8513-2-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20190628033041.8513-1-Anson.Huang@nxp.com> References: <20190628033041.8513-1-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- Changes since V2: - make clock-frequency property as required property, mutually exclusive with clocks/clock-names. - update the example using the DT node added in this patch series. --- .../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>; }; -- 2.7.4