From: "Pali Rohár" <pali@kernel.org>
To: Peng Fan <peng.fan@nxp.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Priyanka Jain <priyanka.jain@nxp.com>,
Sinan Akman <sinan@writeme.com>
Cc: u-boot@lists.denx.de
Subject: [PATCH 2/2] mmc: fsl_esdhc: Add new config option for default fallback mode
Date: Wed, 11 May 2022 20:27:13 +0200 [thread overview]
Message-ID: <20220511182713.26790-2-pali@kernel.org> (raw)
In-Reply-To: <20220511182713.26790-1-pali@kernel.org>
Currently default fallback SDHC mode is 1-bit. Add new config option
CONFIG_SYS_FSL_ESDHC_DEFAULT_BUS_WIDTH to allow specifying default fallback
mode. This is useful e.g. for SPL builds which loads other parts from SD
card during boot process.
Signed-off-by: Pali Rohár <pali@kernel.org>
---
drivers/mmc/Kconfig | 5 +++++
drivers/mmc/fsl_esdhc.c | 1 +
2 files changed, 6 insertions(+)
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index f04cc44e1973..df15dff6248f 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -826,6 +826,11 @@ config FSL_ESDHC_VS33_NOT_SUPPORT
For eSDHC, power supply is through peripheral circuit. 3.3V support is
common. Select this if 3.3V power supply not supported.
+config SYS_FSL_ESDHC_DEFAULT_BUS_WIDTH
+ int
+ depends on FSL_ESDHC
+ default 1
+
config FSL_ESDHC_IMX
bool "Freescale/NXP i.MX eSDHC controller support"
help
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 834f8933b0c6..a4c22942c2be 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -988,6 +988,7 @@ int fsl_esdhc_mmc_init(struct bd_info *bis)
cfg = calloc(sizeof(struct fsl_esdhc_cfg), 1);
cfg->esdhc_base = CONFIG_SYS_FSL_ESDHC_ADDR;
+ cfg->max_bus_width = CONFIG_SYS_FSL_ESDHC_DEFAULT_BUS_WIDTH;
/* Prefer peripheral clock which provides higher frequency. */
if (gd->arch.sdhc_per_clk)
cfg->sdhc_clk = gd->arch.sdhc_per_clk;
--
2.20.1
next prev parent reply other threads:[~2022-05-11 18:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220511182733epcas1p1e986f0fecb5b3f736b5a0c7a15c5608a@epcas1p1.samsung.com>
2022-05-11 18:27 ` [PATCH 1/2] mmc: fsl_esdhc: Set fallback mode to 1-bit Pali Rohár
2022-05-11 18:27 ` Pali Rohár [this message]
2022-05-16 23:40 ` [PATCH 2/2] mmc: fsl_esdhc: Add new config option for default fallback mode Jaehoon Chung
2022-05-17 7:27 ` Pali Rohár
2022-05-17 9:20 ` Jaehoon Chung
2022-05-16 23:39 ` [PATCH 1/2] mmc: fsl_esdhc: Set fallback mode to 1-bit Jaehoon Chung
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=20220511182713.26790-2-pali@kernel.org \
--to=pali@kernel.org \
--cc=jh80.chung@samsung.com \
--cc=peng.fan@nxp.com \
--cc=priyanka.jain@nxp.com \
--cc=sinan@writeme.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.