Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / board / barco / platinum / spl_picon.c
index f421c2108c90a69570313ce23e479bdd6e59d906..253a64d28ebaf04fb1430a19cdc4956c970c2f75 100644 (file)
@@ -1,28 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2014 Stefan Roese <sr@denx.de>
  *
  * Based on: gw_ventana_spl.c which is:
  * Copyright (C) 2014 Gateworks Corporation
- *
- * SPDX-License-Identifier:     GPL-2.0+
  */
 
 #include <common.h>
 #include <i2c.h>
+#include <init.h>
 #include <asm/io.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-ddr.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/imx-common/boot_mode.h>
-#include <asm/imx-common/iomux-v3.h>
-#include <asm/imx-common/mxc_i2c.h>
+#include <asm/mach-imx/boot_mode.h>
+#include <asm/mach-imx/iomux-v3.h>
+#include <asm/mach-imx/mxc_i2c.h>
 #include <spl.h>
 
 #include "platinum.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #undef RTT_NOM_120OHM  /* use 120ohm Rtt_nom vs 60ohm (lower power) */
 
 /* Configure MX6Q/DUAL mmdc DDR io registers */
@@ -137,6 +135,9 @@ static void spl_dram_init(int width)
                .bi_on = 1,     /* Bank interleaving enabled */
                .sde_to_rst = 0x10,     /* 14 cycles, 200us (JEDEC default) */
                .rst_to_cke = 0x23,     /* 33 cycles, 500us (JEDEC default) */
+               .ddr_type = DDR_TYPE_DDR3,
+               .refsel = 1,    /* Refresh cycles at 32KHz */
+               .refr = 7,      /* 8 refresh commands per refresh cycle */
        };
 
        mx6sdl_dram_iocfg(width, &mx6sdl_ddr_ioregs, &mx6sdl_grp_ioregs);