blob: 7818f2671d5ad77b876945ad4bdf5384756f88cd [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Angelo Dureghello67c4e482017-08-07 01:17:18 +02002/*
3 * Board-specific init.
4 *
5 * (C) Copyright 2017 Angelo Dureghello <angelo@sysam.it>
Angelo Dureghello67c4e482017-08-07 01:17:18 +02006 */
7
Tom Rinidec7ea02024-05-20 13:35:03 -06008#include <config.h>
Simon Glass0ffd9db2019-12-28 10:45:06 -07009#include <init.h>
Angelo Dureghello67c4e482017-08-07 01:17:18 +020010#include <spi.h>
Simon Glass3ba929a2020-10-30 21:38:53 -060011#include <asm/global_data.h>
Angelo Dureghello67c4e482017-08-07 01:17:18 +020012#include <asm/io.h>
13#include <asm/immap.h>
14#include <mmc.h>
15#include <fsl_esdhc.h>
16
17DECLARE_GLOBAL_DATA_PTR;
18
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
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 */
Tom Rinibb4dd962022-11-16 13:10:37 -050038 dramsize = CFG_SYS_SDRAM_SIZE * 0x100000;
Angelo Dureghello67c4e482017-08-07 01:17:18 +020039
40 gd->ram_size = dramsize;
41
42 return 0;
43}
44
45int testdram(void)
46{
47 return 0;
48}