mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@rock-chips.com>
To: Adrian Hunter <adrian.hunter@intel.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: Michal Simek <michal.simek@xilinx.com>,
	soren.brinkmann@xilinx.com, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Shawn Lin <shawn.lin@rock-chips.com>
Subject: [RFC PATCH 0/4] Add enhanced strobe support for emmc version 5.1 or later
Date: Thu,  3 Mar 2016 10:35:57 +0800	[thread overview]
Message-ID: <1456972557-7994-1-git-send-email-shawn.lin@rock-chips.com> (raw)


Hello Ulf and Adrian,

This RFC patch is going to support enhanced strobe function
for emmc version 5.1+ introduced by JEDEC recently.

Firstly,from the former discussion of sdhci, I write these code
inspired by Adrian's patch[0] for variant drivers to overwrite the
callback in order not to add new callback into sdhci. And enchanced
strobe is a optional function, so we add a new cap* for drivers to
decide whether to use it.

1. History
   When introduing hs400 mode, JEDEC asks controllers to use data strobe line
to latch the data from emmc devives. But for cmd-reponse, not mentioned yet.
Since emmc version 5.1 published, JEDEC adds enhanced strobe function to deal
with cmd-response the same way as dara-read. This feature is optional.

2. Current situation
   I can't find a upstreamed controller claimed to support it, as well as the
mmc stack. But my "arasan,sdhci-5.1" actially supports this function. So I decide
to work for this part.

3. About the code
   1)This patchset is taken from Yi Sun's patch[1], but after reviewing the details
and applying to test, I find some problems. We ask devices to switch to enhanced
strobe mode, but we don't notify drivers to enable enhanced strobe mode. And we can't
force controller to use enhanced strobe even if devices claims to support it. So I
rework most of the code and take over the ownership from Yi Sun(If any objections
here, please let know).
   2)By looking into the SDHCI spec, I find there isn't any registers to enable the
enhanced strobe function. But from my "arasan,sdhci-5.1" databook, it describes a
register called VENDOR_REGISTER(0x78) to trigger this mode. So I guess other sdhci
variant drivers may also need s vendor specific register to deal with it.

4. Howto
   If we are sure that our controller supports enhanced strobe mode, just add
cap-enhanced-strobe in DT. Once emmc devices claims to support this mode,
we enable it automatically. Of course, other sdhci*/non-sdhci drivers should
implement/overwrite the prepare_enhanced_strobe by themselves. I believe all of the
platforms which need to support this mode should do some basic preparation for their
controllers.

Reference:
[0]: https://patchwork.kernel.org/patch/8262231/
[1]: https://patchwork.kernel.org/patch/6545421/



Shawn Lin (4):
  mmc: core: add cap-enhanced-strobe support
  mmc: core: implement enhanced strobe support
  mmc: sdhci: implement enhanced strobe callback
  mmc: sdhci-of-arasan: overwrite enhanced strobe callback

 Documentation/devicetree/bindings/mmc/mmc.txt |  1 +
 drivers/mmc/core/host.c                       |  2 +
 drivers/mmc/core/mmc.c                        | 54 ++++++++++++++++++++++++++-
 drivers/mmc/host/sdhci-of-arasan.c            | 20 ++++++++++
 drivers/mmc/host/sdhci.c                      | 11 ++++++
 include/linux/mmc/card.h                      |  1 +
 include/linux/mmc/host.h                      |  8 ++++
 include/linux/mmc/mmc.h                       |  2 +
 8 files changed, 98 insertions(+), 1 deletion(-)

-- 
2.3.7

             reply	other threads:[~2016-03-03  2:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03  2:35 Shawn Lin [this message]
2016-03-03  2:36 ` [RFC PATCH 1/4] mmc: core: add cap-enhanced-strobe support Shawn Lin
2016-03-03 12:08   ` Jaehoon Chung
2016-03-04  1:39     ` Shawn Lin
2016-03-03  2:36 ` [RFC PATCH 2/4] mmc: core: implement enhanced strobe support Shawn Lin
2016-03-03 13:37   ` Adrian Hunter
2016-03-04  2:00     ` Shawn Lin
2016-03-03  2:36 ` [RFC PATCH 3/4] mmc: sdhci: implement enhanced strobe callback Shawn Lin
2016-03-03  2:36 ` [RFC PATCH 4/4] mmc: sdhci-of-arasan: overwrite " Shawn Lin
2016-03-03 11:02   ` Michal Simek
2016-03-03 11:37     ` Shawn Lin

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=1456972557-7994-1-git-send-email-shawn.lin@rock-chips.com \
    --to=shawn.lin@rock-chips.com \
    --cc=adrian.hunter@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=soren.brinkmann@xilinx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®