lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 16 Oct 2017 09:49:33 +0200
From:   Matthias Brugger <matthias.bgg@...il.com>
To:     CK Hu <ck.hu@...iatek.com>,
        Chaotian Jing <chaotian.jing@...iatek.com>
Cc:     Ulf Hansson <ulf.hansson@...aro.org>,
        Mark Rutland <mark.rutland@....com>,
        devicetree@...r.kernel.org, srv_heupstream@...iatek.com,
        Catalin Marinas <catalin.marinas@....com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Will Deacon <will.deacon@....com>,
        linux-kernel@...r.kernel.org, yong mao <yong.mao@...iatek.com>,
        Phong LE <ple@...libre.com>, Rob Herring <robh+dt@...nel.org>,
        linux-mediatek@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-mmc@...r.kernel.org,
        Heiner Kallweit <hkallweit1@...il.com>
Subject: Re: [PATCH v5 02/12] mmc: mediatek: add support of mt2701/mt2712



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@...iatek.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