1 // SPDX-License-Identifier: GPL-2.0+ 2 /* 3 * Board-specific init. 4 * 5 * (C) Copyright 2017 Angelo Dureghello <angelo@sysam.it> 6 */ 7 8 #include <common.h> 9 #include <init.h> 10 #include <spi.h> 11 #include <asm/global_data.h> 12 #include <asm/io.h> 13 #include <asm/immap.h> 14 #include <mmc.h> 15 #include <fsl_esdhc.h> 16 17 DECLARE_GLOBAL_DATA_PTR; 18 checkboard(void)19int checkboard(void) 20 { 21 /* 22 * need to to: 23 * Check serial flash size. if 2mb evb, else 8mb demo 24 */ 25 puts("Board: "); 26 puts("Sysam stmark2\n"); 27 return 0; 28 } 29 dram_init(void)30int dram_init(void) 31 { 32 u32 dramsize; 33 34 /* 35 * Serial Boot: The dram is already initialized in start.S 36 * only require to return DRAM size 37 */ 38 dramsize = CONFIG_SYS_SDRAM_SIZE * 0x100000; 39 40 gd->ram_size = dramsize; 41 42 return 0; 43 } 44 testdram(void)45int testdram(void) 46 { 47 return 0; 48 } 49