Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Lukasz Majewski | 11bd5e7 | 2017-01-27 23:16:29 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2016-2017 |
| 4 | * Lukasz Majewski, DENX Software Engineering, lukma@denx.de |
Lukasz Majewski | 11bd5e7 | 2017-01-27 23:16:29 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <common.h> |
Simon Glass | 3a7d557 | 2019-08-01 09:46:42 -0600 | [diff] [blame] | 8 | #include <env.h> |
Simon Glass | 5255932 | 2019-11-14 12:57:46 -0700 | [diff] [blame] | 9 | #include <init.h> |
Simon Glass | b03e051 | 2019-11-14 12:57:24 -0700 | [diff] [blame] | 10 | #include <serial.h> |
Lukasz Majewski | 11bd5e7 | 2017-01-27 23:16:29 +0100 | [diff] [blame] | 11 | #include <asm/arch/clock.h> |
| 12 | #include <asm/arch/iomux.h> |
| 13 | #include <asm/arch/imx-regs.h> |
Lukasz Majewski | 11bd5e7 | 2017-01-27 23:16:29 +0100 | [diff] [blame] | 14 | #include <asm/arch/sys_proto.h> |
Simon Glass | 401d1c4 | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 15 | #include <asm/global_data.h> |
Lukasz Majewski | 11bd5e7 | 2017-01-27 23:16:29 +0100 | [diff] [blame] | 16 | #include <asm/gpio.h> |
Lukasz Majewski | 11bd5e7 | 2017-01-27 23:16:29 +0100 | [diff] [blame] | 17 | |
| 18 | DECLARE_GLOBAL_DATA_PTR; |
| 19 | |
Lukasz Majewski | 11bd5e7 | 2017-01-27 23:16:29 +0100 | [diff] [blame] | 20 | int dram_init(void) |
| 21 | { |
| 22 | gd->ram_size = imx_ddr_size(); |
| 23 | |
| 24 | return 0; |
| 25 | } |
| 26 | |
Lukasz Majewski | 11bd5e7 | 2017-01-27 23:16:29 +0100 | [diff] [blame] | 27 | int board_init(void) |
| 28 | { |
| 29 | /* address of boot parameters */ |
| 30 | gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; |
| 31 | |
Lukasz Majewski | 11bd5e7 | 2017-01-27 23:16:29 +0100 | [diff] [blame] | 32 | return 0; |
| 33 | } |
| 34 | |
| 35 | int board_late_init(void) |
| 36 | { |
Simon Glass | 382bee5 | 2017-08-03 12:22:09 -0600 | [diff] [blame] | 37 | env_set("board_name", "mccmon6"); |
Lukasz Majewski | 11bd5e7 | 2017-01-27 23:16:29 +0100 | [diff] [blame] | 38 | |
| 39 | return 0; |
| 40 | } |
| 41 | |
| 42 | int checkboard(void) |
| 43 | { |
| 44 | puts("Board: MCCMON6\n"); |
| 45 | |
| 46 | return 0; |
| 47 | } |