blob: 7cb4e0021f66099c4c2b4a3c51c846863f0dec8a [file] [log] [blame]
David Feng3b5458c2013-12-14 11:47:37 +08001/*
2 * (C) Copyright 2013
3 * David Feng <fenghua@phytium.com.cn>
4 * Sharma Bhupesh <bhupesh.sharma@freescale.com>
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8#include <common.h>
9#include <malloc.h>
10#include <errno.h>
11#include <netdev.h>
12#include <asm/io.h>
13#include <linux/compiler.h>
David Fengab33c2c2015-01-31 11:55:29 +080014#include <dm/platdata.h>
15#include <dm/platform_data/serial_pl01x.h>
David Feng3b5458c2013-12-14 11:47:37 +080016
17DECLARE_GLOBAL_DATA_PTR;
18
David Fengab33c2c2015-01-31 11:55:29 +080019static const struct pl01x_serial_platdata serial_platdata = {
20 .base = V2M_UART0,
21 .type = TYPE_PL011,
Linus Walleij31e476e2015-04-14 10:01:35 +020022 .clock = CONFIG_PL011_CLOCK,
David Fengab33c2c2015-01-31 11:55:29 +080023};
24
25U_BOOT_DEVICE(vexpress_serials) = {
26 .name = "serial_pl01x",
27 .platdata = &serial_platdata,
28};
29
David Feng3b5458c2013-12-14 11:47:37 +080030int board_init(void)
31{
32 return 0;
33}
34
35int dram_init(void)
36{
David Feng3b5458c2013-12-14 11:47:37 +080037 gd->ram_size = PHYS_SDRAM_1_SIZE;
38 return 0;
39}
40
David Feng3b5458c2013-12-14 11:47:37 +080041/*
42 * Board specific reset that is system reset.
43 */
44void reset_cpu(ulong addr)
45{
Darwin Rambod32d4112014-06-09 11:12:59 -070046}
47
David Feng3b5458c2013-12-14 11:47:37 +080048/*
49 * Board specific ethernet initialization routine.
50 */
51int board_eth_init(bd_t *bis)
52{
53 int rc = 0;
54#ifdef CONFIG_SMC91111
55 rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
56#endif
Linus Walleij48b47552015-02-17 11:35:25 +010057#ifdef CONFIG_SMC911X
58 rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
59#endif
David Feng3b5458c2013-12-14 11:47:37 +080060 return rc;
61}