From patchwork Tue Apr 19 01:05:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 563298 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp2860505map; Mon, 18 Apr 2022 18:06:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgNu4TWF1yaY2wJcw/QKExI9+XIjBkc9MDc7FL4FczT7d+ro3pJWjbcqyRL/kZ4TjNt+KG X-Received: by 2002:a17:907:6d83:b0:6ef:db74:8b9b with SMTP id sb3-20020a1709076d8300b006efdb748b9bmr891593ejc.561.1650330396191; Mon, 18 Apr 2022 18:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650330396; cv=none; d=google.com; s=arc-20160816; b=M7ERvDlae4c/mFoy5kmWTNhrpINIqTYbjiL+OetZm83S4WUV2o6725BR1wFj5HeZjL XHr3t1688fUgGLv0jBK73eI4DST3aupwf+ToayrrMvNOjndDKYhC38CCwuVDNV0a6bLf fgreSvIPAK5qVS9bFkUFELrfkrFtEMnroiaD+GG0Qyjf4OURvhtly7/ZevTsmg0N5Az9 jmsEYyfuZJ1mti6zzZ60lfPf3rz2elovmRcqLzWOCBEx3V7SdWzW8E3kDryx/94ZIC3Y X2KDHaRMRJ0aWMVqDlIhk0As+g+J76fmx4WxSnQdMb/PWLVQHiYoPxDQJKbjAPCI6lJ+ g8aA== 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=2+O99jPAsVE8MNTnpcalytHrEjhAeCo2wBfrWozxCMc=; b=0TjnB38RnTjoshv5NY+7NXAlUP621CDG3R6WfQJNibTRkM17dHmeFEL+KgYiSR4coC Gw8DTaeyffo3F0SOXZi8Eq5bBhGkie4TKizaN3LT+XmtyRs2s1x6GOAP5T3gbxcYTWia O0cyfY8O9jKSffOPsQ5bWQ+2tCRuxt5DFM+1zNEK54sj18dRD8lbL6JlBSJ8IU4UD1jG +gnqeOLANd/O8JTKFiAq4pOK0UxiYNLPcCXMsFvh+4RvmDFMCCOafbDtX6aGPFtyJ2Kb teb9StyDWJiOP2icCeGCd5ZK38LfmmLuuBIOJq1ZBkJV2jeP2EQmUR5M9fcuA8ox9UGF /Ppg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ih8bbXir; 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 a22-20020aa7cf16000000b0041d6b8a6d9bsi6919040edy.559.2022.04.18.18.06.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 18:06:36 -0700 (PDT) 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=ih8bbXir; 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 779B983D07; Tue, 19 Apr 2022 03:06:13 +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="ih8bbXir"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BF7AF83BE5; Tue, 19 Apr 2022 03:05:56 +0200 (CEST) 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-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) (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 1C69083BE5 for ; Tue, 19 Apr 2022 03:05:52 +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-pg1-x534.google.com with SMTP id k14so22013164pga.0 for ; Mon, 18 Apr 2022 18:05:52 -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=2+O99jPAsVE8MNTnpcalytHrEjhAeCo2wBfrWozxCMc=; b=ih8bbXirohMeDXqqn12ALzJiJEg9K/juWb5ZeExm7XuwxkDxC5lJyl5A0YLsJLmhyA SwNyU6asfndJLih+oIy10XQljczwIx8sHoOxJvlguFlnX9+lkxBiCfTlEQxM1qKPjd02 1xfkeFjz7KCMqe3kkb8XAObay1l2wubogwBXMsTwPQ73lsB44OTaTxj/QTNQKg/OV4Rn nTBo3WPhkN5WmVGKGYdkN54Ld+lxXc4y6eXrhm2NlFSTQWOej5ZYk/FlLhe9Pvf+43Rm 9oS+/M6M1yPdbtL3iUO0jdpm4Go9q4rgyvNbh5xkoFx61k75jbmpKVz1ukxsKBF5vwqO bzmA== 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=2+O99jPAsVE8MNTnpcalytHrEjhAeCo2wBfrWozxCMc=; b=HUrrWu7Iphi/K/VmBEhEfWITqAAOIbE71mVo1edmCgQAkDuOr+l/NfOxelCVdDwFk1 L2nDozIjFFHKdioYIp48fhzXaJBD/svMz1MXexBtInTSfWtvScNXPYmPA1YN4S+vO8Y4 W94ask2P9r7sAZ5Q9OMYGwO5ZtdFctwrHCJEpBt4VEB5YHHqy50bkAayW+f7sCOshfLG gw1LReSt5xM0Tk0D+8+vvWPykMrz0vjTmpxQ9ZtJLmmXCCEdX4iKvdNXgZaxWOdmtCbL xBRr0GyNgV81LscfH64XLuuecPPU4y87VYMTWq/RKdh+snUVXlgLG/thH/GV/VrIyHpQ M7TQ== X-Gm-Message-State: AOAM533btNPOVDUBr8nsqzONWRCSVRApZ3MBNPgbJgPKEVUL/R4ei/Ww rudP0hFboqmy/aD1KLnl47UyJIJgBJy7fw== X-Received: by 2002:a63:5007:0:b0:3aa:1670:e327 with SMTP id e7-20020a635007000000b003aa1670e327mr3947331pgb.124.1650330350537; Mon, 18 Apr 2022 18:05:50 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c3e1:100:5858:d3a6:5cad:ceeb]) by smtp.gmail.com with ESMTPSA id k137-20020a633d8f000000b0039800918b00sm14043756pga.77.2022.04.18.18.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 18:05:50 -0700 (PDT) From: AKASHI Takahiro To: 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 v5 05/12] dm: blk: add a device-probe hook for scanning disk partitions Date: Tue, 19 Apr 2022 10:05:10 +0900 Message-Id: <20220419010517.47175-6-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220419010517.47175-1-takahiro.akashi@linaro.org> References: <20220419010517.47175-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 f1e4a8564679..791e26c06ebe 100644 --- a/drivers/block/blk-uclass.c +++ b/drivers/block/blk-uclass.c @@ -741,6 +741,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;