From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/4] mmc: sunxi: Convert MMC driver to the standard clock phase API
Date: Fri, 19 Dec 2014 18:50:00 +0100 [thread overview]
Message-ID: <20141219175000.GM4820@lukather> (raw)
In-Reply-To: <CAGb2v64iWS65t31JP_YRTigGBi5+eaJX60s7nNjv87gt2aojXw@mail.gmail.com>
On Wed, Dec 17, 2014 at 12:17:36PM +0800, Chen-Yu Tsai wrote:
> > /* determine delays */
> > if (rate <= 400000) {
> > - oclk_dly = 0;
> > - sclk_dly = 7;
> > + oclk_dly = 180;
> > + sclk_dly = 42;
>
> 42 seems like an odd number. Maybe 45?
If the rate is at 400kHz, that means that the clock in muxed from the
24M, with a divider of 60.
That means that we can outphase the clocks only by a multiple of 6
(360 / 60). 7 * 6 = 42.
Depending on how the rounding goes, 45 might work too, but if we wan't
to be conservative, 42 doesn't change anything, 45 does.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141219/ed8963eb/attachment-0001.sig>
next prev parent reply other threads:[~2014-12-19 17:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 21:38 [PATCH v2 0/4] clk: sunxi: mmc: Last bits of phase handling Maxime Ripard
2014-12-16 21:38 ` [PATCH v2 1/4] clk: sunxi: Rework MMC phase clocks Maxime Ripard
2014-12-17 6:58 ` Chen-Yu Tsai
2014-12-19 17:35 ` Maxime Ripard
2014-12-16 21:38 ` [PATCH v2 2/4] ARM: sunxi: dt: Add sample and output mmc clocks Maxime Ripard
2014-12-16 21:38 ` [PATCH v2 3/4] mmc: sunxi: Convert MMC driver to the standard clock phase API Maxime Ripard
2014-12-17 4:17 ` Chen-Yu Tsai
2014-12-19 17:35 ` Maxime Ripard
2014-12-19 17:50 ` Maxime Ripard [this message]
2014-12-16 21:38 ` [PATCH v2 4/4] clk: sunxi: Remove custom phase function Maxime Ripard
2014-12-17 10:54 ` [PATCH v2 0/4] clk: sunxi: mmc: Last bits of phase handling Chen-Yu Tsai
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=20141219175000.GM4820@lukather \
--to=maxime.ripard@free-electrons.com \
--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 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).