From patchwork Thu Feb 10 08:11:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 541407 Delivered-To: patch@linaro.org Received: by 2002:ad5:420f:0:0:0:0:0 with SMTP id e15csp2039639imo; Thu, 10 Feb 2022 00:14:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzu/ynatl+J96feRHRbn7PfppG9Vw7dFGmTgsdGr+Ln0dPlUFZcuYeE4G7WkyRgfBMuR3GW X-Received: by 2002:a50:8e4b:: with SMTP id 11mr7084312edx.445.1644480887323; Thu, 10 Feb 2022 00:14:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644480887; cv=none; d=google.com; s=arc-20160816; b=o+r7YtJxFyKqyTV9UcwIUshTXO/QtfDdB9uOijxaawYJTNznEI01xh7pkuGp1QJoaZ UFaBVqIGJdLS3bJLwxtvYbx0JNcOClNPyWjqEshp0JdjadrVmRHbbo8OZLn0spjSEgHv syQ5CDqg8yY05ob8DXuf62tuiXug4Gqs08u4Tfc1NinRvIufA8w49d+qgBNvs7/EMLko fdZ24hzZWR8F2cj/N8jcTX/FIaT4jB2hVoRK/PAVSfZWY7FL14KXHYMGRH0j23WI3O4E 0LsIDznKSxmv2ZeRArhCVQosomAiTaOJb2hdSRgIw3N2b4h6dZwJJ4HLIbKQ8tZ+KlRl xpcQ== 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=csBSo+fkTwY8J3c8oJROK+c3dkRdBUbttO0RqUgLBh+OYGlaZIvtvUoBnX4VRdmvEF U6dgxTWFfNr5l29hTNqmZjMfj5fo01m3+KWxPfDAQA+pX5y/2NLQiadxKSuIdES4kPmZ UOhGUlroETfOEemL7GIvd54CMqwLYv0Gvbu6FTa1zQa4xCVmcvaFxJo1A4Kq/BFW8sRP F67AdWfq7MHzva2ubeQRAW5REjElj/MwKexuFGgXowQc7mkbS+BZalaLpA2bDFTB942h 51viRgcLhT2wbdGBWcrsfR58sUBbLEGIElSnkmul4XTqkg/iOxoid0AhhjURBeWMFBjF r79g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aXOtStNh; 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 a16si11214059edx.337.2022.02.10.00.14.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 00:14:47 -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=aXOtStNh; 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 9E6CF837B5; Thu, 10 Feb 2022 09:13:38 +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="aXOtStNh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 72D4082014; Thu, 10 Feb 2022 09:13:34 +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=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (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 2CE148018F for ; Thu, 10 Feb 2022 09:13:01 +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-pj1-x1035.google.com with SMTP id h7-20020a17090a648700b001b927560c2bso3633338pjj.1 for ; Thu, 10 Feb 2022 00:13:01 -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=aXOtStNhqFumjIo08CQykvMzZDiVX7BrAM0i5FwRjDLExNqtYbA25GVkHzhl0+zaet z+nX9vvJky3aU1H5RMdx2gVo7/iz31+MfiyKf+KiM/rCdKq/eNFwXzp4Mah45ZDFsMAD AYeLGaHFWq0LeAWqnP0F3q6kg9+g6tDBuJr/S6lpvmDbGLH8/PCNLhHkdGnqdsxJqaYz ZKO9HbBvs9dvpmBKKl/DqkWzYoOJb+s5LkE06XHpFBaL35R1W30e/s6m4Jt9Wf8zvhvV g4s/cTNr/MezWPSALWY1sq+8fYQDRrVQ1W52UErh5ftzyoO2B3d/sI5DjCAt7+8q+cVB WQSg== 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=TvFIS8rvMBkGMDofbVnrDSbPiOxRKdgWDHMdPDnQ2BR79rbYs4KqTrigHnZTujFcDB sBr9oFchOtk3hnARQAtWzIT6CKbLQvPFpQ91wJl1IW1N7yGApkhFaohrbM/NnvKbgoBI tA+s2tyclZZFVT+W0tX1LB9+LG+mh4A1srfGTpNf5mQnq+3WyP3WxA05XjoWalHeNlOP MP+h0qKKIXPs1I7MNKPHK4CJbaN1WaupWZcpJz0DhZ5k+hR9M1FKetQaXZZGTfveGrCE wxfcSlrxaiOwVNviIsfuQ0EerkqN+mvwQJsRS/wRPDvtWMd0AsGvYjEzp8e1nwbFIQvH 7H1w== X-Gm-Message-State: AOAM532SOUYr73UR3vdhWNHnToUP5Rny/nkBWW+xJariJz2H9YTUBFpk MrlEfiag/pmsmVh5SBEJuaxpAw== X-Received: by 2002:a17:902:694c:: with SMTP id k12mr6456670plt.98.1644480779076; Thu, 10 Feb 2022 00:12:59 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:412e:384:fab9:f24]) by smtp.gmail.com with ESMTPSA id lk8sm1529208pjb.40.2022.02.10.00.12.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 00:12:58 -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 v2 13/20] dm: blk: add a device-probe hook for scanning disk partitions Date: Thu, 10 Feb 2022 17:11:17 +0900 Message-Id: <20220210081124.86612-14-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220210081124.86612-1-takahiro.akashi@linaro.org> References: <20220210081124.86612-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;