From: "Pali Rohár" <pali@kernel.org>
To: u-boot@lists.denx.de
Subject: [PATCH] Nokia RX-51: Convert to CONFIG_DM_MMC
Date: Sat, 21 Nov 2020 23:33:17 +0100 [thread overview]
Message-ID: <20201121223317.14347-1-pali@kernel.org> (raw)
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 and CONFIG_DM_DEVICE_REMOVE to free some
space.
Signed-off-by: Pali Roh?r <pali@kernel.org>
---
board/nokia/rx51/rx51.c | 32 ++++++++++++++++----------------
configs/nokia_rx51_defconfig | 4 ++++
2 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c
index 2dd41604c9..7390e5be65 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,18 @@ 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 },
+};
static const struct omap_i2c_platdata rx51_i2c[] = {
{ I2C_BASE1, 100000, OMAP_I2C_REV_V1 },
@@ -709,7 +707,9 @@ static const struct omap_i2c_platdata rx51_i2c[] = {
{ I2C_BASE3, 100000, OMAP_I2C_REV_V1 },
};
-U_BOOT_DEVICES(rx51_i2c) = {
+U_BOOT_DEVICES(rx51) = {
+ { "omap_hsmmc", &rx51_mmc[0] },
+ { "omap_hsmmc", &rx51_mmc[1] },
{ "i2c_omap", &rx51_i2c[0] },
{ "i2c_omap", &rx51_i2c[1] },
{ "i2c_omap", &rx51_i2c[2] },
diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig
index 6310a12aaa..0f05fe6fc3 100644
--- a/configs/nokia_rx51_defconfig
+++ b/configs/nokia_rx51_defconfig
@@ -29,6 +29,7 @@ CONFIG_CMD_BOOTMENU=y
# CONFIG_CMD_SAVEENV is not set
# CONFIG_CMD_ENV_EXISTS is not set
# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_SLEEP is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
@@ -62,3 +63,6 @@ CONFIG_SPLASH_SCREEN=y
# CONFIG_GZIP is not set
CONFIG_DM=y
CONFIG_DM_I2C=y
+CONFIG_DM_MMC=y
+# CONFIG_DM_DEVICE_REMOVE is not set
+# CONFIG_SYS_MALLOC_F is not set
--
2.20.1
next reply other threads:[~2020-11-21 22:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-21 22:33 Pali Rohár [this message]
2020-12-22 13:56 ` [PATCH] Nokia RX-51: Convert to CONFIG_DM_MMC Lokesh Vutla
2020-12-22 14:00 ` Pali Rohár
2020-12-22 14:50 ` Lokesh Vutla
2020-12-22 15:01 ` Pali Rohár
2021-01-05 6:22 ` Lokesh Vutla
2021-01-11 11:12 ` Lokesh Vutla
2021-01-16 0:04 ` [PATCH v2] " Pali Rohár
2021-01-16 16:21 ` Tom Rini
2021-01-17 17:11 ` Lokesh Vutla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201121223317.14347-1-pali@kernel.org \
--to=pali@kernel.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox