All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Peter Guo <peter.guo@bayhubtech.com>,
	Alex Ballas <alex@ballas.org>,
	"adam8157@gmail.com" <adam8157@gmail.com>,
	"linux-mmc@VGER.KERNEL.ORG" <linux-mmc@vger.kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>
Subject: Re: 1217:8520 [Dell Latitude E7450] O2 Micro, SD/MMC Card Reader doesn't work
Date: Wed, 23 Dec 2015 11:13:52 +0000	[thread overview]
Message-ID: <20151223111352.GR8644@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAPDyKFqMPfrTdF4JNU-QUBN-va+Xk0EAqHysQ_HpKkmMfQzQNg@mail.gmail.com>

On Tue, Dec 22, 2015 at 09:30:00AM +0100, Ulf Hansson wrote:
> This quirk seems a bit strange. It looks like a generic problem being
> solved by the wrong approach. Although, my knowledge of sdhci HW is
> limited so I might be wrong.
> 
> Why doesn't sdhci *always* reset the related registers when the
> command or data transfer gets *completed*? Instead as currently,
> delaying that until the *next* request is started and via using
> SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD?

That would be additional overhead.  The real problem is that the tuning
paths compete with the normal request paths over how to set the registers.
This competition needs to be killed, and a saner structure for dealing
with requests and tuning commands needs to be created.

This is something I'm working on as I get time: I'm restructuring
sdhci_send_command() with the aim of getting to the point where the
tuning code is _not_ writing to any registers at all, and that's all
handled by code common to both paths.

> Sdhci's sdhci_execute_tuning() function must be converted to use
> mmc_send_tuning().

That will make the request path more complex, because we then need to
detect the tuning commands and have special handling for them.  With
SDHCI, they are not a standard data transfer command, which is what
mmc_send_tuning() wants.

This means we end up with more complexity in what is supposed to be a
fast path, which means more room for bugs to creep in.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  parent reply	other threads:[~2015-12-23 11:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-12 14:04 1217:8520 [Dell Latitude E7450] O2 Micro, SD/MMC Card Reader doesn't work Alex Ballas
2015-12-16  3:42 ` Peter Guo
2015-12-16  9:48   ` Alex Ballas
2015-12-18  3:14     ` Peter Guo
2015-12-18  8:51       ` Ulf Hansson
2015-12-18  9:39         ` Peter Guo
2015-12-18 10:43           ` Alex Ballas
2015-12-18 22:55             ` Alex Ballas
2015-12-22  3:24               ` Peter Guo
2015-12-22  8:30                 ` Ulf Hansson
2015-12-23  6:39                   ` Peter Guo
2015-12-23 14:24                     ` Wan ZongShun
2015-12-23 11:13                   ` Russell King - ARM Linux [this message]
2015-12-28 11:47                     ` Ulf Hansson
2016-01-02 12:50                       ` Russell King - ARM Linux

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=20151223111352.GR8644@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=adam8157@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=alex@ballas.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=peter.guo@bayhubtech.com \
    --cc=ulf.hansson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.