linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
To: Simon <horms@verge.net.au>, Chris Ball <cjb@laptop.org>
Cc: Magnus <magnus.damm@gmail.com>,
	Linux-SH <linux-sh@vger.kernel.org>,
	linux-mmc@vger.kernel.org
Subject: [PATCH 4/4] mmc: SDHI: updata sh_mobile_sdhi_of_data for r8a7790
Date: Mon, 27 Jan 2014 20:45:36 -0800 (PST)	[thread overview]
Message-ID: <87fvo890k4.wl%kuninori.morimoto.gx@gmail.com> (raw)
In-Reply-To: <87lhy090m0.wl%kuninori.morimoto.gx@gmail.com>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

This patch updates r8a7790 DT data to have SoC specific settings.
Latest Renesas Chip has some SDHI channels and the WP pin
availability depends on its channel or HW implementation.
Thus, this patch disables it as default,
but we can use wp-gpios property to enable it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm/boot/dts/r8a7790.dtsi    |    4 ----
 drivers/mmc/host/sh_mobile_sdhi.c |   10 +++++++++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index f48487c..df578cd 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -265,7 +265,6 @@
 		interrupt-parent = <&gic>;
 		interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks R8A7790_CLK_SDHI0>;
-		cap-sd-highspeed;
 		status = "disabled";
 	};
 
@@ -275,7 +274,6 @@
 		interrupt-parent = <&gic>;
 		interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks R8A7790_CLK_SDHI1>;
-		cap-sd-highspeed;
 		status = "disabled";
 	};
 
@@ -285,7 +283,6 @@
 		interrupt-parent = <&gic>;
 		interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks R8A7790_CLK_SDHI2>;
-		cap-sd-highspeed;
 		status = "disabled";
 	};
 
@@ -295,7 +292,6 @@
 		interrupt-parent = <&gic>;
 		interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks R8A7790_CLK_SDHI3>;
