Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Angelo Dureghello | 67c4e48 | 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 | 67c4e48 | 2017-08-07 01:17:18 +0200 | [diff] [blame] | 6 | */ |
| 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 | |
| 15 | DECLARE_GLOBAL_DATA_PTR; |
| 16 | |
| 17 | int 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 | |
| 28 | int 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 | |
| 43 | int testdram(void) |
| 44 | { |
| 45 | return 0; |
| 46 | } |