devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	yong mao <yong.mao@mediatek.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Phong LE <ple@baylibre.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
Subject: Re: [PATCH v2 05/13] mmc: mediatek: make hs400_tune_response only for mt8173
Date: Mon, 9 Oct 2017 16:58:54 +0200	[thread overview]
Message-ID: <a01a245c-1e5b-74c7-9185-548cb0d8f183@gmail.com> (raw)
In-Reply-To: <1507548926-9555-6-git-send-email-chaotian.jing@mediatek.com>



On 10/09/2017 01:35 PM, Chaotian Jing wrote:
> the origin design of hs400_tune_response is for mt8173 because of
> mt8173 has a special design. for doing that, we add a new member
> "compatible", by now it's only for mt8173.
> 
> Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
> ---
>   drivers/mmc/host/mtk-sd.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index 643c795..e8f8ad9 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -317,6 +317,7 @@ struct msdc_delay_phase {
>   struct msdc_host {
>   	struct device *dev;
>   	const struct mtk_mmc_compatible *dev_comp;
> +	const char *compatible;
>   	struct mmc_host *mmc;	/* mmc structure */
>   	int cmd_rsp;
>   
> @@ -666,7 +667,8 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
>   		       host->base + PAD_CMD_TUNE);
>   	}
>   
> -	if (timing == MMC_TIMING_MMC_HS400)
> +	if (timing == MMC_TIMING_MMC_HS400 &&
> +	    !strcmp(host->compatible, "mediatek,mt8173-mmc"))

You can add another value to mtk_mmc_compatible as you did in all the following 
patches.

Regards,
Matthias

>   		sdr_set_field(host->base + PAD_CMD_TUNE,
>   			      MSDC_PAD_TUNE_CMDRRDLY,
>   			      host->hs400_cmd_int_delay);
> @@ -1594,7 +1596,8 @@ static int msdc_execute_tuning(struct mmc_host *mmc, u32 opcode)
>   	struct msdc_host *host = mmc_priv(mmc);
>   	int ret;
>   
> -	if (host->hs400_mode)
> +	if (host->hs400_mode &&
> +	    !strcmp(host->compatible, "mediatek,mt8173-mmc"))
>   		ret = hs400_tune_response(mmc, opcode);
>   	else
>   		ret = msdc_tune_response(mmc, opcode);
> @@ -1745,6 +1748,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
>   
>   	host->dev = &pdev->dev;
>   	host->dev_comp = of_id->data;
> +	host->compatible = of_id->compatible;
>   	host->mmc = mmc;
>   	host->src_clk_freq = clk_get_rate(host->src_clk);
>   	/* Set host parameters to mmc */
> 

  reply	other threads:[~2017-10-09 14:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09 11:35 [PATCH v2 00/13] mmc: mediatek: add support of mt2701/mt2712 Chaotian Jing
2017-10-09 11:35 ` [PATCH v2 02/13] " Chaotian Jing
2017-10-09 11:35 ` [PATCH v2 03/13] mmc: dt-bindings: make compatible explicit Chaotian Jing
2017-10-09 14:54   ` Matthias Brugger
     [not found]     ` <e4e5fa8b-b6a5-dc70-fbfc-6328493cd073-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-10  1:37       ` Chaotian Jing
2017-10-10  7:19         ` Ulf Hansson
2017-10-10  8:35           ` Matthias Brugger
2017-10-13 20:09           ` Rob Herring
2017-10-13 20:14   ` Rob Herring
2017-10-14  2:11     ` Chaotian Jing
     [not found] ` <1507548926-9555-1-git-send-email-chaotian.jing-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-10-09 11:35   ` [PATCH v2 01/13] mmc: dt-bindings: Add reg/source_cg/latch-ck for Mediatek MMC bindings Chaotian Jing
2017-10-09 14:53     ` Matthias Brugger
2017-10-09 11:35   ` [PATCH v2 04/13] arm64: dts: mt8173: remove "mediatek, mt8135-mmc" from mmc nodes Chaotian Jing
2017-10-09 11:35   ` [PATCH v2 07/13] mmc: mediatek: add async fifo and data tune support Chaotian Jing
2017-10-09 11:35   ` [PATCH v2 08/13] mmc: mediatek: add busy_check support Chaotian Jing
2017-10-09 11:35   ` [PATCH v2 09/13] mmc: mediatek: add stop_clk fix and enhance_rx support Chaotian Jing
     [not found]     ` <1507548926-9555-10-git-send-email-chaotian.jing-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-10-09 15:00       ` Matthias Brugger
2017-10-10  1:39         ` Chaotian Jing
2017-10-09 11:35 ` [PATCH v2 05/13] mmc: mediatek: make hs400_tune_response only for mt8173 Chaotian Jing
2017-10-09 14:58   ` Matthias Brugger [this message]
2017-10-10  1:39     ` Chaotian Jing
2017-10-09 11:35 ` [PATCH v2 06/13] mmc: mediatek: add pad_tune0 support Chaotian Jing
2017-10-09 11:35 ` [PATCH v2 10/13] mmc: mediatek: add support of source_cg clock Chaotian Jing
2017-10-09 11:35 ` [PATCH v2 11/13] mmc: mediatek: add latch-ck support Chaotian Jing
2017-10-09 11:35 ` [PATCH v2 12/13] mmc: mediatek: improve eMMC hs400 mode read performance Chaotian Jing
2017-10-09 11:35 ` [PATCH v2 13/13] mmc: mediatek: perfer to use rise edge latching for cmd line Chaotian Jing

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=a01a245c-1e5b-74c7-9185-548cb0d8f183@gmail.com \
    --to=matthias.bgg@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=chaotian.jing@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=javier@osg.samsung.com \
    --cc=linus.walleij@linaro.org \
    --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=ple@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=ulf.hansson@linaro.org \
    --cc=will.deacon@arm.com \
    --cc=yong.mao@mediatek.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;
as well as URLs for NNTP newsgroup(s).