All of lore.kernel.org
 help / color / mirror / Atom feed
From: mturquette@linaro.org (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] clk: add flags to distinguish xtal clocks
Date: Wed, 23 Oct 2013 02:24:27 -0700	[thread overview]
Message-ID: <20131023092427.11662.41825@quantum> (raw)
In-Reply-To: <1381919067.11885.19.camel@porter.coelho.fi>

Quoting Luca Coelho (2013-10-16 03:24:27)
> Hi,
> 
> Sorry for the delayed response.
> 
> On Tue, 2013-10-08 at 10:27 -0500, Felipe Balbi wrote:
> > Fixing Luca's address since he left TI
> 
> Thanks, Felipe! I wouldn't have seen this otherwise.
> 
> 
> > On Mon, Oct 07, 2013 at 12:44:24AM -0700, Mike Turquette wrote:
> > > Quoting Luciano Coelho (2013-07-29 06:50:42)
> > > > Hi Mike,
> > > > 
> > > > On Fri, 2013-07-05 at 10:54 +0300, Luciano Coelho wrote:
> > > > > On Thu, 2013-07-04 at 16:19 -0700, Mike Turquette wrote:
> > > > > > Quoting Luciano Coelho (2013-07-04 15:37:45)
> > > > > > > On Thu, 2013-07-04 at 15:25 -0700, Mike Turquette wrote:
> > > > > > > > Or is it the same clock input and basically the problem is that you need
> > > > > > > > to know what kind of waveform to expect (e.g. square versus sine)?
> > > > > > > 
> > > > > > > It's the same clock input in the chip's perspective.  One clock input
> > > > > > > that can be any of the combinations I mentioned above.  Again, I'm not
> > > > > > > familiar with clocks, so I guess the square vs. sine explanation is
> > > > > > > plausible.  What I could see in the firmware is that it handles the
> > > > > > > clocks differently if they're xtal or not.
> > > > > > 
> > > > > > OMAP has a similar thing where sys_clkin (the fast reference clock for
> > > > > > the chip) can be 19.2, 26, 38.4, etc. This is easy to handle since only
> > > > > > the rates matter.
> > > > > 
> > > > > Right, this part is easy and I already have the code for that.  What I'm
> > > > > missing is a way to pass this XTAL flag to the chip.
> > > > > 
> > > > > 
> > > > > > In your case you need some extra metadata to know what to do. I'm really
> > > > > > not sure if CLK_IS_TYPE_XTAL is the most useful form this metadata can
> > > > > > take. It would be best to know if the waveform is what you really need
> > > > > > to know, or perhaps something else. For instance you might be affected
> > > > > > by some clock signal stabilization time. Can you talk to your hardware
> > > > > > guys and figure it out? I'd rather model the actual needs instead of
> > > > > > just tossing a flag in there.
> > > > > 
> > > > > I get your point.  I have tried to investigate how this flag is used by
> > > > > the firmware and I could see that it is used to set different "buffer
> > > > > gains" and "delays" when waking up (I guess this means when the clock is
> > > > > starting, so probably related to stabilization time).  They specify two
> > > > > "modes", "boost" and "normal" and use different delay values for each.
> > > > 
> > > > I tried but I couldn't find any more information on how exactly this
> > > > works.  But since this change is really simple and there seems to be
> > > > other people who need the same information, couldn't we add it as is and
> > > > try to figure out more specific information about the clocks later on?
> > > > 
> > > > Even if XTAL is not that useful if we know the other details, at least
> > > > it wouldn't hurt to have the flag there anyway.
> > > 
> > > Luca,
> > > 
> > > By any chance did you come to a different solution for this problem? I
> > > can take the patch, but I do not feel like we're solving the right
> > > problem the right way.
> 
> Unfortunately I didn't find any better solution for this.  From the
> WiLink firmware's point of view, there was not much information about
> the details of stabilization time requirements and such.
> 
>  
> > > If not I will take it for 3.13.
> 
> That would be great! As I mentioned above, the XTAL/non-XTAL flag
> wouldn't hurt, even if in most cases it may not provide the necessary
> details for the clock code.  But at least for the WiLink hardware it is
> very useful. ;)

