]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - board/freescale/t4qds/ddr.c
SPDX: Convert all of our single license tags to Linux Kernel style
[thirdparty/u-boot.git] / board / freescale / t4qds / ddr.c
index d533924a0dd38ac76860870ba388e99d5b6383a2..08656b4e30947dc9c36a8dc946cece6892e6897a 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright 2012 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0
  */
 
 #include <common.h>
@@ -107,9 +106,12 @@ found:
        /* DHC_EN =1, ODT = 75 Ohm */
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
        popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
+
+       /* optimize cpo for erratum A-009942 */
+       popts->cpo_sample = 0x63;
 }
 
-phys_size_t initdram(int board_type)
+int dram_init(void)
 {
        phys_size_t dram_size;
 
@@ -124,5 +126,7 @@ phys_size_t initdram(int board_type)
        dram_size = setup_ddr_tlbs(dram_size / 0x100000);
        dram_size *= 0x100000;
 
-       return dram_size;
+       gd->ram_size = dram_size;
+
+       return 0;
 }