summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc8xxx/ddr/main.c
diff options
context:
space:
mode:
authorJames Yang <James.Yang@freescale.com>2013-01-07 14:01:03 +0000
committerAndy Fleming <afleming@freescale.com>2013-01-30 11:25:14 -0600
commite8ba6c503ffea6bcb7abba3638cc3f880d060504 (patch)
tree60272a38bef6d491951cd70e2ed914133e0d99bd /arch/powerpc/cpu/mpc8xxx/ddr/main.c
parent02a9ce7187bae8f4dafcc8201d85e12d073f8151 (diff)
powerpc/mpc8xxxx: FSL DDR debugger auto run of stored commands
This patch adds the ability for the FSL DDR interactive debugger to automatically run the sequence of commands stored in the ddr_interactive environment variable. Commands are separated using ';'. ddr_interactive=compute; edit c0 d0 dimmparms caslat_X 0x3FC0; go Signed-off-by: James Yang <James.Yang@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'arch/powerpc/cpu/mpc8xxx/ddr/main.c')
-rw-r--r--arch/powerpc/cpu/mpc8xxx/ddr/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/main.c b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
index a33c9e2fc0..5311a262a2 100644
--- a/arch/powerpc/cpu/mpc8xxx/ddr/main.c
+++ b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
@@ -532,10 +532,10 @@ phys_size_t fsl_ddr_sdram(void)
/* Compute it once normally. */
#ifdef CONFIG_FSL_DDR_INTERACTIVE
- if (getenv("ddr_interactive")) {
- total_memory = fsl_ddr_interactive(&info);
- } else if (tstc() && (getc() == 'd')) { /* we got a key press of 'd' */
- total_memory = fsl_ddr_interactive(&info);
+ if (tstc() && (getc() == 'd')) { /* we got a key press of 'd' */
+ total_memory = fsl_ddr_interactive(&info, 0);
+ } else if (fsl_ddr_interactive_env_var_exists()) {
+ total_memory = fsl_ddr_interactive(&info, 1);
} else
#endif
total_memory = fsl_ddr_compute(&info, STEP_GET_SPD, 0);