Why is the CLK_IS_TYPE_DEFINED necessary?

Also we're adding a property to the fixed-rate binding so
Documentation/devicetree/bindings/clock/fixed-clock.txt needs to be
updated.

Regards,
Mike

> 
> --
> Cheers,
> Luca.

WARNING: multiple messages have this Message-ID (diff)
From: Mike Turquette <mturquette@linaro.org>
To: Luca Coelho <luca@coelho.fi>, balbi@ti.com
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	James Hogan <james.hogan@imgtec.com>
Subject: Re: [RFC] clk: add flags to distinguish xtal clocks
Date: Wed, 23 Oct 2013 02:24:27 -0700	[thread overview]
Message-ID: <20131023092427.11662.41825@quantum> (raw)
In-Reply-To: <1381919067.11885.19.camel@porter.coelho.fi>

Quoting Luca Coelho (2013-10-16 03:24:27)
> Hi,
> 
> Sorry for the delayed response.
> 
> On Tue, 2013-10-08 at 10:27 -0500, Felipe Balbi wrote:
> > Fixing Luca's address since he left TI
> 
> Thanks, Felipe! I wouldn't have seen this otherwise.
> 
> 
> > On Mon, Oct 07, 2013 at 12:44:24AM -0700, Mike Turquette wrote:
> > > Quoting Luciano Coelho (2013-07-29 06:50:42)
> > > > Hi Mike,
> > > > 
> > > > On Fri, 2013-07-05 at 10:54 +0300, Luciano Coelho wrote:
> > > > > On Thu, 2013-07-04 at 16:19 -0700, Mike Turquette wrote:
> > > > > > Quoting Luciano Coelho (2013-07-04 15:37:45)
> > > > > > > On Thu, 2013-07-04 at 15:25 -0700, Mike Turquette wrote:
> > > > > > > > Or is it the same clock input and basically the problem is that you need
> > > > > > > > to know what kind of waveform to expect (e.g. square versus sine)?
> > > > > > > 
> > > > > > > It's the same clock input in the chip's perspective.  One clock input
> > > > > > > that can be any of the combinations I mentioned above.  Again, I'm not
> > > > > > > familiar with clocks, so I guess the square vs. sine explanation is
> > > > > > > plausible.  What I could see in the firmware is that it handles the
> > > > > > > clocks differently if they're xtal or not.
> > > > > > 
> > > > > > OMAP has a similar thing where sys_clkin (the fast reference clock for
> > > > > > the chip) can be 19.2, 26, 38.4, etc. This is easy to handle since only
> > > > > > the rates matter.
> > > > > 
> > > > > Right, this part is easy and I already have the code for that.  What I'm
> > > > > missing is a way to pass this XTAL flag to the chip.
> > > > > 
> > > > > 
> > > > > > In your case you need some extra metadata to know what to do. I'm really
> > > > > > not sure if CLK_IS_TYPE_XTAL is the most useful form this metadata can
> > > > > > take. It would be best to know if the waveform is what you really need
> > > > > > to know, or perhaps something else. For instance you might be affected
> > > > > > by some clock signal stabilization time. Can you talk to your hardware
> > > > > > guys and figure it out? I'd rather model the actual needs instead of
> > > > > > just tossing a flag in there.
> > > > > 
> > > > > I get your point.  I have tried to investigate how this flag is used by
> > > > > the firmware and I could see that it is used to set different "buffer
> > > > > gains" and "delays" when waking up (I guess this means when the clock is
> > > > > starting, so probably related to stabilization time).  They specify two
> > > > > "modes", "boost" and "normal" and use different delay values for each.
> > > > 
> > > > I tried but I couldn't find any more information on how exactly this
> > > > works.  But since this change is really simple and there seems to be
> > > > other people who need the same information, couldn't we add it as is and
> > > > try to figure out more specific information about the clocks later on?
> > > > 
> > > > Even if XTAL is not that useful if we know the other details, at least
> > > > it wouldn't hurt to have the flag there anyway.
> > > 
> > > Luca,
> > > 
> > > By any chance did you come to a different solution for this problem? I
> > > can take the patch, but I do not feel like we're solving the right
> > > problem the right way.
> 
> Unfortunately I didn't find any better solution for this.  From the
> WiLink firmware's point of view, there was not much information about
> the details of stabilization time requirements and such.
> 
>  
> > > If not I will take it for 3.13.
> 
> That would be great! As I mentioned above, the XTAL/non-XTAL flag
> wouldn't hurt, even if in most cases it may not provide the necessary
> details for the clock code.  But at least for the WiLink hardware it is
> very useful. ;)

