Trevor Woerner | abec6dc | 2021-06-10 22:37:04 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Board init file for Embedded Artists LPC3250 DevKit v2 |
| 4 | * Copyright (C) 2021 Trevor Woerner <twoerner@gmail.com> |
| 5 | */ |
| 6 | |
| 7 | #include <init.h> |
| 8 | #include <common.h> |
| 9 | #include <asm/io.h> |
| 10 | #include <asm/global_data.h> |
| 11 | |
| 12 | #include <asm/arch/clk.h> |
| 13 | #include <asm/arch/wdt.h> |
| 14 | #include <asm/arch/sys_proto.h> |
| 15 | |
| 16 | DECLARE_GLOBAL_DATA_PTR; |
| 17 | |
| 18 | int |
| 19 | board_early_init_f(void) |
| 20 | { |
| 21 | lpc32xx_uart_init(CONFIG_CONS_INDEX); |
Trevor Woerner | e337048 | 2021-06-10 22:37:09 -0400 | [diff] [blame] | 22 | if (IS_ENABLED(CONFIG_SYS_I2C_LPC32XX)) { |
| 23 | lpc32xx_i2c_init(1); |
| 24 | lpc32xx_i2c_init(2); |
| 25 | } |
Trevor Woerner | abec6dc | 2021-06-10 22:37:04 -0400 | [diff] [blame] | 26 | return 0; |
| 27 | } |
| 28 | |
| 29 | int |
| 30 | board_init(void) |
| 31 | { |
Tom Rini | bb4dd96 | 2022-11-16 13:10:37 -0500 | [diff] [blame^] | 32 | gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x2000; |
Trevor Woerner | abec6dc | 2021-06-10 22:37:04 -0400 | [diff] [blame] | 33 | return 0; |
| 34 | } |
| 35 | |
| 36 | int |
| 37 | dram_init(void) |
| 38 | { |
Tom Rini | bb4dd96 | 2022-11-16 13:10:37 -0500 | [diff] [blame^] | 39 | gd->ram_size = get_ram_size((void *)CFG_SYS_SDRAM_BASE, SZ_64M); |
Trevor Woerner | abec6dc | 2021-06-10 22:37:04 -0400 | [diff] [blame] | 40 | return 0; |
| 41 | } |