From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB4ECC07E9A for ; Wed, 14 Jul 2021 14:38:04 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2378613C0 for ; Wed, 14 Jul 2021 14:38:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2378613C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F14FE81F74; Wed, 14 Jul 2021 16:38:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="CDhut/2R"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A538C81F74; Wed, 14 Jul 2021 16:37:59 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1D31281FA1 for ; Wed, 14 Jul 2021 16:37:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 6C5C261369; Wed, 14 Jul 2021 14:37:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626273470; bh=TNNOSZpCUMf/7ziJn7rQBPu2QQrMnlOEXeqjthf6AJI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CDhut/2RyixkCdtUjxsczVW9goitJQR23HhPvWuAWT1neMDrLtZtK3b+KtvPSkHB3 7J9QH16YOFzPdwCeO3ex1/UrMXVzDvRmtXJzsoplqyzmA0d5xU2UDZAnvlbKWOW1mj p/zjzdwVo4ZY03JxzKPfQpKXRWcjV54HFpc0B2g2lpYJQC+MA5slAcsgi5xOZx23C1 LV/RnfQantvPqWa9+yeZdKiOImS9euakb3/Bv8TLtbrk/9SQJf1CK0E1Bgo32T+6uR k49kYw5J60QzH1BUIdtcCc5EVjyBYG1kBSI4Oh2UEtjGqSqJQSarnh6QU6gD7TtuSf iAXal7nSFQvhw== Received: by pali.im (Postfix) id 1B736C62; Wed, 14 Jul 2021 16:37:48 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese , Andre Heider , =?UTF-8?q?G=C3=A9rald=20Kerma?= , Konstantin Porotchkin , Baruch Siach , Fabio Estevam , Peng Fan 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 Message-Id: <20210714143729.2396-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210714143729.2396-1-pali@kernel.org> References: <20210714143729.2396-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean 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 --- 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