blob: ce8b541ccdf7476c0e064549b9033625ebafe5a4 [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>
Simon Glass49acd562019-12-28 10:45:06 -07009#include <init.h>
Angelo Dureghelloa3730242017-08-07 01:17:18 +020010#include <spi.h>
11#include <asm/io.h>
12#include <asm/immap.h>
13#include <mmc.h>
14#include <fsl_esdhc.h>
15
16DECLARE_GLOBAL_DATA_PTR;
17
18int checkboard(void)
19{
20 /*
21 * need to to:
22 * Check serial flash size. if 2mb evb, else 8mb demo
23 */
24 puts("Board: ");
25 puts("Sysam stmark2\n");
26 return 0;
27}
28
29int dram_init(void)
30{
31 u32 dramsize;
32
33 /*
34 * Serial Boot: The dram is already initialized in start.S
35 * only require to return DRAM size
36 */
37 dramsize = CONFIG_SYS_SDRAM_SIZE * 0x100000;
38
39 gd->ram_size = dramsize;
40
41 return 0;
42}
43
44int testdram(void)
45{
46 return 0;
47}