| * Marvell Semiconductor <www.marvell.com> |
| * Written-by: Lei Wen <leiwen@marvell.com> |
| * SPDX-License-Identifier: GPL-2.0+ |
| #include <asm/arch/mfp.h> |
| #include <asm/arch/cpu.h> |
| #ifdef CONFIG_GENERIC_MMC |
| int board_early_init_f(void) |
| /* Enable Console on UART2 */ |
| MFP_EOC /*End of configureation*/ |
| /* arch number of Board */ |
| gd->bd->bi_arch_number = MACH_TYPE_TTC_DKB; |
| /* adress of boot parameters */ |
| gd->bd->bi_boot_params = panth_sdram_base(0) + 0x100; |
| #ifdef CONFIG_GENERIC_MMC |
| #define I2C_SLAVE_ADDR 0x34 |
| #define LDO_VOLTAGE(x) ((x & 0x7) << 1) |
| int board_mmc_init(bd_t *bd) |
| ulong mmc_base_address[CONFIG_SYS_MMC_NUM] = CONFIG_SYS_MMC_BASE; |
| data = LDO_VOLTAGE(LDO_V30) | LDO_EN; |
| i2c_write(I2C_SLAVE_ADDR, LDO13_REG, 1, &data, 1); |
| for (i = 0; i < CONFIG_SYS_MMC_NUM; i++) { |
| if (mv_sdh_init(mmc_base_address[i], 0, 0, |
| SDHCI_QUIRK_32BIT_DMA_ADDR)) |