From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752071AbdJTOGP (ORCPT ); Fri, 20 Oct 2017 10:06:15 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:30050 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493AbdJTOGL (ORCPT ); Fri, 20 Oct 2017 10:06:11 -0400 X-AuditID: b6c32a45-d3bff70000001088-a5-59ea02d0fc02 Subject: Re: [PATCH 0/9] Enable dw-mmc multi-card support To: Liming Sun , Shawn Lin Cc: Ulf Hansson , Rob Herring , Mark Rutland , Kukjin Kim , Krzysztof Kozlowski , "linux-mmc@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-samsung-soc@vger.kernel.org" , Chris Metcalf From: Jaehoon Chung Message-id: Date: Fri, 20 Oct 2017 23:06:07 +0900 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset="utf-8" Content-language: en-US Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA02SfUgTcRjH+93dblNaXFPrh5nKhYGRazvfbqFRaHFQgVCkFrWO+Usl98Ju avaPVmi2Cq1V1oqUUiqbvViWVFqpsTTwhUQtxP7Qhi9pYm9qim07A//73PN8v/f8vg+PDFc8 IANlmQYLMhv4LJr0JZ41h7MRndhoqurUSAg7UaJky1vaJWzJ4BjOdnQ8krK1gz0S9uOLGyTb slAC2KsdjRhbsTCKsVW9XRhb2NAiZfuHHkpYZ03yVjnnuOkAXG31GZLr73lFck8q8zlXWTPG zdtfE9yP2uAk6X4Ul4H4NGQORQadMS3TkB5P79yjTdBGx6jUEWoNG0uHGng9iqcTdyVF7MjM cr+VDs3hs7LdpSReEOhNW+LMxmwLCs0wCpZ4+oBazSjVq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0xlBipgFtrNIvOmYxA7RMZlJYtuV7WwgVWwCOhLbvx1nArF5 Bewknq45BWazCKhK/Fh0nB3EFhUIk+hv/ssMUSMo8WPyPaANHBycAvES208LgJjMAuoSU6bk glQwC4hLNLfeZIGw5SU2r3nLPIFRYBaS5lkIHbOQdMxC0rGAkWUVo2RqQXFuem6xUYFRXmq5 XnFibnFpXrpecn7uJkZgPG07rNW/g/HxkvhDjAIcjEo8vBHnXkQKsSaWFVfmHmKU4GBWEuFN /vMyUog3JbGyKrUoP76oNCe1+BCjNAeLkjgvf/6xSCGB9MSS1OzU1ILUIpgsEwenVANjYPm5 11be7K7fUx66lO7l22/qv+q+2edvLt8jJVq631+vD3gVbhG9f/an03Osbp2PCH4aqFXoImM1 XbR34Rbn1xWH1q6/u8X9Vo/15ss6n0IuLzt4ehrP/Lw9HELT2PWOdG26oXD6CJNF8S3Vys0i nqdrhGW8c1bwd9enuGcr9SptOMn+bc4WJZbijERDLeai4kQAALuAxKMCAAA= X-CMS-MailID: 20171020140607epcas2p1a248cb287bc8c72cac00759df12e23b8 X-Msg-Generator: CA X-Sender-IP: 182.195.42.143 X-Local-Sender: =?UTF-8?B?7KCV7J6s7ZuIG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbU2VuaW9yIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?SmFlaG9vbiBDaHVuZxtUaXplbiBQbGF0Zm9ybSBMYWIuG1Nh?= =?UTF-8?B?bXN1bmcgRWxlY3Ryb25pY3MbU2VuaW9yIEVuZ2luZWVy?= X-Sender-Code: =?UTF-8?B?QzEwG1RFTEUbQzEwVjgxMTE=?= CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20171017155217epcas3p4de2f27b921ce77234a2d3e46e4b17473 X-RootMTR: 20171017155217epcas3p4de2f27b921ce77234a2d3e46e4b17473 References: <8e433531-8f67-d575-635e-c6ced29f6804@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry for late this.. On 10/18/2017 12:52 AM, Liming Sun wrote: >>> Hrm.... it's so unlucky that your patchset comes a little late. As your patch 8 and 9 said, you need them to fix problem for multi-card support, so definitely there was no such use case, and even the code was buggy to support it right? That makes the code hard to read and maintain, so we decide to remove it. > > Thanks for the feedback. Yes, earlier the multi-card support was buggy indeed. We spent some time to debug it and got it working. > >>> Havn'e check the databook for details yet, but I think it's ok to re-introduce multi-slot support if a real user benefits from it. But you need a new patch to silent the log "num-slots property not found, assuming 1 slot is available" as we removed all the num-slots from DT at that time. > > The " num-slots property not found..." log message has already been removed by 8a629d26f back in 2016. Looks like we're good on this one. In dw_mci_probe (), it has code to check pdata->num_slots. If 0, the host->num_slots will be set to 1. So the logic of setting default num_slots seems already there. But correct me if I am wrong. > > Thanks, > Liming > > -----Original Message----- > From: Shawn Lin [mailto:shawn.lin@rock-chips.com] > Sent: Monday, October 16, 2017 9:36 PM > To: Liming Sun ; Jaehoon Chung > Cc: Ulf Hansson ; Rob Herring ; Mark Rutland ; Kukjin Kim ; Krzysztof Kozlowski ; shawn.lin@rock-chips.com; linux-mmc@vger.kernel.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org > Subject: Re: [PATCH 0/9] Enable dw-mmc multi-card support > > > On 2017/10/7 3:21, Liming Sun wrote: >> This series of commits enables the multi-card support for the dw-mmc >> controller. It includes two parts as below. >> >> The first part (patches 1-7) reverts the series of recent commits that >> removed the multi-card support with comments saying there was no such >> use case in the real world. Actually this feature is being used in >> Mellanox Bluefield SoC and has been requested by customers. > > Hrm.... it's so unlucky that your patchset comes a little late. As your patch 8 and 9 said, you need them to fix problem for multi-card support, so definitely there was no such use case, and even the code was buggy to support it right? That makes the code hard to read and maintain, so we decide to remove it. Hmm.. Well, if i missed your reply for my removing patch, it's my fault..but i didn't see any reply.. At that time, we didn't see any usage and also now... Are there any patches for using multi slot? e,g) device-tree file or your own driver If there are big benefits to revert them, i don't want to back them..during almost 6 years, never use it.. > >> >> The second part (patches 8-9) fixes the DesignWare multi-card support >> according to the dw-mmc databook (synnopsys: DesignWare Cores Mobile >> Storage Host Databook, 2.70a). It has changes to set the card number >> into the CMD register to multiplex requests to different cards when >> working in SD_MMC_CEATA mode, set the CTYPE / CLKENA / CDTHRCTL >> registers properly according to the spec, and parse the per-card >> configuration to match the Linux Documentation >> (bindings/mmc/synopsys-dw-mshc.txt). the second part seems that it's only support since v2.70a..? > > Havn'e check the databook for details yet, but I think it's ok to re-introduce multi-slot support if a real user benefits from it. But you need a new patch to silent the log "num-slots property not found, assuming 1 slot is available" as we removed all the num-slots from DT at that time. > > >> >> Liming Sun (9): >> Revert "Documentation: dw-mshc: deprecate num-slots" >> Revert "mmc: dw_mmc: remove the unnecessary slot variable" >> Revert "mmc: dw_mmc: use the 'slot' instead of 'cur_slot'" >> Revert "mmc: dw_mmc: remove the 'id' arguments about functions >> relevant to slot" >> Revert "mmc: dw_mmc: change the array of slots" >> Revert "mmc: dw_mmc: remove the loop about finding slots" >> Revert "mmc: dw_mmc: deprecated the "num-slots" property" >> mmc: dw_mmc: Support two SD_MMC_CE-ATA cards >> mmc: dw_mmc: Parse slot-specific configuration >> >> .../devicetree/bindings/mmc/synopsys-dw-mshc.txt | 16 +- >> drivers/mmc/host/dw_mmc-exynos.c | 4 +- >> drivers/mmc/host/dw_mmc.c | 277 ++++++++++++++++----- >> drivers/mmc/host/dw_mmc.h | 17 +- >> 4 files changed, 236 insertions(+), 78 deletions(-) >> > > > >