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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 085C6C433F5 for ; Fri, 1 Oct 2021 05:03:49 +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 10E2D61A55 for ; Fri, 1 Oct 2021 05:03:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 10E2D61A55 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 732AA81FA9; Fri, 1 Oct 2021 07:03:22 +0200 (CEST) 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="hQqDj1Vf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8DA2E82B9F; Fri, 1 Oct 2021 07:03:11 +0200 (CEST) Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) (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 E5C5382127 for ; Fri, 1 Oct 2021 07:03:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pl1-x62d.google.com with SMTP id c4so5536334pls.6 for ; Thu, 30 Sep 2021 22:03:04 -0700 (PDT) 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=7OKUttBQihWNcWyMidD1s3fR2TfffMDvW/RIGoolU3A=; b=hQqDj1VfnZCqUjnRWdFP1qw/n2W3fe53/VhRz7HleaqhIGgKOi4ENEgApewaa+ji9C 1cgYXq4qDDPLIMu0FHmeIQzmGN540JkOp8CUSs13I/gulmoPLm1sEA6UT3Rq+A7WQVIK L0R64lIJh1SATHBbUn/GoDZuAGO1t0WacqeB/yLpayKZLDRUsYeFDGRUm/SQKe4Vla70 xyvt6/YlNg3shoUu6i7qrA8Yv4452faC6LCtQuAtyrjsJ8N+fAA6kFcLjmY+nvBjhp72 GoS/bMaumKstH8W6V0E2b8pr/jK2K/S7mt0DMSWbeUQsVBWPN7+6zf4f1U7Hfbyk/D9k Nk7A== 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=7OKUttBQihWNcWyMidD1s3fR2TfffMDvW/RIGoolU3A=; b=YjOY/XlqbV2GC0enSQ1ctrNLTfIS3pdWuYtCZCYaXEDF/pzmFEqhGpRPYikRJGseft Gx/Hd6bP+oR5vVqRpDbv/A/er48E7Fb48KhmHZH3xFm6t6eYpA2fACiSbWRRjxitQmrN fURJsTDdTHgZRW9b1RUeGf7Li/x/QwRO1ZVX5dOywiXAkDIRJU+hfMyrwXewPlIpgN2R Ygf/F7izpVJwMtIlf6Jw3UvqEtyKT7/3AlFC/Y5UJNkS+RtKRznT/bDbwRAVm0aNsbwD qZ8EF+OTBX3RIwk+BL+BLCSuL6SUG2A4/6PaM0yOYgGh54BU1ujccpGv3ZAJMwYaZDJj Dx+A== X-Gm-Message-State: AOAM530IkmO2NxL4eSvfl/CJlkoR8v662O+ShTeSOLyuveDh6XJ/w46Y V2l8f5syUJ8kn4++USqttnIPDw== X-Google-Smtp-Source: ABdhPJy75tNBWhexR2OacVQRYrvBGMjGU6DVFe+YZQ/r11pUuhxS0PujMoSiB6Syl/czerlZxmQ7Yw== X-Received: by 2002:a17:90a:1b2a:: with SMTP id q39mr10869371pjq.219.1633064583083; Thu, 30 Sep 2021 22:03:03 -0700 (PDT) Received: from localhost.localdomain (122-100-26-52m5.mineo.jp. [122.100.26.52]) by smtp.gmail.com with ESMTPSA id z8sm4615113pgc.53.2021.09.30.22.03.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:03:02 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de, sjg@chromium.org, ilias.apalodimas@linaro.org Cc: u-boot@lists.denx.de, AKASHI Takahiro Subject: [RFC 03/22] mmc: call device_probe() after scanning Date: Fri, 1 Oct 2021 14:01:49 +0900 Message-Id: <20211001050228.55183-6-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001050228.55183-1-takahiro.akashi@linaro.org> References: <20211001050228.55183-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.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 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index 3ee92d03ca23..07b5c1736439 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -418,6 +418,13 @@ int mmc_bind(struct udevice *dev, struct mmc *mmc, const struct mmc_config *cfg) bdesc->part_type = cfg->part_type; mmc->dev = dev; mmc->user_speed_mode = MMC_MODES_END; + + ret = device_probe(dev); + if (ret) { + device_unbind(dev); + return ret; + } + return 0; } -- 2.33.0