]>
Commit | Line | Data |
---|---|---|
3e76d62a SS |
1 | /* |
2 | * (C) Copyright 2010 | |
3 | * Texas Instruments Incorporated, <www.ti.com> | |
4 | * Aneesh V <aneesh@ti.com> | |
5 | * Steve Sakoman <steve@sakoman.com> | |
6 | * | |
1a459660 | 7 | * SPDX-License-Identifier: GPL-2.0+ |
3e76d62a SS |
8 | */ |
9 | #include <common.h> | |
3e664f6d | 10 | #include <twl6030.h> |
3e76d62a | 11 | #include <asm/arch/sys_proto.h> |
084c4c1b | 12 | #include <asm/arch/mmc_host_def.h> |
3e76d62a | 13 | |
469ec1e3 | 14 | #include "sdp4430_mux_data.h" |
2ad853c3 | 15 | |
3e76d62a SS |
16 | DECLARE_GLOBAL_DATA_PTR; |
17 | ||
18 | const struct omap_sysinfo sysinfo = { | |
19 | "Board: OMAP4430 SDP\n" | |
20 | }; | |
21 | ||
22 | /** | |
23 | * @brief board_init | |
24 | * | |
25 | * @return 0 | |
26 | */ | |
27 | int board_init(void) | |
28 | { | |
27952014 SS |
29 | gpmc_init(); |
30 | ||
3e76d62a SS |
31 | gd->bd->bi_boot_params = (0x80000000 + 0x100); /* boot param addr */ |
32 | ||
33 | return 0; | |
34 | } | |
35 | ||
36 | int board_eth_init(bd_t *bis) | |
37 | { | |
38 | return 0; | |
39 | } | |
40 | ||
41 | /** | |
42 | * @brief misc_init_r - Configure SDP board specific configurations | |
43 | * such as power configurations, ethernet initialization as phase2 of | |
44 | * boot sequence | |
45 | * | |
46 | * @return 0 | |
47 | */ | |
48 | int misc_init_r(void) | |
49 | { | |
3e664f6d B |
50 | #ifdef CONFIG_TWL6030_POWER |
51 | twl6030_init_battery_charging(); | |
52 | #endif | |
3e76d62a SS |
53 | return 0; |
54 | } | |
2ad853c3 | 55 | |
3ef56e61 | 56 | void set_muxconf_regs(void) |
508a58fa | 57 | { |
9239f5b6 LV |
58 | do_set_mux((*ctrl)->control_padconf_core_base, |
59 | core_padconf_array_essential, | |
508a58fa S |
60 | sizeof(core_padconf_array_essential) / |
61 | sizeof(struct pad_conf_entry)); | |
62 | ||
9239f5b6 LV |
63 | do_set_mux((*ctrl)->control_padconf_wkup_base, |
64 | wkup_padconf_array_essential, | |
508a58fa S |
65 | sizeof(wkup_padconf_array_essential) / |
66 | sizeof(struct pad_conf_entry)); | |
67 | ||
e633ac01 TK |
68 | if ((omap_revision() >= OMAP4460_ES1_0) && |
69 | (omap_revision() < OMAP4470_ES1_0)) | |
9239f5b6 | 70 | do_set_mux((*ctrl)->control_padconf_wkup_base, |
508a58fa S |
71 | wkup_padconf_array_essential_4460, |
72 | sizeof(wkup_padconf_array_essential_4460) / | |
73 | sizeof(struct pad_conf_entry)); | |
74 | } | |
75 | ||
4aa2ba3a | 76 | #if defined(CONFIG_MMC) |
084c4c1b SG |
77 | int board_mmc_init(bd_t *bis) |
78 | { | |
e3913f56 NK |
79 | omap_mmc_init(0, 0, 0, -1, -1); |
80 | omap_mmc_init(1, 0, 0, -1, -1); | |
084c4c1b SG |
81 | return 0; |
82 | } | |
fbf1b08a | 83 | |
d5abcf94 | 84 | #if !defined(CONFIG_SPL_BUILD) |
fbf1b08a PK |
85 | void board_mmc_power_init(void) |
86 | { | |
87 | twl6030_power_mmc_init(0); | |
88 | twl6030_power_mmc_init(1); | |
89 | } | |
084c4c1b | 90 | #endif |
d5abcf94 | 91 | #endif |
508a58fa S |
92 | |
93 | /* | |
94 | * get_board_rev() - get board revision | |
95 | */ | |
96 | u32 get_board_rev(void) | |
97 | { | |
98 | return 0x20; | |
99 | } |