All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: "Stefan Roese" <sr@denx.de>, "Andre Heider" <a.heider@gmail.com>,
	"Gérald Kerma" <gerald@gk2.net>,
	"Konstantin Porotchkin" <kostap@marvell.com>,
	"Baruch Siach" <baruch@tkos.co.il>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Peng Fan" <peng.fan@nxp.com>
Cc: u-boot@lists.denx.de
Subject: [PATCH 2/3] arm: mvebu: Espressobin: Use function mmc_get_op_cond() for detecting eMMC
Date: Wed, 14 Jul 2021 16:37:28 +0200	[thread overview]
Message-ID: <20210714143729.2396-2-pali@kernel.org> (raw)
In-Reply-To: <20210714143729.2396-1-pali@kernel.org>

Use function mmc_get_op_cond() instead of mmc_init() for detecting presence
of eMMC. Documentation for this function says that it could be used to
detect the presence of SD/eMMC when no card detect logic is available.

This function is also used by mx6cuboxi board for detecting presence of eMMC.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 board/Marvell/mvebu_armada-37xx/board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
index 53408d37af9b..6086996b8062 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -124,7 +124,7 @@ int board_late_init(void)
 
 	/* eMMC is mmc dev num 1 */
 	mmc_dev = find_mmc_device(1);
-	emmc = (mmc_dev && mmc_init(mmc_dev) == 0);
+	emmc = (mmc_dev && mmc_get_op_cond(mmc_dev) == 0);
 
 	/* if eMMC is not present then remove it from DM */
 	if (!emmc && mmc_dev) {
-- 
2.20.1


  reply	other threads:[~2021-07-14 14:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14 14:37 [PATCH 1/3] arm: mvebu: Espressobin: Fix setting $fdtfile env Pali Rohár
2021-07-14 14:37 ` Pali Rohár [this message]
2021-07-15  8:02   ` [PATCH 2/3] arm: mvebu: Espressobin: Use function mmc_get_op_cond() for detecting eMMC Stefan Roese
2021-07-14 14:37 ` [PATCH 3/3] mmc: mmc_get_op_cond: Allow quiet detection of eMMC Pali Rohár
2021-07-15  5:39   ` Baruch Siach
2021-07-15  8:03   ` Stefan Roese
2021-07-15  8:20     ` Stefan Roese
2021-07-15  8:41       ` Jaehoon Chung
2021-07-15  8:02 ` [PATCH 1/3] arm: mvebu: Espressobin: Fix setting $fdtfile env Stefan Roese
2021-07-15 10:32 ` Stefan Roese

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=20210714143729.2396-2-pali@kernel.org \
    --to=pali@kernel.org \
    --cc=a.heider@gmail.com \
    --cc=baruch@tkos.co.il \
    --cc=festevam@gmail.com \
    --cc=gerald@gk2.net \
    --cc=kostap@marvell.com \
    --cc=peng.fan@nxp.com \
    --cc=sr@denx.de \
    --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.