Why is the CLK_IS_TYPE_DEFINED necessary?

Also we're adding a property to the fixed-rate binding so
Documentation/devicetree/bindings/clock/fixed-clock.txt needs to be
updated.

Regards,
Mike

> 
> --
> Cheers,
> Luca.

  reply	other threads:[~2013-10-23  9:24 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04 21:05 [RFC] clk: add flags to distinguish xtal clocks Luciano Coelho
2013-07-04 21:05 ` Luciano Coelho
2013-07-04 22:25 ` Mike Turquette
2013-07-04 22:37   ` Luciano Coelho
2013-07-04 22:37     ` Luciano Coelho
2013-07-04 23:19     ` Mike Turquette
2013-07-05  7:54       ` Luciano Coelho
2013-07-05  7:54         ` Luciano Coelho
2013-07-29 13:50         ` Luciano Coelho
2013-07-29 13:50           ` Luciano Coelho
2013-10-07  7:44           ` Mike Turquette
2013-10-08 15:27             ` Felipe Balbi
2013-10-08 15:27               ` Felipe Balbi
2013-10-16 10:24               ` Luca Coelho
2013-10-16 10:24                 ` Luca Coelho
2013-10-23  9:24                 ` Mike Turquette [this message]
2013-10-23  9:24                   ` Mike Turquette
2013-10-23 11:35                   ` Luca Coelho
2013-10-23 11:35                     ` Luca Coelho
2013-11-08 18:00                     ` [PATCH] " Felipe Balbi
2013-11-08 18:00                       ` Felipe Balbi
2013-11-08 18:00                       ` Felipe Balbi
2013-11-08 19:16                       ` Luca Coelho
2013-11-08 19:16                         ` Luca Coelho
2013-11-10 11:37                       ` Maxime Ripard
2013-11-10 11:37                         ` Maxime Ripard
2013-11-11 19:42                         ` Felipe Balbi
2013-11-11 19:42                           ` Felipe Balbi
2013-11-11 19:42                           ` Felipe Balbi
2013-11-11 19:50                           ` Luca Coelho
2013-11-11 19:50                             ` Luca Coelho
2013-11-11 20:59                             ` Maxime Ripard
2013-11-11 20:59                               ` Maxime Ripard
2013-11-12  8:05                               ` Luca Coelho
2013-11-12  8:05                                 ` Luca Coelho
2013-11-13 14:40                                 ` Maxime Ripard
2013-11-13 14:40                                   ` Maxime Ripard
2013-11-11 20:54                           ` Maxime Ripard
2013-11-11 20:54                             ` Maxime Ripard
2013-11-11 16:27                       ` Stephen Warren
2013-11-11 16:27                         ` Stephen Warren
2013-11-11 19:43                         ` Felipe Balbi
2013-11-11 19:43                           ` Felipe Balbi
2013-11-11 19:43                           ` Felipe Balbi
2013-07-05 13:12 ` [RFC] " James Hogan
2013-07-05 13:12   ` James Hogan
2013-07-05 13:21   ` Felipe Balbi
2013-07-05 13:21     ` Felipe Balbi
2013-07-05 13:22   ` Luciano Coelho
2013-07-05 13:22     ` Luciano Coelho

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=20131023092427.11662.41825@quantum \
    --to=mturquette@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.