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> |
Simon Glass | 0ffd9db | 2019-12-28 10:45:06 -0700 | [diff] [blame] | 9 | #include <init.h> |
Angelo Dureghello | 67c4e48 | 2017-08-07 01:17:18 +0200 | [diff] [blame] | 10 | #include <spi.h> |
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 11 | #include <asm/global_data.h> |
Angelo Dureghello | 67c4e48 | 2017-08-07 01:17:18 +0200 | [diff] [blame] | 12 | #include <asm/io.h> |
| 13 | #include <asm/immap.h> |
| 14 | #include <mmc.h> |
| 15 | #include <fsl_esdhc.h> |
| 16 | |
| 17 | DECLARE_GLOBAL_DATA_PTR; |
| 18 | |
| 19 | int 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 | |
| 30 | int 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 Rini | bb4dd96 | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 38 | dramsize = CFG_SYS_SDRAM_SIZE * 0x100000; |
Angelo Dureghello | 67c4e48 | 2017-08-07 01:17:18 +0200 | [diff] [blame] | 39 | |
| 40 | gd->ram_size = dramsize; |
| 41 | |
| 42 | return 0; |
| 43 | } |
| 44 | |
| 45 | int testdram(void) |
| 46 | { |
| 47 | return 0; |
| 48 | } |