blob: 8190e4bafbac860af77dfef427ab6e2a17812570 [file] [log] [blame]
Lokesh Vutla687054a2013-02-12 21:29:08 +00001/*
2 * (C) Copyright 2013
3 * Texas Instruments Incorporated, <www.ti.com>
4 *
5 * Lokesh Vutla <lokeshvutla@ti.com>
6 *
7 * Based on previous work by:
8 * Aneesh V <aneesh@ti.com>
9 * Steve Sakoman <steve@sakoman.com>
10 *
Wolfgang Denk1a459662013-07-08 09:37:19 +020011 * SPDX-License-Identifier: GPL-2.0+
Lokesh Vutla687054a2013-02-12 21:29:08 +000012 */
13#include <common.h>
Nishanth Menoncb199102013-03-26 05:20:54 +000014#include <palmas.h>
Lokesh Vutla687054a2013-02-12 21:29:08 +000015#include <asm/arch/sys_proto.h>
16#include <asm/arch/mmc_host_def.h>
17
18#include "mux_data.h"
19
20#ifdef CONFIG_USB_EHCI
21#include <usb.h>
22#include <asm/arch/ehci.h>
23#include <asm/ehci-omap.h>
24#endif
25
26DECLARE_GLOBAL_DATA_PTR;
27
28const struct omap_sysinfo sysinfo = {
29 "Board: DRA7xx\n"
30};
31
32/**
33 * @brief board_init
34 *
35 * @return 0
36 */
37int board_init(void)
38{
39 gpmc_init();
40 gd->bd->bi_boot_params = (0x80000000 + 0x100); /* boot param addr */
41
42 return 0;
43}
44
45int board_eth_init(bd_t *bis)
46{
47 return 0;
48}
49
50/**
51 * @brief misc_init_r - Configure EVM board specific configurations
52 * such as power configurations, ethernet initialization as phase2 of
53 * boot sequence
54 *
55 * @return 0
56 */
57int misc_init_r(void)
58{
59 return 0;
60}
61
62static void do_set_mux32(u32 base,
63 struct pad_conf_entry const *array, int size)
64{
65 int i;
66 struct pad_conf_entry *pad = (struct pad_conf_entry *)array;
67
68 for (i = 0; i < size; i++, pad++)
69 writel(pad->val, base + pad->offset);
70}
71
72void set_muxconf_regs_essential(void)
73{
74 do_set_mux32((*ctrl)->control_padconf_core_base,
75 core_padconf_array_essential,
76 sizeof(core_padconf_array_essential) /
77 sizeof(struct pad_conf_entry));
78}
79
80#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
81int board_mmc_init(bd_t *bis)
82{
83 omap_mmc_init(0, 0, 0, -1, -1);
84 omap_mmc_init(1, 0, 0, -1, -1);
85 return 0;
86}
87#endif