From: Ulf Hansson <ulf.hansson@linaro.org>
To: Bernd Edlinger <bernd.edlinger@hotmail.de>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Jaehoon Chung <jh80.chung@samsung.com>
Subject: Re: [PATCH] mmc: dw_mmc: Add support for multiple SD cards on one host interface
Date: Tue, 10 Oct 2017 09:59:35 +0200 [thread overview]
Message-ID: <CAPDyKFqwajTGCyexd8Bxj-jEtKJCDb3b8q1HqOrYoNAMSdevcg@mail.gmail.com> (raw)
In-Reply-To: <ed12bab0-1270-af10-0313-ad9e2f32173e@hotmail.de>
On 2 October 2017 at 16:31, Bernd Edlinger <bernd.edlinger@hotmail.de> wrote:
> On 10/02/17 09:12, Ulf Hansson wrote:
>> On 30 September 2017 at 17:39, Bernd Edlinger <bernd.edlinger@hotmail.de> wrote:
>>>
>>> Needs external logic to multiplex the clock signal,
>>> which is controlled by a GPIO output pin.
>>>
>>> Only the selected SD card receives the clock,
>>> while the other SD card's clock is forced to LOW.
>>> DATA and CMD lines can be connected to both SD cards.
>>>
>>> On warm-start UBOOT should use a sequence of
>>> CMD12 and CMD7 with RCA=0 to force any active SD card
>>> to stop transmission and release the DATA bus.
>>
>> I doubt that is sufficient to support multiple slots.
>>
>
> A hardware exists and AFAICT works as expected,
> with bus speeds up to 50 MHz.
> We have a use case with internal peripherals.
>
>> Sometimes the mmc core needs to perform a sequence of operations
>> towards *one* host/card and that must be done in guaranteed manner, to
>> that no other operations are performed for another card/host
>> in-between.
>>
>
> Could you please elaborate on this?
mmc_claim|release_host() is used by the core to get exclusive access
to the host and its controller.
That's needed for a several reasons, both good and bad. In the case I
am referring to, it's about running a sequence of operations as to
follow the MMC/SD/SDIO spec. The sequence may involve calling several
of the host ops callbacks (->set_ios() ->request() etc) in a row,
without having any other to interfere with the same host.
Now, because those host drivers that *tries* to support multiple
cards, registers one host per card slot, the above assumption from the
core falls apart. In other words, the core can no longer guarantee to
follow the specs.
>
>> Perhaps if you are lucky you may get something that is very fragile to
>> work, but in the end I think the core needs to play along. Moreover,
>> dw_mmc has recently removed its multiple slot support - simply because
>> the complexity wasn't worth it.
>>
>
> I was not overly happy to see this removed, when I re-based to current master :-(
Sorry, but the code has never worked. And because no one complained,
it for sure made sense to remove it.
Kind regards
Uffe
prev parent reply other threads:[~2017-10-10 7:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-30 15:39 [PATCH] mmc: dw_mmc: Add support for multiple SD cards on one host interface Bernd Edlinger
2017-10-02 7:12 ` Ulf Hansson
2017-10-02 14:31 ` Bernd Edlinger
2017-10-10 7:59 ` Ulf Hansson [this message]
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=CAPDyKFqwajTGCyexd8Bxj-jEtKJCDb3b8q1HqOrYoNAMSdevcg@mail.gmail.com \
--to=ulf.hansson@linaro.org \
--cc=bernd.edlinger@hotmail.de \
--cc=jh80.chung@samsung.com \
--cc=linux-mmc@vger.kernel.org \
/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).