blob: 72cf46c749ff1b5db3c2bb6909922882b975e0ce [file] [log] [blame]
Trevor Woernerabec6dc2021-06-10 22:37:04 -04001// 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
16DECLARE_GLOBAL_DATA_PTR;
17
18int
19board_early_init_f(void)
20{
21 lpc32xx_uart_init(CONFIG_CONS_INDEX);
Trevor Woernere3370482021-06-10 22:37:09 -040022 if (IS_ENABLED(CONFIG_SYS_I2C_LPC32XX)) {
23 lpc32xx_i2c_init(1);
24 lpc32xx_i2c_init(2);
25 }
Trevor Woernerabec6dc2021-06-10 22:37:04 -040026 return 0;
27}
28
29int
30board_init(void)
31{
32 gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x2000;
33 return 0;
34}
35
36int
37dram_init(void)
38{
39 gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE, SZ_64M);
40 return 0;
41}