From: Mike Turquette <mturquette@linaro.org>
To: "David Lanzendörfer" <david.lanzendoerfer@o2s.ch>,
"Emilio López" <emilio@elopez.com.ar>
Cc: zhangfei <zhangfei.gao@linaro.org>, Arnd Bergmann <arnd@arndb.de>,
dinguyen@altera.com, mark.rutland@arm.com,
devicetree@vger.kernel.org, dinh.linux@gmail.com,
heiko@sntech.de, pawel.moll@arm.com, bzhao@marvell.com,
tgih.jun@samsung.com,
Peter De Schrijver <pdeschrijver@nvidia.com>,
linux-mmc@vger.kernel.org, dianders@chromium.org,
rob.herring@calxeda.com, jh80.chung@samsung.com,
alim.akhtar@samsung.com, cjb@laptop.org,
linux-arm-kernel@lists.infradead.org, ian.campbell@citrix.com,
Hans de Goede <hdegoede@redhat.com>, Chen-Yu Tsai <wens@csie.org>
Subject: Re: [PATCHv6 2/5] clk: socfpga: Add a clock type for the SD/MMC driver
Date: Wed, 18 Dec 2013 12:10:35 -0800 [thread overview]
Message-ID: <20131218201035.23538.60602@quantum> (raw)
In-Reply-To: <2899559.jbTzDM2qtE@dizzy-6.site>
Quoting David Lanzendörfer (2013-12-16 13:54:21)
> Hi
> > that takes the MMC clock (and only the MMC clock) and does the setup
> > (it's basically configuring two values, "sample" and "output", into the
> > clock register). I really don't know what does this do/why is it
> > required/when is it used; I'm cc'ing Hans and David who can hopefully
> > explain that part.
> Since the read/write operations have to happen asynchronously and in a manner
> so that the data provided by the SD-Card can be fetched on time, a specific
> clock phase shift is required as you can see in the linked picture[1].
> That's what the function is doing: It accesses the special registers of the
> MMC clock device and configures this phase offset.
Yeah, clock phase is a fairly common thing to tune but there are two
things to consider when crafting a new api like clk_set_phase(...):
1) are we adjusting the phase of the clock signal or the phase of
something else related to the clock rate? This is just something to
think about. Sometimes it would be better to have
video_signal_set_phase() instead of clk_set_phase().
2) what is the input parameter to clk_set_phase? I guess the two best
options are degrees (zero to 359), or a fraction of the clock period
(1/4, 1/2, etc).
Any thoughts?
Regards,
Mike
>
> > I also saw a similar requirement from the gmac people (on cc too), who
> > needed to set the phy type (or something like that) on one of the clock
> > registers; so I'm thinking maybe a generic "tune something" approach
> > that lets users configure some clock-dependent, arbitrary aspect of the
> > clock is the way forward. Otherwise, we're going to end up bloating the
> > clock framework with a lot of callback pointers that are going to be
> > used in one or two clocks out of potentially hundreds on the whole system.
> It totally makes sense, since GMAC will be doing asynchrous
> operations as well.
>
> -David
>
> [1] http://www.chipestimate.com/techtalk/images/11022010_fig2_3.JPG
next prev parent reply other threads:[~2013-12-18 20:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 20:30 [PATCHv6 0/5] socfpga: Enable SD/MMC support dinguyen
2013-12-12 20:30 ` [PATCHv6 1/5] mmc: dw_mmc: Add support to set the SDR and DDR timing through clock framework dinguyen
2013-12-15 2:05 ` zhangfei
2013-12-15 3:16 ` Dinh Nguyen
2013-12-15 4:37 ` zhangfei
[not found] ` <52AD320A.4030502-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-12-16 3:24 ` Dinh Nguyen
2013-12-16 3:38 ` Zhangfei Gao
2013-12-16 4:20 ` Seungwon Jeon
[not found] ` <1386880245-10192-1-git-send-email-dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
2013-12-12 20:30 ` [PATCHv6 2/5] clk: socfpga: Add a clock type for the SD/MMC driver dinguyen-EIB2kfCEclfQT0dZR+AlfA
2013-12-14 21:33 ` Arnd Bergmann
2013-12-15 2:18 ` zhangfei
2013-12-15 4:51 ` Mike Turquette
2013-12-16 20:55 ` Emilio López
2013-12-16 21:06 ` Hans de Goede
2013-12-16 21:54 ` David Lanzendörfer
2013-12-18 20:10 ` Mike Turquette [this message]
2013-12-17 2:17 ` Chen-Yu Tsai
2013-12-12 20:30 ` [PATCHv6 3/5] dts: socfpga: Add support for SD/MMC on the SOCFPGA platform dinguyen
2013-12-12 20:30 ` [PATCHv6 4/5] mmc: dw_mmc-socfpga: Remove the SOCFPGA specific platform for dw_mmc dinguyen
2013-12-12 20:30 ` [PATCHv6 5/5] ARM: socfpga_defconfig: enable SD/MMC support dinguyen
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=20131218201035.23538.60602@quantum \
--to=mturquette@linaro.org \
--cc=alim.akhtar@samsung.com \
--cc=arnd@arndb.de \
--cc=bzhao@marvell.com \
--cc=cjb@laptop.org \
--cc=david.lanzendoerfer@o2s.ch \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=dinguyen@altera.com \
--cc=dinh.linux@gmail.com \
--cc=emilio@elopez.com.ar \
--cc=hdegoede@redhat.com \
--cc=heiko@sntech.de \
--cc=ian.campbell@citrix.com \
--cc=jh80.chung@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=pdeschrijver@nvidia.com \
--cc=rob.herring@calxeda.com \
--cc=tgih.jun@samsung.com \
--cc=wens@csie.org \
--cc=zhangfei.gao@linaro.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).