From patchwork Fri Dec 10 06:49:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1566206 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=V8Kcx3Cc; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4J9M6L48HMz9sR4 for ; Fri, 10 Dec 2021 17:52:42 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CF6D38348F; Fri, 10 Dec 2021 07:51:27 +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="V8Kcx3Cc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3167B83468; Fri, 10 Dec 2021 07:51:12 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (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 53E738203C for ; Fri, 10 Dec 2021 07:51:04 +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-pf1-x432.google.com with SMTP id i12so7639868pfd.6 for ; Thu, 09 Dec 2021 22:51:04 -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=u4TnVOX5Qtgz+lAK7BS7cMpdxPf+iFXz/Br2DGxN0qg=; b=V8Kcx3CcrT27PY9ZF+cu6F08eV2dETufti6GhFqitUEnW3mqN1S62ksfCfwLFewcW3 DvZQO+cMDdOLTHn9gbUTIRY3XztVh1Uj2IgTQ1auVeu4aKbRDkAL1XCMHq9lCm9eHSn+ NWoqEcxtdoTVF6mNfx0Rifw5lj6lxseDjH8ubApijS7EWmfKbuuyHNoeGMx4UiXo+SBE SuiGtM1lA+YaxXrJtvv9L5QNcZwOgbuP2SciaUpyMYz77wEja0MSh2hLv38SHR7RQu0T YzxgkH2DYGRdIgP0y1gZsIxMbQUFkw23V+4QjImuy/3ujgIAiCRQL84b/iDuOMQ2KUHi GVVA== 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=u4TnVOX5Qtgz+lAK7BS7cMpdxPf+iFXz/Br2DGxN0qg=; b=NdXPhwvqSLmGwwnpLbD/hcYhJaUz92tQds+VzAJHtY+RmO42HdAgZsHUIPdrEHnpe/ VO6J1zN7/L1+hrSl7kyNSc+k/oAIMKDDDI13gh5F0H/DJkVQ/nTEGAIfP7eyUCvAAPNi NSqq8d4abErRA+82Ta/VqCT9ZMWZMCCeCX/E3G2E9c34PcfeoSn2foJLbUl/b7hShkvz +SROOem+j5umSUCQAtOsqFqLSbMh7qz4rIcstHjVWSQKuCJvDDSNzDTp9kzgFXgIgqlP nVg770pUw52Knr40k7JttzT6LjPTPnUeJVjD7+ozIiapUkAeNbW/GfMoMgOk9lNTI7Fq 7LPg== X-Gm-Message-State: AOAM530yCECKX8IsuK29L+NK1RJJjSK0ukqACs9g7pExyYkJd9fjrSHJ 9NZ2WmkKg0HmRONUiBKJBis9Nw== X-Google-Smtp-Source: ABdhPJypzuwkoT9L2AlLumdgsO2bO2eJ0uOWu81sPPg9KcfIVcGBrO9l2SbkfI4jHVDfgF6G6dq7yQ== X-Received: by 2002:a63:e515:: with SMTP id r21mr18374706pgh.337.1639119062775; Thu, 09 Dec 2021 22:51:02 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:75dd:4e0e:4542:936e]) by smtp.gmail.com with ESMTPSA id nn4sm1639035pjb.38.2021.12.09.22.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 22:51:02 -0800 (PST) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de, sjg@chromium.org, ilias.apalodimas@linaro.org Cc: masami.hiramatsu@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [RFC v2 14/20] dm: blk: add a device-probe hook for scanning disk partitions Date: Fri, 10 Dec 2021 15:49:41 +0900 Message-Id: <20211210064947.73361-15-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211210064947.73361-1-takahiro.akashi@linaro.org> References: <20211210064947.73361-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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 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 f7ad90e8890f..90687189e6d3 100644 --- a/drivers/block/blk-uclass.c +++ b/drivers/block/blk-uclass.c @@ -715,6 +715,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;