Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8351643ybi; Tue, 9 Jul 2019 14:03:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdhoO1BCxMaGloePyrhJ2R6MTqzmfctFU3A1ktKGl3XD8nIm1VYQMxwS+moJewN1tmWWu9 X-Received: by 2002:a17:902:a60d:: with SMTP id u13mr34698938plq.144.1562706192088; Tue, 09 Jul 2019 14:03:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562706192; cv=none; d=google.com; s=arc-20160816; b=GOVz5QyWsnwOZPcJDx3XnUx0z8JYsiY8J0iQ3J4XX1m1fJAjf9YUM2txom1iplSBg9 D3o65QMrKygXi8fZNPbuF2MoHfBgCn+nsDNFjJ9I4RoScxsTBmUR4nxiWxFvYVtUyo4O /kBNnavBzlrbKn0naYyApW2Qs8eo6F607RpxalowRNUoOZpOT0Lncztse8+ysyNOeBKn jumqBcssUCw4ztuO1kqGLvRkxwOrrv/+8bh2C9lPcnpsflLVCxpg0GE5ujmFXwDXEl/z HaSjIaAxCgNJDMQkghMLZ+QpO8Ti7rFULO+Dw92vGej2qhyBCGmy8MQG8qkJ0F9tibGt EnWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=IH221QGF+J/Ej9z47KHT21Ve+ru2bmPd7kuQ7WBkl34=; b=xlTdhR2sSe+LMjw73ij79ipAju6VlR1Lz7MSLRs5Uq+bbNlYQoQNYigtctT/r+hS2J DchZn4uXXE4R520Qzf1NZ+r4tEVDUFZb708A3kjPq6axqHdG3nbix156F43bqmfeAIK+ ndTee9F2LasF4n4vXZNbaS1oPcPn5/IKJWkhp5WShAqE3Bzs/FUfeDKf3TlcLUeMtEZF nkDtkyzKlhe+bsgdl+OavtVdmjOnXnqUeRRsg+kYnxbHhbMH7foWPTq8V/bQYEghYxLW v449KdMnJYGDnk/FzPU75TMVFY98qsmi8fOEN4TCQofSkCVQ/EDwiWzBfXlbIP6uItWn MEvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WK6kvH07; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si23991plo.328.2019.07.09.14.02.55; Tue, 09 Jul 2019 14:03:12 -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; dkim=pass header.i=@kernel.org header.s=default header.b=WK6kvH07; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729747AbfGIUbH (ORCPT + 99 others); Tue, 9 Jul 2019 16:31:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:54622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729179AbfGIUbH (ORCPT ); Tue, 9 Jul 2019 16:31:07 -0400 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4C75A216C4; Tue, 9 Jul 2019 20:31:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562704266; bh=/tteBi3FwGsHAETT02bIg+e0ZNo7j8DYyhLdl+lJps0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=WK6kvH07mh4thZzT1jrFK286npoFsNqcw7HX+SQcPx7Q4WS9QXAS+BLPRbyFafB22 2CafceWPg+iRvpXpebTOAzEj3GuQHGScoCPpGYUjb7gXPxe6U0Jql0Kya6+uMTtIob bznSqIz5RyvDOp8Hx2XBgK4lt0h1F5Y4IuLO7a1Q= Received: by mail-qt1-f170.google.com with SMTP id k10so30613qtq.1; Tue, 09 Jul 2019 13:31:06 -0700 (PDT) X-Gm-Message-State: APjAAAVoEltQsI2oKhnVCaKSRJnLDGGGu/GseEVjyrwp7Ln7KiPoqaPh ikEND7YESV9gNJQ3WVQDgrxrlym8O/MryTXM0A== X-Received: by 2002:ac8:3908:: with SMTP id s8mr20343076qtb.224.1562704265525; Tue, 09 Jul 2019 13:31:05 -0700 (PDT) MIME-Version: 1.0 References: <20190701093826.5472-1-Anson.Huang@nxp.com> <20190701093826.5472-2-Anson.Huang@nxp.com> In-Reply-To: <20190701093826.5472-2-Anson.Huang@nxp.com> From: Rob Herring Date: Tue, 9 Jul 2019 14:30:53 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V4 2/5] clocksource/drivers/sysctr: Add clock-frequency property To: Anson Huang Cc: Daniel Lezcano , Thomas Gleixner , Mark Rutland , Shawn Guo , Sascha Hauer , Sascha Hauer , Fabio Estevam , Leonard Crestez , Viresh Kumar , Daniel Baluta , Bai Ping , Lucas Stach , Abel Vesa , Andrey Smirnov , Carlo Caione , "Angus Ainslie (Purism)" , =?UTF-8?Q?Guido_G=C3=BCnther?= , "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , NXP Linux Team Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 1, 2019 at 3:47 AM wrote: > > From: Anson Huang 'dt-bindings: timer: ...' for the subject. > > 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 a DT binding. What's a platform driver? > > 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. While you've now given a good explanation why you need this, it all sounds like linux specific issues and a DT change should not be necessary. Presumably, 'clocks' points to a fixed-clock node, right? Just parse the 'clocks' phandle and fetch the frequency from that node if you need to get the frequency 'early'. > Signed-off-by: Anson Huang > --- > No change. > --- > .../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. It doesn't really work to say one or the other is needed unless you make the OS support both cases. Rob