From: Matthias Brugger <matthias.bgg@gmail.com>
To: Chaotian Jing <chaotian.jing@mediatek.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Ryder Lee <ryder.lee@mediatek.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Sean Wang <sean.wang@mediatek.com>,
linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
srv_heupstream@mediatek.com, jjian.zhou@mediatek.com,
wenbin.mei@mediatek.com
Subject: Re: [PATCH 6/6] mmc: mediatek: drop too much code of tuning method
Date: Fri, 19 Oct 2018 10:54:21 +0200 [thread overview]
Message-ID: <513726cb-79e8-ca4d-e887-bf63c833260b@gmail.com> (raw)
In-Reply-To: <1539415250-32337-7-git-send-email-chaotian.jing@mediatek.com>
On 13/10/2018 09:20, Chaotian Jing wrote:
> the tuning code is becoming more and more bloated, let's make the
> set cmd/data delay to inline function to avoid too much redundant code.
>
> Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
> ---
> drivers/mmc/host/mtk-sd.c | 133 +++++++++++++---------------------------------
> 1 file changed, 38 insertions(+), 95 deletions(-)
>
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
[...]> @@ -1923,17 +1898,8 @@ static int msdc_tune_together(struct mmc_host
*mmc, u32 opcode)
> sdr_clr_bits(host->base + MSDC_IOCON,
> MSDC_IOCON_DSPL | MSDC_IOCON_W_DSPL);
> for (i = 0 ; i < PAD_DELAY_MAX; i++) {
> - if (host->top_base) {
> - sdr_set_field(host->top_base + EMMC_TOP_CMD,
> - PAD_CMD_RXDLY, i);
> - sdr_set_field(host->top_base + EMMC_TOP_CONTROL,
> - PAD_DAT_RD_RXDLY, i);
> - } else {
> - sdr_set_field(host->base + tune_reg,
> - MSDC_PAD_TUNE_CMDRDLY, i);
> - sdr_set_field(host->base + tune_reg,
> - MSDC_PAD_TUNE_DATRRDLY, i);
> - }
> + msdc_set_cmd_delay(host, i);
> + msdc_set_data_delay(host, i);
Put the clean-up before introducing msdc_tune_together, that makes the series
much easier to read.
Thanks,
Matthias
next prev parent reply other threads:[~2018-10-19 8:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-13 7:20 mmc: mediatek: add MT8183 MMC driver support Chaotian Jing
2018-10-13 7:20 ` [PATCH 1/6] mmc: dt-bindings: add support for MT8183 SoC Chaotian Jing
2018-10-13 7:20 ` [PATCH 2/6] mmc: mediatek: fill the actual clock for mmc debugfs Chaotian Jing
2018-10-13 7:20 ` [PATCH 3/6] mmc: mediatek: fix cannot receive new request when msdc_cmd_is_ready fail Chaotian Jing
2018-10-13 7:20 ` [PATCH 4/6] mmc: mediatek: tune CMD/DATA together Chaotian Jing
2018-10-19 8:46 ` Matthias Brugger
2018-10-13 7:20 ` [PATCH 5/6] mmc: mediatek: add MT8183 MMC driver support Chaotian Jing
2018-10-19 9:04 ` Matthias Brugger
2018-10-13 7:20 ` [PATCH 6/6] mmc: mediatek: drop too much code of tuning method Chaotian Jing
2018-10-19 8:54 ` Matthias Brugger [this message]
2018-10-15 13:15 ` mmc: mediatek: add MT8183 MMC driver support Ulf Hansson
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=513726cb-79e8-ca4d-e887-bf63c833260b@gmail.com \
--to=matthias.bgg@gmail.com \
--cc=chaotian.jing@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=jjian.zhou@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=srv_heupstream@mediatek.com \
--cc=ulf.hansson@linaro.org \
--cc=wenbin.mei@mediatek.com \
--cc=wsa+renesas@sang-engineering.com \
/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