linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 2/2 v2] ARM: mach-shmobile: clock-sh7372: FSI parent
Date: Fri, 24 Sep 2010 10:02:23 +0000	[thread overview]
Message-ID: <AANLkTinV2acseNvs1+594hN1Fo2PanVPkebf6TM7H9Xj@mail.gmail.com> (raw)
In-Reply-To: <w3piq1vsiif.wl%kuninori.morimoto.gx@renesas.com>

Hi Morimoto-san,

On Fri, Sep 24, 2010 at 4:33 PM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
>> > +       /*
>> > +        * FSIACK is connected to AK4642,
>> > +        * and the rate is depend on playing sound rate.
>> > +        * So, set dummy rate (= 48k) here
>> > +        */
>> > +       ret = clk_set_rate(&sh7372_fsiack_clk, FSIACK_DUMMY_RATE);
>> > +       if (ret < 0) {
>> > +               pr_err("Cannot set FSIACK dummy rate: %d\n", ret);
>> > +               return ret;
>> > +       }
>> > +
>> > +       fsia_ick = clk_get(&fsi_device.dev, "icka");
>> > +       if (IS_ERR(fsia_ick)) {
>> > +               ret = PTR_ERR(fsia_ick);
>> > +               pr_err("Cannot get FSI ICK: %d\n", ret);
>> > +               return ret;
>> > +       }
>> > +
>> > +       ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk);
>> > +       if (ret < 0) {
>> > +               pr_err("Cannot set FSI-A parent: %d\n", ret);
>> > +               goto out;
>> > +       }
>> > +
>> > +       ret = clk_set_rate(fsia_ick, FSIACK_DUMMY_RATE);
>> > +       if (ret < 0)
>> > +               pr_err("Cannot set FSI-A rate: %d\n", ret);
>>
>> Is it really necessary to perform clk_set_rate() two times?
>
> Yes. both are needed.
>
> 1st dummy clk_set_rate is needed to ensure
> clk->rate of external pin (which is needed for 2nd clk_set_rate).
>
> 2nd clk_set_rate assure 1/1 clock divide for FSI-A.
> because default FSI-A division ratio is 1/64.

Ok, I understand and agree. I think your latest patch is ok.

Thanks for your help!

/ magnus

      reply	other threads:[~2010-09-24 10:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24  7:33 [PATCH 2/2 v2] ARM: mach-shmobile: clock-sh7372: FSI parent select Kuninori Morimoto
2010-09-24 10:02 ` Magnus Damm [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=AANLkTinV2acseNvs1+594hN1Fo2PanVPkebf6TM7H9Xj@mail.gmail.com \
    --to=magnus.damm@gmail.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 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).