]> git.sur5r.net Git - u-boot/blobdiff - board/xes/xpedite550x/ddr.c
dm: i2c: Move definitions to the top of the header file
[u-boot] / board / xes / xpedite550x / ddr.c
index 3b6e08bfcdd1449454eb76cf8c2428e2d717ea11..0c0605e3a9a9ea1e550bc8aebf408018291efabd 100644 (file)
@@ -2,30 +2,14 @@
  * Copyright 2010 Extreme Engineering Solutions, Inc.
  * Copyright 2007-2008 Freescale Semiconductor, Inc.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <i2c.h>
 
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 
 void get_spd(ddr3_spd_eeprom_t *spd, u8 i2c_address)
 {
@@ -124,11 +108,17 @@ void fsl_ddr_board_options(memctl_options_t *popts,
                    ddr_freq <= pbsp->datarate_mhz_high) {
                        popts->clk_adjust = pbsp->clk_adjust;
                        popts->cpo_override = pbsp->cpo;
-                       popts->twoT_en = 0;
+                       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