1
2
3
4
5
6
7
8#include <common.h>
9#include <init.h>
10#include <net.h>
11#include <twl6030.h>
12#include <serial.h>
13#include <asm/arch/sys_proto.h>
14#include <asm/arch/mmc_host_def.h>
15
16#include "sdp4430_mux_data.h"
17
18DECLARE_GLOBAL_DATA_PTR;
19
20const struct omap_sysinfo sysinfo = {
21 "Board: OMAP4430 SDP\n"
22};
23
24
25
26
27
28
29int board_init(void)
30{
31 gpmc_init();
32
33 gd->bd->bi_boot_params = (0x80000000 + 0x100);
34
35 return 0;
36}
37
38int board_eth_init(struct bd_info *bis)
39{
40 return 0;
41}
42
43
44
45
46
47
48
49
50int misc_init_r(void)
51{
52#ifdef CONFIG_TWL6030_POWER
53 twl6030_init_battery_charging();
54#endif
55 return 0;
56}
57
58void set_muxconf_regs(void)
59{
60 do_set_mux((*ctrl)->control_padconf_core_base,
61 core_padconf_array_essential,
62 sizeof(core_padconf_array_essential) /
63 sizeof(struct pad_conf_entry));
64
65 do_set_mux((*ctrl)->control_padconf_wkup_base,
66 wkup_padconf_array_essential,
67 sizeof(wkup_padconf_array_essential) /
68 sizeof(struct pad_conf_entry));
69
70 if ((omap_revision() >= OMAP4460_ES1_0) &&
71 (omap_revision() < OMAP4470_ES1_0))
72 do_set_mux((*ctrl)->control_padconf_wkup_base,
73 wkup_padconf_array_essential_4460,
74 sizeof(wkup_padconf_array_essential_4460) /
75 sizeof(struct pad_conf_entry));
76}
77
78#if defined(CONFIG_MMC)
79int board_mmc_init(struct bd_info *bis)
80{
81 omap_mmc_init(0, 0, 0, -1, -1);
82 omap_mmc_init(1, 0, 0, -1, -1);
83 return 0;
84}
85
86#if !defined(CONFIG_SPL_BUILD)
87void board_mmc_power_init(void)
88{
89 twl6030_power_mmc_init(0);
90 twl6030_power_mmc_init(1);
91}
92#endif
93#endif
94
95#if defined(CONFIG_SPL_OS_BOOT)
96int spl_start_uboot(void)
97{
98
99 if (serial_tstc() && serial_getc() == 'c')
100 return 1;
101
102 return 0;
103}
104#endif
105
106
107
108
109u32 get_board_rev(void)
110{
111 return 0x20;
112}
113