blob: 9c066a283c99a015296f7b32ee38adfa695d0b24 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Albert Aribaudacc41ff2010-06-17 19:38:21 +05302/*
Albert ARIBAUD340983d2011-04-22 19:41:02 +02003 * Copyright (C) 2010 Albert ARIBAUD <albert.u.boot@aribaud.net>
Albert Aribaudacc41ff2010-06-17 19:38:21 +05304 *
5 * (C) Copyright 2009
6 * Marvell Semiconductor <www.marvell.com>
7 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
Albert Aribaudacc41ff2010-06-17 19:38:21 +05308 */
9
10#include <common.h>
11#include <miiphy.h>
Simon Glass0c364412019-12-28 10:44:48 -070012#include <net.h>
Albert Aribaudacc41ff2010-06-17 19:38:21 +053013#include <asm/arch/orion5x.h>
Simon Glass3ba929a2020-10-30 21:38:53 -060014#include <asm/global_data.h>
Wolfgang Denk7ec9e582011-12-09 12:14:28 +010015#include "../common/common.h"
Albert ARIBAUD2ac37922015-01-31 22:55:38 +010016#include <spl.h>
17#include <ns16550.h>
Simon Glass0ffb9d62017-05-31 19:47:48 -060018#include <asm/mach-types.h>
Albert Aribaudacc41ff2010-06-17 19:38:21 +053019
20DECLARE_GLOBAL_DATA_PTR;
21
Albert Aribaudacc41ff2010-06-17 19:38:21 +053022int board_init(void)
23{
24 /* arch number of board */
25 gd->bd->bi_arch_number = MACH_TYPE_EDMINI_V2;
26
27 /* boot parameter start at 256th byte of RAM base */
28 gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
29
30 return 0;
31}
Albert Aribaudc5b205b2010-07-12 22:24:30 +020032
33#if defined(CONFIG_CMD_NET) && defined(CONFIG_RESET_PHY_R)
34/* Configure and enable MV88E1116 PHY */
35void reset_phy(void)
36{
Simon Guinot0473b682012-06-05 13:16:00 +000037 mv_phy_88e1116_init("egiga0", 8);
Albert Aribaudc5b205b2010-07-12 22:24:30 +020038}
39#endif /* CONFIG_RESET_PHY_R */
Albert ARIBAUD2ac37922015-01-31 22:55:38 +010040
41/*
42 * SPL serial setup and NOR boot device selection
43 */
44
45#ifdef CONFIG_SPL_BUILD
46
47void spl_board_init(void)
48{
49 preloader_console_init();
50}
51
52u32 spl_boot_device(void)
53{
54 return BOOT_DEVICE_NOR;
55}
56
57#endif /* CONFIG_SPL_BUILD */