tegra20: move SDRAM param save to later in boot
authorAllen Martin <amartin@nvidia.com>
Fri, 31 Aug 2012 08:30:11 +0000 (08:30 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 1 Sep 2012 12:58:22 +0000 (14:58 +0200)
Move warmboot_save_sdram_params() to later in the boot sequence.  This
code relies on devicetree to get the address of the memory controller
and with upcoming changes for SPL boot it gets called early in the
boot process when devicetree is not initialized yet.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/cpu/tegra20-common/ap20.c
board/nvidia/common/board.c

index 8b6afbcf57541c95d947029a41bb3e6a865e1423..6ff71e0b3bf7e6b2cf0c8d9609e78c8dbf0cd952 100644 (file)
@@ -345,11 +345,6 @@ void init_pmc_scratch(void)
        /* ODMDATA is for kernel use to determine RAM size, LP config, etc. */
        odmdata = get_odmdata();
        writel(odmdata, &pmc->pmc_scratch20);
-
-#ifdef CONFIG_TEGRA20_LP0
-       /* save Sdram params to PMC 2, 4, and 24 for WB0 */
-       warmboot_save_sdram_params();
-#endif
 }
 
 void tegra20_start(void)
index 6753f950f7520477a30a762c5e0c7001d128d274..7ab20408e862ffc87e732f5944e1e5b02be4adf4 100644 (file)
@@ -133,6 +133,9 @@ int board_init(void)
 #endif
 
 #ifdef CONFIG_TEGRA20_LP0
+       /* save Sdram params to PMC 2, 4, and 24 for WB0 */
+       warmboot_save_sdram_params();
+
        /* prepare the WB code to LP0 location */
        warmboot_prepare_code(TEGRA_LP0_ADDR, TEGRA_LP0_SIZE);
 #endif