From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754613AbbINH6w (ORCPT ); Mon, 14 Sep 2015 03:58:52 -0400 Received: from down.free-electrons.com ([37.187.137.238]:50734 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754543AbbINH6t convert rfc822-to-8bit (ORCPT ); Mon, 14 Sep 2015 03:58:49 -0400 Date: Mon, 14 Sep 2015 09:58:46 +0200 From: Boris Brezillon To: Harini Katakam Cc: =?UTF-8?B?U8O2cmVu?= Brinkmann , Harini Katakam , Nicolas Ferre , davem@davemloft.net, Rob Herring , Pawel Moll , Mark Rutland , "ijc+devicetree@hellion.org.uk" , Kumar Gala , alexandre.belloni@free-electrons.com, netdev@vger.kernel.org, "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Punnaiah Choudary Kalluri , "michals@xilinx.com" , anirudh@xilinx.com Subject: Re: [RFC PATCH 3/3] devicetree: macb: Add optional property tsu-clk Message-ID: <20150914095846.0d8e2d74@bbrezillon> In-Reply-To: References: <1441958258-35441-1-git-send-email-harinik@xilinx.com> <1441958258-35441-4-git-send-email-harinik@xilinx.com> <20150911165256.GT19678@xsjsorenbubuntu> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Harini, On Mon, 14 Sep 2015 09:39:05 +0530 Harini Katakam wrote: > On Fri, Sep 11, 2015 at 10:22 PM, Sören Brinkmann > wrote: > > Hi Harini, > > > > On Fri, 2015-09-11 at 01:27PM +0530, Harini Katakam wrote: > >> Add TSU clock frequency to be used for 1588 support in macb driver. > >> > >> Signed-off-by: Harini Katakam > >> --- > >> Documentation/devicetree/bindings/net/macb.txt | 3 +++ > >> 1 file changed, 3 insertions(+) > >> > >> diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt > >> index b5d7976..f7c0ea8 100644 > >> --- a/Documentation/devicetree/bindings/net/macb.txt > >> +++ b/Documentation/devicetree/bindings/net/macb.txt > >> @@ -19,6 +19,9 @@ Required properties: > >> Optional elements: 'tx_clk' > >> - clocks: Phandles to input clocks. > >> > >> +Optional properties: > >> +- tsu-clk: Time stamp unit clock frequency used. > > > > Why are we not using the CCF and a clk_get_rate() in the driver? > > > > If the clock source was only internal, we could use this > approach as usual. But TSU clock can be configured to > come from an external clock source or internal. How about declaring a fixed-rate clk [1] if it comes from an external clk, and using a clk driver for the internal clk case? This way you'll be able to use the clk API (including the clk_get_rate() function) instead of introducing a new way to retrieve a clk frequency. Best Regards, Boris [1]http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/clock/fixed-clock.txt -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com