blob: 5d4e57ffc5c2015f21d07abccc3d7473c6e2c959 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Srinath915162d2011-04-18 17:40:35 -04002/*
3 * am3517crane.c - board file for AM3517 CraneBoard
4 *
5 * Author: Srinath.R <srinath@mistralsolutions.com>
6 *
7 * Based on logicpd/am3517evm/am3517evm.c
8 *
9 * Copyright (C) 2011 Mistral Solutions Pvt Ltd
Srinath915162d2011-04-18 17:40:35 -040010 */
11
12#include <common.h>
13#include <asm/io.h>
Tom Rinia5a88212011-09-03 21:51:50 -040014#include <asm/arch/mmc_host_def.h>
Srinath915162d2011-04-18 17:40:35 -040015#include <asm/arch/mem.h>
16#include <asm/arch/mux.h>
17#include <asm/arch/sys_proto.h>
18#include <asm/mach-types.h>
19#include <i2c.h>
20#include "am3517crane.h"
21
22DECLARE_GLOBAL_DATA_PTR;
23
24/*
25 * Routine: board_init
26 * Description: Early hardware init.
27 */
28int board_init(void)
29{
30 gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
31 /* board id for Linux */
32 gd->bd->bi_arch_number = MACH_TYPE_CRANEBOARD;
33 /* boot param addr */
34 gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
35
36 return 0;
37}
38
39/*
40 * Routine: misc_init_r
41 * Description: Init i2c, ethernet, etc... (done here so udelay works)
42 */
43int misc_init_r(void)
44{
Adam Ford94d50be2017-08-07 13:11:19 -050045#ifdef CONFIG_SYS_I2C_OMAP24XX
Heiko Schocher6789e842013-10-22 11:03:18 +020046 i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
Srinath915162d2011-04-18 17:40:35 -040047#endif
48
Paul Kocialkowski679f82c2015-08-27 19:37:13 +020049 omap_die_id_display();
Srinath915162d2011-04-18 17:40:35 -040050
51 return 0;
52}
53
54/*
55 * Routine: set_muxconf_regs
56 * Description: Setting up the configuration Mux registers specific to the
57 * hardware. Many pins need to be moved from protect to primary
58 * mode.
59 */
60void set_muxconf_regs(void)
61{
62 MUX_AM3517CRANE();
63}
Tom Rinia5a88212011-09-03 21:51:50 -040064
Masahiro Yamada4aa2ba32017-05-09 20:31:39 +090065#if defined(CONFIG_MMC)
Tom Rinia5a88212011-09-03 21:51:50 -040066int board_mmc_init(bd_t *bis)
67{
Nikita Kiryanove3913f52012-12-03 02:19:47 +000068 return omap_mmc_init(0, 0, 0, -1, -1);
Tom Rinia5a88212011-09-03 21:51:50 -040069}
70#endif