From patchwork Tue Mar 8 11:36:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1602922 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Lu4496jC; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KCYLC0fgGz9sFr for ; Tue, 8 Mar 2022 22:40:51 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 305E4839CE; Tue, 8 Mar 2022 12:40:45 +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="Lu4496jC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EFC7183915; Tue, 8 Mar 2022 12:40:03 +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-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (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 EFA3E8391D for ; Tue, 8 Mar 2022 12:38:25 +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=takahiro.akashi@linaro.org Received: by mail-pl1-x635.google.com with SMTP id 9so16815866pll.6 for ; Tue, 08 Mar 2022 03:38:25 -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=Lu4496jCzoLsY2NfXw0wV6pG8lvffTCjrYaAM3CYV6RZAhpTnwKMRKgjVv8n55nxet 45idHPKb3kUuBvkxW6/FjHTZOXqiPRhAz00OK4527Yz5RJtwzDTpmf2B21BSid1WMfZL ++zJgAjdcSVQRci8pYGzT18ebflFET4R32zdE1+XICxWQSk85wik6ImXpbSpNsnl3o8u qrGCMZQfBx4j3zvNKBcM+ktvPu6HzjaF+5Zgo2vTV6zbkqmcBoRJKlm3hnh8P35origR CHgenupZ6Vju8jSHTyuZ+WdtdFX0rwIQODUKp/AabNw4uoDD8CkBigld2cJuLvyTfJvK C9Qw== 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=F9V5+LVLw097hWEPXRo1Ha4E9bDg+svJzpI+afc9iZqZ8Lqpf7unmSzH2qXrHJeiJE YQ2jwDl1gxmke+mHrT5+Y2zfAfrGEbNHcTYvoMDCp5mg8ytbKZ5zThRa9Q5CADJ0Dr0Q ka1IU/qQD2CG+dgFxhDJN6fSqAlqDlNaRMKOxRpY2DVdwbh0fk2D9EE5H4iuapGZNHR2 EcIAIFqrFuPikc6XFMCmDJ8Q9vS4c/Upm99BjDqXT4euYaFPLEOO1Mmd2Y5ROFcXUEgG q1CWfln9+qrqfjz/q3I1zs6fBTro0vqHxOcwW+Z4B49xu4VwuYp846KWjx3DmWLvx1o/ H6vw== X-Gm-Message-State: AOAM532B6dVmEKRvOmWYFpP7t2Weughe/ZJg/bqOtR/sdQwJU7Ov71io qO8UeEUU5iH3mt9KziP/BHXoilJnl0SMtjnh X-Google-Smtp-Source: ABdhPJyFzHjHG5dWUPZLzqPBLYOfPsN00dC69KY4L/jBReZHHFS0fAd3tIOf96qMUl0zVov/ixzFPQ== X-Received: by 2002:a17:90a:9206:b0:1bc:30a6:5df4 with SMTP id m6-20020a17090a920600b001bc30a65df4mr4193659pjo.134.1646739504301; Tue, 08 Mar 2022 03:38:24 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:b94a:f47a:3d51:185c]) by smtp.gmail.com with ESMTPSA id z2-20020a17090a170200b001bf2d530d64sm3434677pjd.2.2022.03.08.03.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 03:38:24 -0800 (PST) From: AKASHI Takahiro To: lukma@denx.de, peng.fan@nxp.com, jh80.chung@samsung.com, bmeng.cn@gmail.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 v3 12/19] dm: blk: add a device-probe hook for scanning disk partitions Date: Tue, 8 Mar 2022 20:36:50 +0900 Message-Id: <20220308113657.221101-13-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220308113657.221101-1-takahiro.akashi@linaro.org> References: <20220308113657.221101-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;