]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/cpu/mpc8xxx/ddr/main.c
Merge branch 'master' of git://git.denx.de/u-boot
[u-boot] / arch / powerpc / cpu / mpc8xxx / ddr / main.c
index 2885906e875c6498136f9c6be35c9d1d38193655..5311a262a2990ef8b52386f89a03b451772f5c26 100644 (file)
@@ -77,7 +77,19 @@ static void __get_spd(generic_spd_eeprom_t *spd, u8 i2c_address)
                                sizeof(generic_spd_eeprom_t));
 
        if (ret) {
-               printf("DDR: failed to read SPD from address %u\n", i2c_address);
+               if (i2c_address ==
+#ifdef SPD_EEPROM_ADDRESS
+                               SPD_EEPROM_ADDRESS
+#elif defined(SPD_EEPROM_ADDRESS1)
+                               SPD_EEPROM_ADDRESS1
+#endif
+                               ) {
+                       printf("DDR: failed to read SPD from address %u\n",
+                               i2c_address);
+               } else {
+                       debug("DDR: failed to read SPD from address %u\n",
+                               i2c_address);
+               }
                memset(spd, 0, sizeof(generic_spd_eeprom_t));
        }
 }
@@ -520,9 +532,11 @@ 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, 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);