Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Angelo Dureghello | a373024 | 2017-08-07 01:17:18 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Board-specific init. |
| 4 | * |
| 5 | * (C) Copyright 2017 Angelo Dureghello <angelo@sysam.it> |
Angelo Dureghello | a373024 | 2017-08-07 01:17:18 +0200 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
Simon Glass | 49acd56 | 2019-12-28 10:45:06 -0700 | [diff] [blame] | 9 | #include <init.h> |
Angelo Dureghello | a373024 | 2017-08-07 01:17:18 +0200 | [diff] [blame] | 10 | #include <spi.h> |
| 11 | #include <asm/io.h> |
| 12 | #include <asm/immap.h> |
| 13 | #include <mmc.h> |
| 14 | #include <fsl_esdhc.h> |
| 15 | |
| 16 | DECLARE_GLOBAL_DATA_PTR; |
| 17 | |
| 18 | int 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 | |
| 29 | int 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 | |
| 44 | int testdram(void) |
| 45 | { |
| 46 | return 0; |
| 47 | } |