blob: 2b03e4891d92f0d3d1565e9fc169c0c055014b80 [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{
Tom Rinibb4dd962022-11-16 13:10:37 -050032 gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x2000;
Trevor Woernerabec6dc2021-06-10 22:37:04 -040033 return 0;
34}
35
36int
37dram_init(void)
38{
Tom Rinibb4dd962022-11-16 13:10:37 -050039 gd->ram_size = get_ram_size((void *)CFG_SYS_SDRAM_BASE, SZ_64M);
Trevor Woernerabec6dc2021-06-10 22:37:04 -040040 return 0;
41}