Patchwork [U-Boot,v3,16/23] tegra: Setup PMC scratch info from ap20 setup

login
register
mail settings
Submitter Simon Glass
Date April 2, 2012, 11:18 p.m.
Message ID <1333408743-28720-17-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/150294/
State Accepted, archived
Headers show

Comments

Simon Glass - April 2, 2012, 11:18 p.m.
From: Yen Lin <yelin@nvidia.com>

Save SDRAM parameters into the warmboot scratch registers

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/arm/cpu/armv7/tegra2/ap20.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
Yen Lin - April 3, 2012, 6:57 p.m.
On Mon, 2012-04-02 at 16:18 -0700, Simon Glass wrote:
> From: Yen Lin <yelin@nvidia.com>
> 
> Save SDRAM parameters into the warmboot scratch registers
> 

Signed-off-by: Yen Lin <yelin@nvidia.com>

> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 



-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

Patch

diff --git a/arch/arm/cpu/armv7/tegra2/ap20.c b/arch/arm/cpu/armv7/tegra2/ap20.c
index 150fbfd..698bfd0 100644
--- a/arch/arm/cpu/armv7/tegra2/ap20.c
+++ b/arch/arm/cpu/armv7/tegra2/ap20.c
@@ -31,6 +31,7 @@ 
 #include <asm/arch/pmc.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/scu.h>
+#include <asm/arch/warmboot.h>
 #include <common.h>
 
 int tegra_get_chip_type(void)
@@ -322,6 +323,11 @@  void init_pmc_scratch(void)
 
 	/* ODMDATA is for kernel use to determine RAM size, LP config, etc. */
 	writel(CONFIG_SYS_BOARD_ODMDATA, &pmc->pmc_scratch20);
+
+#ifdef CONFIG_TEGRA2_LP0
+	/* save Sdram params to PMC 2, 4, and 24 for WB0 */
+	warmboot_save_sdram_params();
+#endif
 }
 
 void tegra2_start(void)