blob: 436645a83f7c4f37310f6f38d4bdfcd4f0545a03 [file] [log] [blame]
Srinath714194e2011-04-18 17:40:35 -04001/*
2 * am3517crane.c - board file for AM3517 CraneBoard
3 *
4 * Author: Srinath.R <srinath@mistralsolutions.com>
5 *
6 * Based on logicpd/am3517evm/am3517evm.c
7 *
8 * Copyright (C) 2011 Mistral Solutions Pvt Ltd
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
25#include <common.h>
26#include <asm/io.h>
Tom Rini54c0b7b2011-09-03 21:51:50 -040027#include <asm/arch/mmc_host_def.h>
Srinath714194e2011-04-18 17:40:35 -040028#include <asm/arch/mem.h>
29#include <asm/arch/mux.h>
30#include <asm/arch/sys_proto.h>
31#include <asm/mach-types.h>
32#include <i2c.h>
33#include "am3517crane.h"
34
35DECLARE_GLOBAL_DATA_PTR;
36
37/*
38 * Routine: board_init
39 * Description: Early hardware init.
40 */
41int board_init(void)
42{
43 gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
44 /* board id for Linux */
45 gd->bd->bi_arch_number = MACH_TYPE_CRANEBOARD;
46 /* boot param addr */
47 gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
48
49 return 0;
50}
51
52/*
53 * Routine: misc_init_r
54 * Description: Init i2c, ethernet, etc... (done here so udelay works)
55 */
56int misc_init_r(void)
57{
58#ifdef CONFIG_DRIVER_OMAP34XX_I2C
59 i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
60#endif
61
62 dieid_num_r();
63
64 return 0;
65}
66
67/*
68 * Routine: set_muxconf_regs
69 * Description: Setting up the configuration Mux registers specific to the
70 * hardware. Many pins need to be moved from protect to primary
71 * mode.
72 */
73void set_muxconf_regs(void)
74{
75 MUX_AM3517CRANE();
76}
Tom Rini54c0b7b2011-09-03 21:51:50 -040077
Tom Rini9e341852011-11-18 12:48:11 +000078#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
Tom Rini54c0b7b2011-09-03 21:51:50 -040079int board_mmc_init(bd_t *bis)
80{
81 omap_mmc_init(0);
82 return 0;
83}
84#endif