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