From: Jaehoon Chung <jh80.chung@samsung.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: ulf.hansson@linaro.org, mturquette@baylibre.com,
sboyd@codeaurora.org, linux-mmc@vger.kernel.org,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
Alexandru M Stan <amstan@chromium.org>, CPGS <cpgs@samsung.com>
Subject: Re: [PATCH 6/8] mmc: dw_mmc: Generic MMC tuning with the clock phase framework
Date: Wed, 16 Sep 2015 11:30:26 +0900 [thread overview]
Message-ID: <55F8D442.5020004@samsung.com> (raw)
In-Reply-To: <8878355.D5Q8mk4qcM@diego>
Hi,
On 09/16/2015 07:09 AM, Heiko Stübner wrote:
> Hi,
>
> Am Dienstag, 15. September 2015, 17:25:38 schrieb Jaehoon Chung:
>> On 09/01/2015 03:24 AM, Heiko Stuebner wrote:
>>> From: Alexandru M Stan <amstan@chromium.org>
>>>
>>> This algorithm will try 1 degree increments, since there's no way to tell
>>> what resolution the underlying phase code uses. As an added bonus, doing
>>> many tunings yields better results since some tests are run more than once
>>> (ex: if the underlying driver uses 45 degree increments, the tuning code
>>> will try the same angle more than once).
>>>
>>> It will then construct a list of good phase ranges (even ranges that cross
>>> 360/0), will pick the biggest range then it will set the sample_clk to the
>>> middle of that range.
>>>
>>> We do not touch ciu_drive (and by extension define default-drive-phase).
>>> Drive phase is mostly used to define minimum hold times, while one could
>>> write some code to determine what phase meets the minimum hold time (ex 10
>>> degrees) this will not work with the current clock phase framework (which
>>> floors angles, so we'll get 0 deg, and there's no way to know what
>>> resolution the floors happen at). We assume that the default drive angles
>>> set by the hardware are good enough.
>>>
>>> If a device has device specific code (like exynos) then that will still
>>> take precedence, otherwise this new code will execute. If the device wants
>>> to tune, but has no sample_clk defined we'll return EIO with an error
>>> message.
>>
>> Which point is "_generic_"? I don't find the code that control the register
>> relevant to CLK_DRV/SMPL PHASE. It seems that posted the similar patches at
>> u-boot mailing list..
>
> The "generic" part is that it uses the clk phase API for dw_mmc
> implementations where the clkgen controlling interface is outside the dw_mmc
> IP itself. So it's open for other implementations as well.
Designware IP also has the CLK phase register(UHS_REG_EXT register)...
if this code is related with it, it should be located into dw-mmc.c.
>
> But if you are more comfortable with it, I can also move it into the dw_mmc-
> rockchip variant for the time being, until another user comes along.
I think more better that this code is located into dw_mmc-rockchip. how about?
Best Regards,
Jaehoon Chung
>
>
> Heiko
>
>
WARNING: multiple messages have this Message-ID (diff)
From: jh80.chung@samsung.com (Jaehoon Chung)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/8] mmc: dw_mmc: Generic MMC tuning with the clock phase framework
Date: Wed, 16 Sep 2015 11:30:26 +0900 [thread overview]
Message-ID: <55F8D442.5020004@samsung.com> (raw)
In-Reply-To: <8878355.D5Q8mk4qcM@diego>
Hi,
On 09/16/2015 07:09 AM, Heiko St?bner wrote:
> Hi,
>
> Am Dienstag, 15. September 2015, 17:25:38 schrieb Jaehoon Chung:
>> On 09/01/2015 03:24 AM, Heiko Stuebner wrote:
>>> From: Alexandru M Stan <amstan@chromium.org>
>>>
>>> This algorithm will try 1 degree increments, since there's no way to tell
>>> what resolution the underlying phase code uses. As an added bonus, doing
>>> many tunings yields better results since some tests are run more than once
>>> (ex: if the underlying driver uses 45 degree increments, the tuning code
>>> will try the same angle more than once).
>>>
>>> It will then construct a list of good phase ranges (even ranges that cross
>>> 360/0), will pick the biggest range then it will set the sample_clk to the
>>> middle of that range.
>>>
>>> We do not touch ciu_drive (and by extension define default-drive-phase).
>>> Drive phase is mostly used to define minimum hold times, while one could
>>> write some code to determine what phase meets the minimum hold time (ex 10
>>> degrees) this will not work with the current clock phase framework (which
>>> floors angles, so we'll get 0 deg, and there's no way to know what
>>> resolution the floors happen at). We assume that the default drive angles
>>> set by the hardware are good enough.
>>>
>>> If a device has device specific code (like exynos) then that will still
>>> take precedence, otherwise this new code will execute. If the device wants
>>> to tune, but has no sample_clk defined we'll return EIO with an error
>>> message.
>>
>> Which point is "_generic_"? I don't find the code that control the register
>> relevant to CLK_DRV/SMPL PHASE. It seems that posted the similar patches at
>> u-boot mailing list..
>
> The "generic" part is that it uses the clk phase API for dw_mmc
> implementations where the clkgen controlling interface is outside the dw_mmc
> IP itself. So it's open for other implementations as well.
Designware IP also has the CLK phase register(UHS_REG_EXT register)...
if this code is related with it, it should be located into dw-mmc.c.
>
> But if you are more comfortable with it, I can also move it into the dw_mmc-
> rockchip variant for the time being, until another user comes along.
I think more better that this code is located into dw_mmc-rockchip. how about?
Best Regards,
Jaehoon Chung
>
>
> Heiko
>
>
next prev parent reply other threads:[~2015-09-16 2:30 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-31 18:23 [PATCH 0/8] mmc: dw_mmc: allow tuning using the clk-phase api Heiko Stuebner
2015-08-31 18:23 ` Heiko Stuebner
2015-08-31 18:23 ` [PATCH 1/8] clk: rockchip: Allow more precision for some mmc clock phases Heiko Stuebner
2015-08-31 18:23 ` Heiko Stuebner
2015-08-31 18:24 ` [PATCH 2/8] clk: rockchip: Make calculations use rounding Heiko Stuebner
2015-08-31 18:24 ` Heiko Stuebner
2015-08-31 18:24 ` [PATCH 3/8] mmc: core: Add mmc_regulator_set_vqmmc() Heiko Stuebner
2015-08-31 18:24 ` Heiko Stuebner
2015-08-31 18:24 ` Heiko Stuebner
2015-09-02 11:38 ` Ulf Hansson
2015-09-02 11:38 ` Ulf Hansson
2015-09-02 16:20 ` Doug Anderson
2015-09-02 16:20 ` Doug Anderson
2015-09-10 12:40 ` Ulf Hansson
2015-09-10 12:40 ` Ulf Hansson
2015-08-31 18:24 ` [PATCH 4/8] mmc: dw_mmc: Use mmc_regulator_set_vqmmc in start_signal_voltage_switch Heiko Stuebner
2015-08-31 18:24 ` Heiko Stuebner
2015-08-31 18:24 ` Heiko Stuebner
2015-08-31 18:24 ` [PATCH 5/8] mmc: dw_mmc: dt-binding: Add tuning related things Heiko Stuebner
2015-08-31 18:24 ` Heiko Stuebner
2015-08-31 18:24 ` Heiko Stuebner
2015-09-02 5:01 ` Jaehoon Chung
2015-09-02 5:01 ` Jaehoon Chung
2015-09-02 5:01 ` Jaehoon Chung
2015-09-02 7:41 ` Heiko Stuebner
2015-09-02 7:41 ` Heiko Stuebner
2015-09-02 7:41 ` Heiko Stuebner
2015-08-31 18:24 ` [PATCH 6/8] mmc: dw_mmc: Generic MMC tuning with the clock phase framework Heiko Stuebner
2015-08-31 18:24 ` Heiko Stuebner
2015-09-15 8:25 ` Jaehoon Chung
2015-09-15 8:25 ` Jaehoon Chung
2015-09-15 22:09 ` Heiko Stübner
2015-09-15 22:09 ` Heiko Stübner
2015-09-15 22:09 ` Heiko Stübner
2015-09-16 2:30 ` Jaehoon Chung [this message]
2015-09-16 2:30 ` Jaehoon Chung
2015-09-16 14:52 ` Heiko Stübner
2015-09-16 14:52 ` Heiko Stübner
2015-09-16 14:52 ` Heiko Stübner
2015-09-17 2:03 ` Jaehoon Chung
2015-09-17 2:03 ` Jaehoon Chung
2015-09-17 2:03 ` Jaehoon Chung
2015-08-31 18:24 ` [PATCH 7/8] ARM: dts: rockchip: Add drive/sample clocks for rk3288 dw_mmc devices Heiko Stuebner
2015-08-31 18:24 ` Heiko Stuebner
2015-08-31 18:24 ` [PATCH 8/8] ARM: dts: rockchip: add tuning related settings to veyron devices Heiko Stuebner
2015-08-31 18:24 ` Heiko Stuebner
2015-08-31 18:24 ` Heiko Stuebner
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=55F8D442.5020004@samsung.com \
--to=jh80.chung@samsung.com \
--cc=amstan@chromium.org \
--cc=cpgs@samsung.com \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
--cc=ulf.hansson@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 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.