diff mbox

[U-Boot,4/4] Tegra114: MMC: Enable DT MMC driver support for Tegra114 Dalmore boards

Message ID 1363105031-30296-5-git-send-email-twarren@nvidia.com
State Superseded
Delegated to: Tom Warren
Headers show

Commit Message

Tom Warren March 12, 2013, 4:17 p.m. UTC
Tested on my Dalmore E1611 board, eMMC and SD-Card work fine, can load
a kernel off of an SD card OK, card detect works, and the env is now
stored in eMMC (end of the 2nd 'boot' sector, same as Tegra20/30).

Signed-off-by: Tom Warren <twarren@nvidia.com>
---
 include/configs/dalmore.h |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

Comments

Stephen Warren March 12, 2013, 5:56 p.m. UTC | #1
On 03/12/2013 10:17 AM, Tom Warren wrote:
> Tested on my Dalmore E1611 board, eMMC and SD-Card work fine, can load
> a kernel off of an SD card OK, card detect works, and the env is now
> stored in eMMC (end of the 2nd 'boot' sector, same as Tegra20/30).

> diff --git a/include/configs/dalmore.h b/include/configs/dalmore.h

> +/* Environment in eMMC, at the end of 2nd "boot sector" */
> +#define CONFIG_ENV_IS_IN_MMC
> +#define CONFIG_ENV_OFFSET		((512 * 1024) - CONFIG_ENV_SIZE)
> +#define CONFIG_SYS_MMC_ENV_DEV		0
> +#define CONFIG_SYS_MMC_ENV_PART		2

I believe that Dalmore's eMMC "boot" sectors are 4MiB in size, so that'd
want to be (4096 - 512) * 1024) - CONFIG_ENV_SIZE. At least, that's what
"mmcinfo" told me when running our downstream U-Boot on my Dalmore.

Aside from the comments I've made, the series,
Reviewed-by: Stephen Warren <swarren@nvidia.com>
diff mbox

Patch

diff --git a/include/configs/dalmore.h b/include/configs/dalmore.h
index b1a6e34..afce56a 100644
--- a/include/configs/dalmore.h
+++ b/include/configs/dalmore.h
@@ -50,7 +50,17 @@ 
 #define CONFIG_SYS_I2C_SPEED		100000
 #define CONFIG_CMD_I2C
 
-#define CONFIG_ENV_IS_NOWHERE
+/* SD/MMC */
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_TEGRA_MMC
+#define CONFIG_CMD_MMC
+
+/* Environment in eMMC, at the end of 2nd "boot sector" */
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_ENV_OFFSET		((512 * 1024) - CONFIG_ENV_SIZE)
+#define CONFIG_SYS_MMC_ENV_DEV		0
+#define CONFIG_SYS_MMC_ENV_PART		2
 
 #define MACH_TYPE_DALMORE	4304	/* not yet in mach-types.h */