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
board_early_init_f(void)19 board_early_init_f(void)
20 {
21 	lpc32xx_uart_init(CONFIG_CONS_INDEX);
22 	if (IS_ENABLED(CONFIG_SYS_I2C_LPC32XX)) {
23 		lpc32xx_i2c_init(1);
24 		lpc32xx_i2c_init(2);
25 	}
26 	return 0;
27 }
28 
29 int
board_init(void)30 board_init(void)
31 {
32 	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x2000;
33 	return 0;
34 }
35 
36 int
dram_init(void)37 dram_init(void)
38 {
39 	gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE, SZ_64M);
40 	return 0;
41 }
42