netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Harini Katakam <harinikatakamlinux@gmail.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>,
	"Harini Katakam" <harini.katakam@xilinx.com>,
	"Nicolas Ferre" <nicolas.ferre@atmel.com>,
	davem@davemloft.net, "Rob Herring" <robh+dt@kernel.org>,
	"Pawel Moll" <pawel.moll@arm.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
	"Kumar Gala" <galak@codeaurora.org>,
	alexandre.belloni@free-electrons.com, netdev@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Punnaiah Choudary Kalluri" <punnaia@xilinx.com>,
	"michals@xilinx.com" <michals@xilinx.com>,
	anirudh@xilinx.com
Subject: Re: [RFC PATCH 3/3] devicetree: macb: Add optional property tsu-clk
Date: Mon, 14 Sep 2015 09:58:46 +0200	[thread overview]
Message-ID: <20150914095846.0d8e2d74@bbrezillon> (raw)
In-Reply-To: <CAFcVECK=EONgqPq1jt_kti-VKXPWGVj3OSnqUvo0YcR65Z+Phg@mail.gmail.com>

Hi Harini,

On Mon, 14 Sep 2015 09:39:05 +0530
Harini Katakam <harinikatakamlinux@gmail.com> wrote:

> On Fri, Sep 11, 2015 at 10:22 PM, Sören Brinkmann
> <soren.brinkmann@xilinx.com> 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 <harinik@xilinx.com>
> >> ---
> >>  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

  reply	other threads:[~2015-09-14  7:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11  7:57 [RFC PATCH 0/3] 1588 support for Zynq Ultrascale+ MPSoC Harini Katakam
2015-09-11  7:57 ` [RFC PATCH 1/3] net: macb: Add support for extended BD with a config option Harini Katakam
     [not found]   ` <1441958258-35441-2-git-send-email-harinik-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2015-09-21 17:48     ` Harini Katakam
2015-09-11  7:57 ` [RFC PATCH 2/3] net: macb: Add support for 1588 for Zynq Ultrascale+ MPSoC Harini Katakam
     [not found]   ` <1441958258-35441-3-git-send-email-harinik-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2015-09-21 17:49     ` Harini Katakam
     [not found]       ` <CAFcVECLfXL-=efbUhNeKhiFQgtfv6Z1+JJckg+js7DM-LfFeSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-21 18:39         ` Richard Cochran
2015-09-22  4:21           ` Harini Katakam
2016-08-09 16:40       ` Nicolas Ferre
2016-08-09 16:56         ` Punnaiah Choudary Kalluri
2016-08-10  4:56           ` Harini Katakam
     [not found]           ` <03CA77BA8AF6F1469AEDFBDA1322A7B74A1C4205-4lKfpRxZ5ekkx2a1wsGfbYg+Gb3gawCHQz34XiSyOiE@public.gmane.org>
2016-08-10  6:11             ` Michal Simek
2016-08-10 10:12           ` Andrei Pistirica
2016-08-10 10:22             ` Harini Katakam
2015-09-11  7:57 ` [RFC PATCH 3/3] devicetree: macb: Add optional property tsu-clk Harini Katakam
2015-09-11 16:52   ` Sören Brinkmann
2015-09-14  4:09     ` Harini Katakam
2015-09-14  7:58       ` Boris Brezillon [this message]
2015-09-14 14:44         ` Sören Brinkmann
2015-09-14 17:34           ` Harini Katakam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150914095846.0d8e2d74@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=anirudh@xilinx.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=harini.katakam@xilinx.com \
    --cc=harinikatakamlinux@gmail.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=michals@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=pawel.moll@arm.com \
    --cc=punnaia@xilinx.com \
    --cc=robh+dt@kernel.org \
    --cc=soren.brinkmann@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).