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