-		cap-sd-highspeed;
 		status = "disabled";
 	};
 
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index 322cd35..7498f5b 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -38,6 +38,7 @@
 struct sh_mobile_sdhi_of_data {
 	unsigned long tmio_flags;
 	unsigned long capabilities;
+	unsigned long capabilities2;
 };
 
 static const struct sh_mobile_sdhi_of_data sh_mobile_sdhi_of_cfg[] = {
@@ -51,6 +52,12 @@ static const struct sh_mobile_sdhi_of_data of_rcar_gen1_compatible = {
 	.capabilities	= MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
 };
 
+static const struct sh_mobile_sdhi_of_data of_rcar_gen2_compatible = {
+	.tmio_flags	= TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE,
+	.capabilities	= MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
+	.capabilities2	= MMC_CAP2_NO_MULTI_READ,
+};
+
 static const struct of_device_id sh_mobile_sdhi_of_match[] = {
 	{ .compatible = "renesas,sdhi-shmobile" },
 	{ .compatible = "renesas,sdhi-sh7372" },
@@ -59,7 +66,7 @@ static const struct of_device_id sh_mobile_sdhi_of_match[] = {
 	{ .compatible = "renesas,sdhi-r8a7740", .data = &sh_mobile_sdhi_of_cfg[0], },
 	{ .compatible = "renesas,sdhi-r8a7778", .data = &of_rcar_gen1_compatible, },
 	{ .compatible = "renesas,sdhi-r8a7779", .data = &of_rcar_gen1_compatible, },
-	{ .compatible = "renesas,sdhi-r8a7790", .data = &sh_mobile_sdhi_of_cfg[0], },
+	{ .compatible = "renesas,sdhi-r8a7790", .data = &of_rcar_gen2_compatible, },
 	{},
 };
 MODULE_DEVICE_TABLE(of, sh_mobile_sdhi_of_match);
@@ -219,6 +226,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
 		const struct sh_mobile_sdhi_of_data *of_data = of_id->data;
 		mmc_data->flags |= of_data->tmio_flags;
 		mmc_data->capabilities |= of_data->capabilities;
+		mmc_data->capabilities2 |= of_data->capabilities2;
 	}
 
 	/* SD control register space size is 0x100, 0x200 for bus_shift=1 */
-- 
1.7.9.5


  parent reply	other threads:[~2014-01-28  4:45 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28  4:44 mmc: sh_mobile_sdhi: DT update for R-Car Kuninori Morimoto
2014-01-28  4:45 ` [PATCH 1/4] mmc: SDHI: tidyup sh_mobile_sdhi_of_match position Kuninori Morimoto
2014-01-28  4:45 ` [PATCH 2/4] mmc: SDHI: updata sh_mobile_sdhi_of_data for r8a7778 Kuninori Morimoto
2014-01-28  4:45 ` [PATCH 3/4] mmc: SDHI: updata sh_mobile_sdhi_of_data for r8a7779 Kuninori Morimoto
2014-01-28  4:45 ` Kuninori Morimoto [this message]
2014-01-28 16:06 ` mmc: sh_mobile_sdhi: DT update for R-Car Sergei Shtylyov
2014-01-29  0:31   ` Kuninori Morimoto
2014-01-30  5:38 ` Kuninori Morimoto
2014-01-30  6:43   ` Simon Horman
2014-01-30  7:08     ` Kuninori Morimoto
2014-01-31  0:16       ` Simon Horman
2014-01-31  5:30 ` Kuninori Morimoto
2014-01-31  5:31   ` [PATCH 1/4] mmc: SDHI: tidyup sh_mobile_sdhi_of_match position Kuninori Morimoto
2014-01-31  5:31   ` [PATCH 2/4] mmc: SDHI: update sh_mobile_sdhi_of_data for r8a7778 Kuninori Morimoto
2014-01-31  5:32   ` [PATCH 3/4] mmc: SDHI: update sh_mobile_sdhi_of_data for r8a7779 Kuninori Morimoto
2014-01-31 12:46     ` Sergei Shtylyov
2014-01-31  5:32   ` [PATCH 4/4] mmc: SDHI: update sh_mobile_sdhi_of_data for r8a7790 Kuninori Morimoto
2014-02-03  6:41   ` mmc: sh_mobile_sdhi: DT update for R-Car Simon Horman
2014-02-12  5:35   ` [PATCH 5/4] mmc: SDHI: update sh_mobile_sdhi_of_data for r8a7791 Kuninori Morimoto
2014-02-12  8:38     ` Simon Horman
2014-02-12  9:47   ` mmc: sh_mobile_sdhi: DT update for R-Car Simon Horman
2014-02-12  9:50     ` Simon Horman
2014-01-31  5:36 ` Kuninori Morimoto
2014-01-31  5:36   ` [PATCH 1/3] ARM: shmobile: r8a7778: removed unnecessary mmc option Kuninori Morimoto
2014-01-31  5:36   ` [PATCH 2/3] ARM: shmobile: r8a7779: " Kuninori Morimoto
2014-01-31  5:36   ` [PATCH 3/3] ARM: shmobile: r8a7790: " Kuninori Morimoto
2014-02-03  6:34   ` mmc: sh_mobile_sdhi: DT update for R-Car Simon Horman
2014-01-31  5:39 ` [PATCH] ARM: shmobile: bockw: use wp-gpios instead of WP pin Kuninori Morimoto
2014-02-03  6:35   ` Simon Horman
2014-02-04  1:32     ` Kuninori Morimoto
2014-02-06  6:59       ` Simon Horman
2014-02-21  0:54 ` [PATCH 0/5][RESENT]mmc: sh_mobile_sdhi: DT update for R-Car Kuninori Morimoto
2014-02-21  0:54   ` [PATCH 1/5][RESENT] mmc: SDHI: tidyup sh_mobile_sdhi_of_match position Kuninori Morimoto
2014-02-21  0:54   ` [PATCH 2/5][RESENT] mmc: SDHI: update sh_mobile_sdhi_of_data for r8a7778 Kuninori Morimoto
2014-02-21  0:55   ` [PATCH 3/5][RESENT] mmc: SDHI: update sh_mobile_sdhi_of_data for r8a7779 Kuninori Morimoto
2014-02-21  0:55   ` [PATCH 4/5][RESENT] mmc: SDHI: update sh_mobile_sdhi_of_data for r8a7790 Kuninori Morimoto
2014-05-02 23:55     ` Sergei Shtylyov
2014-05-03 19:23       ` Magnus Damm
2014-05-03 21:30         ` Sergei Shtylyov
2014-05-04  8:01           ` Magnus Damm
2014-02-21  0:55   ` [PATCH 5/5][RESENT] mmc: SDHI: update sh_mobile_sdhi_of_data for r8a7791 Kuninori Morimoto
2014-02-21 12:36     ` Sergei Shtylyov
2014-02-22 18:08   ` [PATCH 0/5][RESENT]mmc: sh_mobile_sdhi: DT update for R-Car Chris Ball

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=87fvo890k4.wl%kuninori.morimoto.gx@gmail.com \
    --to=kuninori.morimoto.gx@gmail.com \
    --cc=cjb@laptop.org \
    --cc=horms@verge.net.au \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    /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).