public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V2 01/13] mmc: tegra: support Tegra124
@ 2014-01-24  0:42 Stephen Warren
  2014-01-24  0:42 ` [U-Boot] [PATCH V2 02/13] ARM: tegra: misc cleanups triggered by Tegra124 review Stephen Warren
                   ` (13 more replies)
  0 siblings, 14 replies; 23+ messages in thread
From: Stephen Warren @ 2014-01-24  0:42 UTC (permalink / raw)
  To: u-boot

From: Stephen Warren <swarren@nvidia.com>

Tegra124's MMC controller is very similar to earlier SoC generations,
and can be supported by the same driver.

However, there are some non-backwards-compatible HW differences, and
hence a new DT compatible value must be used to describe the HW. This
patch updates the driver to support that new compatible value.

That said, the HW differences are only relevant when enabling certain
high-performance transfer modes. Since the driver is currently very
simple and doesn't enable those modes, we don't actually need to address
any of these HW differences in the code yet, hence the simple nature of
this patch.

Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
v2: New patch.

This patch is needed for MMC support on Tegra124 at run-time, but not
strictly required at compile-time. So, it can either go into the MMC
tree and all get merged together in the main U-Boot repo, or the MMC
maintainer can ack it to go through the Tegra tree with the rest of
the changes.
---
 drivers/mmc/tegra_mmc.c | 9 +++++++++
 include/fdtdec.h        | 1 +
 lib/fdtdec.c            | 1 +
 3 files changed, 11 insertions(+)

diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
index e1817e24f6d4..3d1ce1263c82 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -668,6 +668,15 @@ void tegra_mmc_init(void)
 	const void *blob = gd->fdt_blob;
 	debug("%s entry\n", __func__);
 
+	/* See if any Tegra124 MMC controllers are present */
+	count = fdtdec_find_aliases_for_id(blob, "sdhci",
+		COMPAT_NVIDIA_TEGRA124_SDMMC, node_list, MAX_HOSTS);
+	debug("%s: count of Tegra124 sdhci nodes is %d\n", __func__, count);
+	if (process_nodes(blob, node_list, count)) {
+		printf("%s: Error processing T30 mmc node(s)!\n", __func__);
+		return;
+	}
+
 	/* See if any Tegra30 MMC controllers are present */
 	count = fdtdec_find_aliases_for_id(blob, "sdhci",
 		COMPAT_NVIDIA_TEGRA30_SDMMC, node_list, MAX_HOSTS);
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 433d6a7c0256..19bab7944817 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -59,6 +59,7 @@ enum fdt_compat_id {
 	COMPAT_NVIDIA_TEGRA20_NAND,	/* Tegra2 NAND controller */
 	COMPAT_NVIDIA_TEGRA20_PWM,	/* Tegra 2 PWM controller */
 	COMPAT_NVIDIA_TEGRA20_DC,	/* Tegra 2 Display controller */
+	COMPAT_NVIDIA_TEGRA124_SDMMC,	/* Tegra124 SDMMC controller */
 	COMPAT_NVIDIA_TEGRA30_SDMMC,	/* Tegra30 SDMMC controller */
 	COMPAT_NVIDIA_TEGRA20_SDMMC,	/* Tegra20 SDMMC controller */
 	COMPAT_NVIDIA_TEGRA20_SFLASH,	/* Tegra 2 SPI flash controller */
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 207314fa72fb..1fecab3fbc30 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -32,6 +32,7 @@ static const char * const compat_names[COMPAT_COUNT] = {
 	COMPAT(NVIDIA_TEGRA20_NAND, "nvidia,tegra20-nand"),
 	COMPAT(NVIDIA_TEGRA20_PWM, "nvidia,tegra20-pwm"),
 	COMPAT(NVIDIA_TEGRA20_DC, "nvidia,tegra20-dc"),
+	COMPAT(NVIDIA_TEGRA124_SDMMC, "nvidia,tegra124-sdhci"),
 	COMPAT(NVIDIA_TEGRA30_SDMMC, "nvidia,tegra30-sdhci"),
 	COMPAT(NVIDIA_TEGRA20_SDMMC, "nvidia,tegra20-sdhci"),
 	COMPAT(NVIDIA_TEGRA20_SFLASH, "nvidia,tegra20-sflash"),
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2014-01-27 16:49 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-24  0:42 [U-Boot] [PATCH V2 01/13] mmc: tegra: support Tegra124 Stephen Warren
2014-01-24  0:42 ` [U-Boot] [PATCH V2 02/13] ARM: tegra: misc cleanups triggered by Tegra124 review Stephen Warren
2014-01-24  0:42 ` [U-Boot] [PATCH V2 03/13] ARM: tegra: enable PLLX only once it's been fully configured Stephen Warren
2014-01-24  0:42 ` [U-Boot] [PATCH V2 04/13] ARM: tegra: remove a conditional for CSITE rate Stephen Warren
2014-01-24  0:42 ` [U-Boot] [PATCH V2 05/13] ARM: tegra: only build __pinmux_nand() when it's needed Stephen Warren
2014-01-24  0:42 ` [U-Boot] [PATCH V2 06/13] ARM: tegra: fix a typo in the tegra114.dtsi Stephen Warren
2014-01-24  0:42 ` [U-Boot] [PATCH V2 07/13] ARM: tegra: add/edit headers for Tegra124 Stephen Warren
2014-01-24 15:20   ` Thierry Reding
2014-01-24 17:46     ` Stephen Warren
2014-01-24 18:08     ` Stephen Warren
2014-01-24  0:42 ` [U-Boot] [PATCH V2 08/13] ARM: tegra: add SPL/AVP (arm720t) CPU files " Stephen Warren
2014-01-24 15:44   ` Thierry Reding
2014-01-24 17:47     ` Stephen Warren
2014-01-24 18:29     ` Stephen Warren
2014-01-24  0:42 ` [U-Boot] [PATCH V2 09/13] ARM: tegra: Add CPU (armv7) " Stephen Warren
2014-01-24  0:42 ` [U-Boot] [PATCH V2 10/13] ARM: tegra: add common (shared) CPU files Stephen Warren
2014-01-24  0:42 ` [U-Boot] [PATCH V2 11/13] ARM: tegra: add DT files for Tegra124 and Venice2 Stephen Warren
2014-01-24  0:42 ` [U-Boot] [PATCH V2 12/13] ARM: tegra: add Venice2 (Tegra124) board Stephen Warren
2014-01-24  0:43 ` [U-Boot] [PATCH V2 13/13] ARM: tegra: fix "bootp" issue for Tegra124 too Stephen Warren
2014-01-24  6:53   ` Jim Lin
2014-01-27 16:49     ` Stephen Warren
2014-01-24 13:56 ` [U-Boot] [PATCH V2 01/13] mmc: tegra: support Tegra124 Pantelis Antoniou
2014-01-24 16:10 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox