diff options
author | Pali Rohár <pali@kernel.org> | 2021-01-16 01:04:54 +0100 |
---|---|---|
committer | Lokesh Vutla <lokeshvutla@ti.com> | 2021-02-04 20:37:56 +0530 |
commit | 64fd2d26140aa72b43428d079974f7c0e7f88353 (patch) | |
tree | 744f7a677304c34c8f453934e0a2bcd25ae8b7f1 /board/nokia | |
parent | fdcb93e1709ab1a2ebb562455621617c29e2099c (diff) | |
download | u-boot-64fd2d26140aa72b43428d079974f7c0e7f88353.tar.gz u-boot-64fd2d26140aa72b43428d079974f7c0e7f88353.tar.bz2 u-boot-64fd2d26140aa72b43428d079974f7c0e7f88353.zip |
Nokia RX-51: Convert to CONFIG_DM_MMC
Move twl4030_power_mmc_init() from board_mmc_power_init() to misc_init_r()
and disable CONFIG_SYS_MALLOC_F. Otherwise U-Boot cannot initialize MMC.
Also disable CONFIG_CMD_SLEEP CONFIG_DM_DEVICE_REMOVE CONFIG_MMC_VERBOSE to
free some space.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/nokia')
-rw-r--r-- | board/nokia/rx51/rx51.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index ceb4317901..84739ae129 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -415,6 +415,8 @@ int misc_init_r(void) /* initialize twl4030 power managment */ twl4030_power_init(); + twl4030_power_mmc_init(0); + twl4030_power_mmc_init(1); /* set VSIM to 1.8V */ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VSIM_DEDICATED, @@ -686,22 +688,23 @@ int rx51_kp_getc(struct stdio_dev *sdev) return keybuf[keybuf_head++]; } -/* - * Routine: board_mmc_init - * Description: Initialize mmc devices. - */ -int board_mmc_init(struct bd_info *bis) -{ - omap_mmc_init(0, 0, 0, -1, -1); - omap_mmc_init(1, 0, 0, -1, -1); - return 0; -} +static const struct mmc_config rx51_mmc_cfg = { + .host_caps = MMC_MODE_4BIT | MMC_MODE_HS_52MHz | MMC_MODE_HS, + .f_min = 400000, + .f_max = 52000000, + .b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT, + .voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195, +}; -void board_mmc_power_init(void) -{ - twl4030_power_mmc_init(0); - twl4030_power_mmc_init(1); -} +static const struct omap_hsmmc_plat rx51_mmc[] = { + { rx51_mmc_cfg, (struct hsmmc *)OMAP_HSMMC1_BASE }, + { rx51_mmc_cfg, (struct hsmmc *)OMAP_HSMMC2_BASE }, +}; + +U_BOOT_DRVINFOS(rx51_mmc) = { + { "omap_hsmmc", &rx51_mmc[0] }, + { "omap_hsmmc", &rx51_mmc[1] }, +}; static const struct omap_i2c_plat rx51_i2c[] = { { I2C_BASE1, 100000, OMAP_I2C_REV_V1 }, |