All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: "Pali Rohár" <pali@kernel.org>,
	"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: Re: [PATCH 2/3] arm: mvebu: Espressobin: Use function mmc_get_op_cond() for detecting eMMC
Date: Thu, 15 Jul 2021 10:02:54 +0200	[thread overview]
Message-ID: <29048674-59b8-fcaf-2bcc-c671dfc8dd8b@denx.de> (raw)
In-Reply-To: <20210714143729.2396-2-pali@kernel.org>

On 14.07.21 16:37, Pali Rohár wrote:
> 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>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   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) {
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

  reply	other threads:[~2021-07-15  8:03 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 ` [PATCH 2/3] arm: mvebu: Espressobin: Use function mmc_get_op_cond() for detecting eMMC Pali Rohár
2021-07-15  8:02   ` Stefan Roese [this message]
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=29048674-59b8-fcaf-2bcc-c671dfc8dd8b@denx.de \
    --to=sr@denx.de \
    --cc=a.heider@gmail.com \
    --cc=baruch@tkos.co.il \
    --cc=festevam@gmail.com \
    --cc=gerald@gk2.net \
    --cc=kostap@marvell.com \
    --cc=pali@kernel.org \
    --cc=peng.fan@nxp.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.