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