From patchwork Wed Feb 2 01:08:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 539313 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp1192579imr; Tue, 1 Feb 2022 17:12:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrR8zjINfBO8ZjTC9J4S+5L+a8l+QqrQ4Pdx0zKzIDPqMxApwdccoHFouM/EwrSwmpCMD6 X-Received: by 2002:a05:6402:2802:: with SMTP id h2mr28263755ede.255.1643764378722; Tue, 01 Feb 2022 17:12:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643764378; cv=none; d=google.com; s=arc-20160816; b=WHdWfzLDowds5jMlvweBomhxYZmAcnTmGllliJx+cH+r+14ueA/gGP68FmzLr8DN2r ANRV6kd+7X5zZntylf8Fwa1cpNIN1kZ8wFE5a1XUxBadLw324R7uyYBtMB34dqubhN/Q cK/ObONXRchL1PRDFR3gQxQzAc4XgWoRX/m/NnIDxvjfyGuB1S125cvrZuWzF3seW+di 2Oe6zhRLHwjc0DThaYcUi2tVNPNMQhkbXdsbkK5YjjC7P0hrttOZyG3qzSQ/fY2wunri s2vJW4eodhnL/YmcGSlSbPAx5U3jV4rwmtg/Tq4F3qDG/y0J0zJFO2c/1bKUrbm92hlu xnrw== 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=YHIS9w8yNUPCY2iopuxE0zXhJkMNeOp6UmbJxhRoxig=; b=JRUit2LrxTXPOfWO91vBPokwvYQT/35toC/qfkSXofuh6MWDHlNxSjAzP3nwWoCM54 W+2nYAQCQArZUAsAQk9BohnYPF9zt/1g6oN9tuwjr4el49hQKz2Eq3DOpkZ5YuSE//TY gv170pzeYPtDuYJa/Y1a4KcZJS95HmQ6lcx+YyivhXrFOfJfLwlugHEFVqUKwSn598Mt kNYGFCoJUFC9tHIDPZsuFTdHhbZvxQsGFK0UAkA1T/jiym62eyD225JMtqz+3p4dw8Rw JrxiMgjoXSKi86gCaPymSX4UfSnfN8lPRJxTgrhzc7VKCZQtKK6FbX2R3K8z3zLVYBxu DPhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d23j2sdx; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id qw15si11777512ejc.315.2022.02.01.17.12.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Feb 2022 17:12:58 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d23j2sdx; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 440DC83909; Wed, 2 Feb 2022 02:10:28 +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="d23j2sdx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6471A8341A; Wed, 2 Feb 2022 02:10:25 +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, T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (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 B43E383855 for ; Wed, 2 Feb 2022 02:10:15 +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-pj1-x102f.google.com with SMTP id s61-20020a17090a69c300b001b4d0427ea2so5189844pjj.4 for ; Tue, 01 Feb 2022 17:10:15 -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=YHIS9w8yNUPCY2iopuxE0zXhJkMNeOp6UmbJxhRoxig=; b=d23j2sdxV6yD7GtAw3LwlnvNAJQc47Mp4ZXmwz2M9ooIp+uZ1fQ7OozdDTR86t/kJz xJIRxv/0EkoVOZKjCHSEggubvjpC8+azGwfWou0RatYw7KcLm+HMJ7a+CdB6IwZyA/Tc jr/gJObXPl2i9xlPb8eGnu/wwBVNj1KvFVDyGbw2RrdUdC6JgP27Ftf/w6QbpSsuDcrF mRSN2ww37m52Hs+blRHGjFr/0JbUzDmKEMLP64wa/JNO54/2ItJXg8IUG1GJ4BMiqUcD s6GWoFcuAjMtxlll0yJDuD0oaYvzFpOh6xLEFIznnZnp5NrIX5te3ZHvBBxCLs9mfQGQ faTQ== 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=YHIS9w8yNUPCY2iopuxE0zXhJkMNeOp6UmbJxhRoxig=; b=m6eNbRBOKv3euQNn2nZJNKbPVO3CT9NQYS82pYhaN+urzTO4ssxCp96koxxS+vEIxX 7tfufy29sdfKjnjy8u4ixVxdx5zh9/U7mZQ7PSLWtdFYfG4rdPcWvnzYcDjbydJLFMaK Tjij3cJf4hXPSJFzq81FGcAwXg/SFlBdone5Dhd7ww9B1+sK3dtZHzoKsTMSySrt55XJ 7lfR79Su8/sKhCBCWp+zPI4lH96WGKaXgQOxKwQ0+Z5k+HQgFEqxLjMp5F00J1NFb4iB VmgnjORYaGM7Uc/vQTEIpoZ/piBpgmCfGMrOySENwIXAPU1SQjs3D2znO3oVBk9q/HeC DybA== X-Gm-Message-State: AOAM531JrVVDmKIUSN0wqM7FoJsLabSUrZ4Z+P1O9zX/L+JzXk+am11U 33lntY061VJwyB14u33iLQkxqQ== X-Received: by 2002:a17:903:2003:: with SMTP id s3mr28094881pla.97.1643764214167; Tue, 01 Feb 2022 17:10:14 -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.10.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Feb 2022 17:10:13 -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 13/19] dm: blk: add a device-probe hook for scanning disk partitions Date: Wed, 2 Feb 2022 10:08:47 +0900 Message-Id: <20220202010853.40405-14-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 Now that all the block device drivers have enable a probe hook, we will call part_create_block_devices() to enumerate all the partitions and create associated udevices when a block device is detected. Signed-off-by: AKASHI Takahiro Reviewed-by: Simon Glass --- drivers/block/blk-uclass.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index bee1cd6f0d80..58dc74e71f1e 100644 --- a/drivers/block/blk-uclass.c +++ b/drivers/block/blk-uclass.c @@ -717,6 +717,10 @@ static int blk_post_probe(struct udevice *dev) struct blk_desc *desc = dev_get_uclass_plat(dev); part_init(desc); + + if (desc->part_type != PART_TYPE_UNKNOWN && + part_create_block_devices(dev)) + debug("*** creating partitions failed\n"); } return 0;