3 * Marvell Semiconductor <www.marvell.com>
4 * Written-by: Lei Wen <leiwen@marvell.com>
6 * See file CREDITS for list of people who contributed to this
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
28 #include <asm/arch/mfp.h>
29 #include <asm/arch/cpu.h>
30 #ifdef CONFIG_GENERIC_MMC
34 DECLARE_GLOBAL_DATA_PTR;
36 int board_early_init_f(void)
39 /* Enable Console on UART2 */
61 MFP_EOC /*End of configureation*/
71 /* arch number of Board */
72 gd->bd->bi_arch_number = MACH_TYPE_TTC_DKB;
73 /* adress of boot parameters */
74 gd->bd->bi_boot_params = panth_sdram_base(0) + 0x100;
78 #ifdef CONFIG_GENERIC_MMC
79 #define I2C_SLAVE_ADDR 0x34
80 #define LDO13_REG 0x28
82 #define LDO_VOLTAGE(x) ((x & 0x7) << 1)
84 int board_mmc_init(bd_t *bd)
86 ulong mmc_base_address[CONFIG_SYS_MMC_NUM] = CONFIG_SYS_MMC_BASE;
89 /* set LDO 13 to 3.0v */
90 data = LDO_VOLTAGE(LDO_V30) | LDO_EN;
91 i2c_write(I2C_SLAVE_ADDR, LDO13_REG, 1, &data, 1);
93 for (i = 0; i < CONFIG_SYS_MMC_NUM; i++) {
94 if (mv_sdh_init(mmc_base_address[i], 0, 0,
95 SDHCI_QUIRK_32BIT_DMA_ADDR))