public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthias Brugger <matthias.bgg@gmail.com>
To: CK Hu <ck.hu@mediatek.com>, Chaotian Jing <chaotian.jing@mediatek.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, srv_heupstream@mediatek.com,
	Catalin Marinas <catalin.marinas@arm.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Will Deacon <will.deacon@arm.com>,
	linux-kernel@vger.kernel.org, yong mao <yong.mao@mediatek.com>,
	Phong LE <ple@baylibre.com>, Rob Herring <robh+dt@kernel.org>,
	linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org,
	Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH v5 02/12] mmc: mediatek: add support of mt2701/mt2712
Date: Mon, 16 Oct 2017 09:49:33 +0200	[thread overview]
Message-ID: <a506506b-a326-6d54-9827-4fd82680700d@gmail.com> (raw)
In-Reply-To: <1508055978.8978.5.camel@mtksdaap41>



On 10/15/2017 10:26 AM, CK Hu wrote:
> Hi, Chaotian:
> 
> On Wed, 2017-10-11 at 10:41 +0800, Chaotian Jing wrote:
>> mt2701/mt2712 has 12bit clock div, which is not compatible with
>> mt8135/mt8173. and, some additional features will be added in
>> mt2701/mt2712, so that need distinguish it by comatibale name.
>>
>> Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
>> ---
>>   drivers/mmc/host/mtk-sd.c | 82 +++++++++++++++++++++++++++++++++++++++--------
>>   1 file changed, 69 insertions(+), 13 deletions(-)
>>
>> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
>> index 267f7ab..643c795 100644
>> --- a/drivers/mmc/host/mtk-sd.c
>> +++ b/drivers/mmc/host/mtk-sd.c
[...]
>> @@ -350,6 +358,31 @@ struct msdc_host {
>>   	struct msdc_tune_para saved_tune_para; /* tune result of CMD21/CMD19 */
>>   };
>>   
>> +static const struct mtk_mmc_compatible mt8135_compat = {
>> +	.clk_div_bits = 8,
>> +};
>> +
>> +static const struct mtk_mmc_compatible mt8173_compat = {
>> +	.clk_div_bits = 8,
>> +};
>> +
>> +static const struct mtk_mmc_compatible mt2701_compat = {
>> +	.clk_div_bits = 12,
>> +};
>> +
>> +static const struct mtk_mmc_compatible mt2712_compat = {
>> +	.clk_div_bits = 12,
>> +};
>> +
>> +static const struct of_device_id msdc_of_ids[] = {
>> +	{ .compatible = "mediatek,mt8135-mmc", .data = &mt8135_compat},
>> +	{ .compatible = "mediatek,mt8173-mmc", .data = &mt8173_compat},
> 
> Because mt8135_compat is equal to mt8173_compat, so I think the
> compatible of "mediatek,mt8173-mmc" is redundant. You could just keep
> compatible of "mediatek,mt8135-mmc" in driver, and use
> "mediatek,mt8135-mmc" for both mt8135.dtsi and mt8173.dtsi.
> 

Well thing is, that in the follow-up patches, new data types get added to the 
different compat structures and in the end all four a different.

>> +	{ .compatible = "mediatek,mt2701-mmc", .data = &mt2701_compat},
>> +	{ .compatible = "mediatek,mt2712-mmc", .data = &mt2712_compat},
> 
> Ditto.
> 

Same here.

Regards,
Matthias

  reply	other threads:[~2017-10-16  7:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11  2:41 [PATCH v5 00/13] mmc: mediatek: add support of mt2701/mt2712 Chaotian Jing
2017-10-11  2:41 ` [PATCH v5 01/12] mmc: dt-bindings: Add reg/source_cg/latch-ck for Mediatek MMC bindings Chaotian Jing
2017-10-13 21:50   ` Rob Herring
2017-10-14  2:12     ` Chaotian Jing
2017-10-11  2:41 ` [PATCH v5 02/12] mmc: mediatek: add support of mt2701/mt2712 Chaotian Jing
     [not found]   ` <1507689696-25928-3-git-send-email-chaotian.jing-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-10-15  8:26     ` CK Hu
2017-10-16  7:49       ` Matthias Brugger [this message]
     [not found]         ` <a506506b-a326-6d54-9827-4fd82680700d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-18  1:46           ` CK Hu
2017-10-18 10:00             ` Matthias Brugger
2017-10-11  2:41 ` [PATCH v5 04/12] mmc: mediatek: make hs400_tune_response only for mt8173 Chaotian Jing
2017-10-11  2:41 ` [PATCH v5 05/12] mmc: mediatek: add pad_tune0 support Chaotian Jing
2017-10-11  2:41 ` [PATCH v5 06/12] mmc: mediatek: add async fifo and data tune support Chaotian Jing
2017-10-11  2:41 ` [PATCH v5 07/12] mmc: mediatek: add busy_check support Chaotian Jing
2017-10-11  2:41 ` [PATCH v5 08/12] mmc: mediatek: add stop_clk fix and enhance_rx support Chaotian Jing
2017-10-11  2:41 ` [PATCH v5 09/12] mmc: mediatek: add support of source_cg clock Chaotian Jing
     [not found] ` <1507689696-25928-1-git-send-email-chaotian.jing-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-10-11  2:41   ` [PATCH v5 03/12] arm64: dts: mt8173: remove "mediatek, mt8135-mmc" from mmc nodes Chaotian Jing
2017-10-11  2:41   ` [PATCH v5 10/12] mmc: mediatek: add latch-ck support Chaotian Jing
2017-10-11  2:41 ` [PATCH v5 11/12] mmc: mediatek: improve eMMC hs400 mode read performance Chaotian Jing
2017-10-11  2:41 ` [PATCH v5 12/12] 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=a506506b-a326-6d54-9827-4fd82680700d@gmail.com \
    --to=matthias.bgg@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=chaotian.jing@mediatek.com \
    --cc=ck.hu@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hkallweit1@gmail.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