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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 99353C433EF for ; Wed, 2 Feb 2022 01:10:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BE0778388D; Wed, 2 Feb 2022 02:09:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.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=linaro.org header.i=@linaro.org header.b="EWZyjTIB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E9BBC830AB; Wed, 2 Feb 2022 02:09:53 +0100 (CET) Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8A8358341A for ; Wed, 2 Feb 2022 02:09:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pg1-x536.google.com with SMTP id g20so16918995pgn.10 for ; Tue, 01 Feb 2022 17:09:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y/HBlBYMaKXzB7YtVGHOXtoZiDFLDx7ETJhTTmoPvfs=; b=EWZyjTIBZtQEvrwTM45lPPqGhOFaZxORuUk+Lp79eTsXRAx5IWpGSa7AX25MCAbtWa jGUAGncbDcquiJlLLe5WR7pnePKr6U5nYZMz/H9Aczo3J3Kjja3bQz8qT9H2arwC4T5Z 55H3c9JlLDR/YO1M1Y6ZEvjzrGnO1M7Lyzce/tq4UDzjk3xYa9ZYYNJ/k5HEl5E62vi7 QnwXlfcEwmgk1QrNTJ1v9gMGcyqOwAsupW5PX+9/qPzX3PGsoUwb7nuqGT0Ds7QQsYf3 K3gzlKkpZNLxiawWphHbCj5RV1nHQZaJCnS1iSB9PAlBYPH2FklzSEt3GPvsn9g2q9eT z/Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y/HBlBYMaKXzB7YtVGHOXtoZiDFLDx7ETJhTTmoPvfs=; b=aH81iUz5kt7Kx3aiMeauEKzDZMyz/YIvOmVA7AsptADSQ2Nv9clTwoSyujZkhJV5GA RQoUovl7CNK7x3kNpctrTWwJ68bWF47tfNN/mHhXoc58XrlUMB35oSbdUz7BvE06PuyB zzaOZBPglOLbgPtvPETIl7z74jxEnKVVJIZo5E/04r40dBxhb3z7IDDymb98aTBGSgSU BSKRSlfKJiXCRzF6ixkPTshW1Vtwb5VFIpucKuT+RiE2I9S1cLPqYV9wUNq/ufskcRx5 YAlkKHApU7KniuAbPVZnnI/ClxligCB7vSuA7Rtp59m3zFsm11ED4r9YebxMWVlmhqSY KpLw== X-Gm-Message-State: AOAM533TT2WoQHhak5/EjKzLFbUq4A1fejQUtyiYefqOjgHFgtSa623Z e232xhAXY+JQMFG8lUneb+MCEA== X-Google-Smtp-Source: ABdhPJxvdpE7nMWjF0nN2AR3DihFqrdOTADPpGE0WzqydIeOViVWUVJru1PAHOaPZtdmyqajUD6ADA== X-Received: by 2002:a63:af08:: with SMTP id w8mr23234301pge.1.1643764178811; Tue, 01 Feb 2022 17:09:38 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:314e:b83b:fa90:7f2e]) by smtp.gmail.com with ESMTPSA id f5sm10761429pfc.0.2022.02.01.17.09.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Feb 2022 17:09:38 -0800 (PST) From: AKASHI Takahiro To: lukma@denx.de, peng.fan@nxp.com, jh80.chung@samsung.com, bmeng.cn@gmail.com, peng.ma@nxp.com, sr@denx.de, xypron.glpk@gmx.de, sjg@chromium.org, ilias.apalodimas@linaro.org Cc: masami.hiramatsu@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH 03/19] mmc: call device_probe() after scanning Date: Wed, 2 Feb 2022 10:08:37 +0900 Message-Id: <20220202010853.40405-4-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220202010853.40405-1-takahiro.akashi@linaro.org> References: <20220202010853.40405-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean Every time a mmc bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro --- drivers/mmc/mmc-uclass.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index b80e838066ca..e918f58a212e 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -467,6 +467,18 @@ static int mmc_blk_probe(struct udevice *dev) return ret; } + ret = device_probe(dev); + if (ret) { + debug("Can't probe\n"); + + if (IS_ENABLED(CONFIG_MMC_UHS_SUPPORT) || + IS_ENABLED(CONFIG_MMC_HS200_SUPPORT) || + IS_ENABLED(CONFIG_MMC_HS400_SUPPORT)) + mmc_deinit(mmc); + + return ret; + } + return 0; } -- 2.33.0