]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/freescale/t4qds/ddr.c
Add more SPDX-License-Identifier tags
[people/ms/u-boot.git] / board / freescale / t4qds / ddr.c
index 7586cc3c4bda640e0e07ee786fdd6490bee8e2e4..62d58c5b1f10c183c628ecdfa59f812a04977966 100644 (file)
@@ -1,9 +1,7 @@
 /*
  * Copyright 2012 Freescale Semiconductor, Inc.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * Version 2 or later as published by the Free Software Foundation.
+ * SPDX-License-Identifier:    GPL-2.0
  */
 
 #include <common.h>
@@ -117,11 +115,15 @@ phys_size_t initdram(int board_type)
 
        puts("Initializing....using SPD\n");
 
+#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL)
        dram_size = fsl_ddr_sdram();
 
        dram_size = setup_ddr_tlbs(dram_size / 0x100000);
        dram_size *= 0x100000;
 
-       puts("    DDR: ");
+#else
+       /* DDR has been initialised by first stage boot loader */
+       dram_size = fsl_ddr_sdram_size();
+#endif
        return dram_size;
 }