All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 04/11] ARM: shmobile: r8a7778: common clock framework CPG driver
Date: Sat, 24 Jan 2015 23:16:34 +0000	[thread overview]
Message-ID: <7689709.OlM3GtWmty@avalon> (raw)
In-Reply-To: <1421857262-16607-5-git-send-email-ulrich.hecht+renesas@gmail.com>

Hi Ulrich,

On Friday 23 January 2015 18:00:02 Ulrich Hecht wrote:
> On Thu, Jan 22, 2015 at 12:37 AM, Laurent Pinchart wrote:
> >> +     if (!strcmp(name, "extal")) {
> >> +             return clk_register_fixed_rate(NULL, "extal", NULL,
> >> +                     CLK_IS_ROOT,
> >> r8a7778_rates[cpg_mode_rates].extal_rate);
> >
> > As the external clock is an input to the CPG, shouldn't it be specified by
> > a separate fixed-frequency clock DT node, and referenced by the CPG using
> > the clocks attributes ? You could then remove the extal_rate field from
> > the r8a7778_rates array above, and possibly rename the array to
> > r8a7778_pll_mults or similar.
> 
> This is a translation of what the legacy clock driver does.  These
> frequencies seem to be assumptions as to what input clocks would be
> reasonable given the current mode bits.  If I interpret the schematics
> correctly, the Bock-W board has a socketed oscillator, and the mode
> bits are switchable, so it's up to the user to configure the board to
> a sane setting.  To me, neither a fixed frequency nor this list of
> educated guesses seems quite "right" under these circumstances...

A separate fixed frequency clock DT matches the board configuration, so I 
think that's what should be used. It's true that the user could replace the 
oscillator, and in that case the DT will need to be updated. There's not much 
we can do for non-discoverable devices. Even if that solution isn't perfect, I 
think it's better than making the CPG node provide the external clock source, 
as it clearly doesn't from a hardware point of view.

-- 
Regards,

Laurent Pinchart


      parent reply	other threads:[~2015-01-24 23:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 16:20 [PATCH 04/11] ARM: shmobile: r8a7778: common clock framework CPG driver Ulrich Hecht
2015-01-21 23:37 ` Laurent Pinchart
2015-01-23  9:12 ` Geert Uytterhoeven
2015-01-23 17:00 ` Ulrich Hecht
2015-01-24 23:16 ` Laurent Pinchart [this message]

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=7689709.OlM3GtWmty@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-sh@vger.kernel.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.