linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 2/2 v2] ARM: mach-shmobile: clock-sh7372: FSI parent select
Date: Fri, 24 Sep 2010 07:33:28 +0000	[thread overview]
Message-ID: <w3piq1vsiif.wl%kuninori.morimoto.gx@renesas.com> (raw)


Hi Magnus

Thank you for checking patch !!

> > +       /*
> > +        * 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.

Thanks

Best regards
--
Kuninori Morimoto

             reply	other threads:[~2010-09-24  7:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24  7:33 Kuninori Morimoto [this message]
2010-09-24 10:02 ` [PATCH 2/2 v2] ARM: mach-shmobile: clock-sh7372: FSI parent Magnus Damm

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=w3piq1vsiif.wl%kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.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).