blob: ea83e6c3e702e61f1754f14afd41efd790e41ab8 [file] [log] [blame]
Sricharan508a58f2011-11-15 09:49:55 -05001/*
2 * (C) Copyright 2010
3 * Texas Instruments Incorporated, <www.ti.com>
4 * Aneesh V <aneesh@ti.com>
5 * Steve Sakoman <steve@sakoman.com>
6 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Sricharan508a58f2011-11-15 09:49:55 -05008 */
9#include <common.h>
Nishanth Menoncb199102013-03-26 05:20:54 +000010#include <palmas.h>
Sricharan508a58f2011-11-15 09:49:55 -050011#include <asm/arch/sys_proto.h>
12#include <asm/arch/mmc_host_def.h>
13
14#include "mux_data.h"
15
16DECLARE_GLOBAL_DATA_PTR;
17
18const struct omap_sysinfo sysinfo = {
19 "Board: OMAP5430 EVM\n"
20};
21
22/**
23 * @brief board_init
24 *
25 * @return 0
26 */
27int board_init(void)
28{
29 gpmc_init();
30 gd->bd->bi_arch_number = MACH_TYPE_OMAP5_SEVM;
31 gd->bd->bi_boot_params = (0x80000000 + 0x100); /* boot param addr */
32
33 return 0;
34}
35
36int board_eth_init(bd_t *bis)
37{
38 return 0;
39}
40
41/**
42 * @brief misc_init_r - Configure EVM board specific configurations
43 * such as power configurations, ethernet initialization as phase2 of
44 * boot sequence
45 *
46 * @return 0
47 */
48int misc_init_r(void)
49{
Nishanth Menoncb199102013-03-26 05:20:54 +000050#ifdef CONFIG_PALMAS_POWER
Nishanth Menon12733882013-03-26 05:20:55 +000051 palmas_init_settings();
Sricharan508a58f2011-11-15 09:49:55 -050052#endif
53 return 0;
54}
55
56void set_muxconf_regs_essential(void)
57{
Lokesh Vutla9239f5b2013-05-30 02:54:30 +000058 do_set_mux((*ctrl)->control_padconf_core_base,
59 core_padconf_array_essential,
Sricharan508a58f2011-11-15 09:49:55 -050060 sizeof(core_padconf_array_essential) /
61 sizeof(struct pad_conf_entry));
62
Lokesh Vutla9239f5b2013-05-30 02:54:30 +000063 do_set_mux((*ctrl)->control_padconf_wkup_base,
64 wkup_padconf_array_essential,
Sricharan508a58f2011-11-15 09:49:55 -050065 sizeof(wkup_padconf_array_essential) /
66 sizeof(struct pad_conf_entry));
67}
68
69void set_muxconf_regs_non_essential(void)
70{
Lokesh Vutla9239f5b2013-05-30 02:54:30 +000071 do_set_mux((*ctrl)->control_padconf_core_base,
72 core_padconf_array_non_essential,
Sricharan508a58f2011-11-15 09:49:55 -050073 sizeof(core_padconf_array_non_essential) /
74 sizeof(struct pad_conf_entry));
75
Lokesh Vutla9239f5b2013-05-30 02:54:30 +000076 do_set_mux((*ctrl)->control_padconf_wkup_base,
77 wkup_padconf_array_non_essential,
Sricharan508a58f2011-11-15 09:49:55 -050078 sizeof(wkup_padconf_array_non_essential) /
79 sizeof(struct pad_conf_entry));
80}
81
82#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
83int board_mmc_init(bd_t *bis)
84{
Nikita Kiryanove3913f52012-12-03 02:19:47 +000085 omap_mmc_init(0, 0, 0, -1, -1);
86 omap_mmc_init(1, 0, 0, -1, -1);
Sricharan508a58f2011-11-15 09:49:55 -050087 return 0;
88}
89#endif