From patchwork Wed Feb 2 01:08:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 539304 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp1191366imr; Tue, 1 Feb 2022 17:10:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzNehlyBteLRRuolt8V2ovf4iRlhdrVOaxWh3eFNK3THB+qLQWaW6Tp2S4pifvSxaibJ9YC X-Received: by 2002:a50:ab10:: with SMTP id s16mr27483216edc.382.1643764234522; Tue, 01 Feb 2022 17:10:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643764234; cv=none; d=google.com; s=arc-20160816; b=iIMgC6VhCRKZcwliRuU2pChcCqhaduTbmhL1GuLoy+t75yW+FtDrR0yMJeFvzqSMl/ Ekpb1YmekogXDayoo89jRxiyKpyfNM9HEJivKUmFqDa0Vf2i0jaieNULzYj1gdyGyw9l kFw7fQ509DuZn9GlXEvxXGoP3mmTOZoaVU0zZXlzcoAMQ02c0U/HcrmHKOkkWjj/lzro rYl56shjiZ3/IJkz1erm3Ub/Kew5QCpPPnN0CemqEjpADMNct9XeZjlTIuWvE+UlKmgG 7i5WmaO3JVq+kXZtvNjO18dQ8Di/34NJxcMRRag9hhxIzGmn197HeTHQlLL6I2/0Detb z09A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=y/HBlBYMaKXzB7YtVGHOXtoZiDFLDx7ETJhTTmoPvfs=; b=VfS8D5/8cJhiNMici8j1OBQwIemu5oDrj3zTShgykCKAn3wCLtg+QXMWHFaoHtSime brkWBetggXNxunTrwmQSBdgQUDZh/tdAO9fmTvMp0LGz6ZOWZEV/UpA9t35RaVfkHf/5 lnyKT1ML6XrxCyphcIzUwp5RO9E3oS7rHefB6Rb1WBSJqOI2aLqWFZqdxxXFdpIeAbBx PMkqx4usEMvzEAmp7cBPj2lBPYtm5QkWI81wPKy9joekqWZAquqD/yWgqi0PC0hnstyZ YTDmIqhuD8Bua6KeLEy6R4/ke834OIK+Lfo3oce6fq/+W58u+tYEjJGeNVYEFGxcIzNj zqyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EWZyjTIB; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id g1si13680923ejt.939.2022.02.01.17.10.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Feb 2022 17:10:34 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EWZyjTIB; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 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-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 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; }