powerpc/mpc85xx: Display a warning for unsupported DDR data rates
authorYork Sun <yorksun@freescale.com>
Mon, 27 Jun 2011 20:30:55 +0000 (13:30 -0700)
committerKumar Gala <galak@kernel.crashing.org>
Mon, 11 Jul 2011 18:24:20 +0000 (13:24 -0500)
If DDR initialziation uses a speed table and the speed is not matched,
print a warning message instead of silently ignoring.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
board/freescale/corenet_ds/ddr.c
board/freescale/mpc8572ds/ddr.c
board/freescale/mpc8641hpcn/ddr.c
board/freescale/p2020ds/ddr.c
board/xes/xpedite550x/ddr.c

index f2b716d4ae1dce6eac26f0153140150efce72677..a184592e57cd87410dc9d70dee5b4284983dccae 100644 (file)
@@ -192,10 +192,16 @@ void fsl_ddr_board_options(memctl_options_t *popts,
                        popts->clk_adjust = pbsp->clk_adjust;
                        popts->wrlvl_start = pbsp->wrlvl_start;
                        popts->twoT_en = pbsp->force_2T;
+                       break;
                }
                pbsp++;
        }
 
+       if (i == num_params) {
+               printf("Warning: board specific timing not found "
+                       "for data rate %lu MT/s!\n", ddr_freq);
+       }
+
        /*
         * Factors to consider for half-strength driver enable:
         *      - number of DIMMs installed
index ab471afb977b6cf937ff71a9dab3cc69ae235afa..adcbd58545e78589e8e060d2e317b5b25315689e 100644 (file)
@@ -104,7 +104,6 @@ void fsl_ddr_board_options(memctl_options_t *popts,
        u32 num_params;
        u32 i;
        ulong ddr_freq;
-       int matched = 0;
 
        if (!pdimm->n_ranks)
                return;
@@ -151,14 +150,15 @@ void fsl_ddr_board_options(memctl_options_t *popts,
                        popts->cpo_override = pbsp->cpo;
                        popts->write_data_delay = pbsp->write_data_delay;
                        popts->twoT_en = pbsp->force_2T;
-                       matched = 1;
                        break;
                }
                pbsp++;
        }
 
-       if (!matched)
-               printf("Warning: board specific timing not found!\n");
+       if (i == num_params) {
+               printf("Warning: board specific timing not found "
+                       "for data rate %lu MT/s!\n", ddr_freq);
+       }
 
        /*
         * Factors to consider for half-strength driver enable:
index bd0b299d0b40175abc886e5eea6e8d687f147917..4f2e853cd154e9bbb3137a5366faf6e4b5d6ea5b 100644 (file)
@@ -127,6 +127,11 @@ void fsl_ddr_board_options(memctl_options_t *popts,
                }
        }
 
+       if (i == num_params) {
+               printf("Warning: board specific timing not found "
+                       "for data rate %lu MT/s!\n", ddr_freq);
+       }
+
        /* 2T timing enable */
        popts->twoT_en = 1;
 }
index 9bf7d2f587ad80870cc5ad2c8ef444ef8d81f8a6..926fd19271ef11a1c5b0859ca51a28abace7e96a 100644 (file)
@@ -83,10 +83,16 @@ void fsl_ddr_board_options(memctl_options_t *popts,
                        popts->cpo_override = pbsp->cpo;
                        popts->write_data_delay = pbsp->write_data_delay;
                        popts->twoT_en = pbsp->force_2T;
+                       break;
                }
                pbsp++;
        }
 
+       if (i == num_params) {
+               printf("Warning: board specific timing not found "
+                       "for data rate %lu MT/s!\n", ddr_freq);
+       }
+
        /*
         * Factors to consider for half-strength driver enable:
         *      - number of DIMMs installed
index 3b6e08bfcdd1449454eb76cf8c2428e2d717ea11..8031a34b6d2d71fe9020d9ac75460651110c1603 100644 (file)
@@ -125,10 +125,16 @@ void fsl_ddr_board_options(memctl_options_t *popts,
                        popts->clk_adjust = pbsp->clk_adjust;
                        popts->cpo_override = pbsp->cpo;
                        popts->twoT_en = 0;
+                       break;
                }
                pbsp++;
        }
 
+       if (i == num_params) {
+               printf("Warning: board specific timing not found "
+               "for data rate %lu MT/s!\n", ddr_freq);
+       }
+
        /*
         * Factors to consider for half-strength driver enable:
         *      - number of DIMMs installed