devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, arc-linux-dev@synopsys.com,
	devicetree@vger.kernel.org, Vineet.Gupta1@synopsys.com,
	Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Subject: [PATCH 4/4] ARC: [axs101] STAR 9000799830: Fix SD cards support
Date: Thu, 14 May 2015 15:48:44 +0300	[thread overview]
Message-ID: <1431607724-9142-5-git-send-email-abrodkin@synopsys.com> (raw)
In-Reply-To: <1431607724-9142-1-git-send-email-abrodkin@synopsys.com>

As DW Mobile Storage databook says it's required to use "Hold Register"
if card is enumerated in SDR12 or SDR25 modes.
It means we need to act in the same way as in Altera's Socfpga
implementation - set "use hold reg" bit in commad.

Note that for upstream proper solution would be to remove
dw_mci_pltfm_prepare_command() at all and set the bit right in
dw_mci_prepare_command() for all platforms.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 arch/arc/boot/dts/axs10x_mb.dtsi | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
index 255c712..5d06f1f 100644
--- a/arch/arc/boot/dts/axs10x_mb.dtsi
+++ b/arch/arc/boot/dts/axs10x_mb.dtsi
@@ -77,8 +77,26 @@
 			interrupts = < 8 >;
 		};
 
+		/*
+		 * According to DW Mobile Storage databook it is required
+		 * to use  "Hold Register" if card is enumerated in SDR12 or
+		 * SDR25 modes.
+		 *
+		 * Utilization of "Hold Register" is already implemented via
+		 * dw_mci_pltfm_prepare_command() which in its turn gets
+		 * used through dw_mci_drv_data->prepare_command call-back.
+		 * This call-back is used in Altera Socfpga platform and so
+		 * we may reuse it saying that we're compatible with their
+		 * "altr,socfpga-dw-mshc".
+		 *
+		 * Most probably "Hold Register" utilization is platform-
+		 * independent requirement which means that single unified
+		 * "snps,dw-mshc" should be enough for all users of DW MMC once
+		 * dw_mci_pltfm_prepare_command() is used in generic platform
+		 * code.
+		 */
 		mmc@0x15000 {
-			compatible = "snps,dw-mshc";
+			compatible = "altr,socfpga-dw-mshc";
 			reg = < 0x15000 0x400 >;
 			num-slots = < 1 >;
 			fifo-depth = < 16 >;
-- 
2.1.0

  parent reply	other threads:[~2015-05-14 12:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 12:48 [PATCH 0/4] arc: add AXS101 board support Alexey Brodkin
2015-05-14 12:48 ` [PATCH 1/4] ARC: [axs101] Add support for AXS101 SDP (software development platform) Alexey Brodkin
2015-05-14 12:48 ` [PATCH 2/4] ARC: [axs101] support early 8250 uart Alexey Brodkin
2015-05-14 12:53   ` Arnd Bergmann
2015-05-14 13:04     ` Vineet Gupta
2015-06-05  5:02       ` Vineet Gupta
2015-06-05 13:01         ` console setting via stdout-path vs console=xxx (was Re: [PATCH 2/4] ARC: [axs101] support early 8250 uart) Vineet Gupta
2015-05-14 12:48 ` [PATCH 3/4] ARC: [axs101] Tweak DDR port aperture mappings for performance Alexey Brodkin
2015-05-14 12:48 ` Alexey Brodkin [this message]
2015-06-05 14:13 ` [PATCH 0/4] arc: add AXS101 board support Vineet Gupta

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=1431607724-9142-5-git-send-email-abrodkin@synopsys.com \
    --to=alexey.brodkin@synopsys.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=arc-linux-dev@synopsys.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@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).