Angelo Dureghello | a373024 | 2017-08-07 01:17:18 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Board-specific init. |
| 3 | * |
| 4 | * (C) Copyright 2017 Angelo Dureghello <angelo@sysam.it> |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0+ |
| 7 | */ |
| 8 | |
| 9 | #include <common.h> |
| 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 | } |