From patchwork Fri Apr 15 07:15:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 561941 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp115350map; Fri, 15 Apr 2022 00:17:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhK6qsTG3ICpKd9760sBAdiWnjdkZCW6OWYro4tu7W84mzJok3aqYPHNl9hDndL5UXgtYa X-Received: by 2002:a17:906:f85:b0:6d6:e97b:d276 with SMTP id q5-20020a1709060f8500b006d6e97bd276mr5157563ejj.431.1650007029840; Fri, 15 Apr 2022 00:17:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650007029; cv=none; d=google.com; s=arc-20160816; b=nZBzCDroC330ZyS0X1gwJB6EF/wmC+3Q29MbyNxPJoQ4x/O9LFh7Di+4jVrvjmbSPZ jJKEFyeU66dkFkrO3aZmh2v+lqZH6li+NKu4nkQvjgF+mXDBKiNTSw15VpoPYUOB75I/ Btc7eTRfobtF264PQzVinY8NQ1NVyvOBk6P3EIiT+7CMXNF48V8sdXDKwIKRcgh7Gvhw vDH7hCt+n0IlA9sVEWoZpiWAZ11FkhEZRAt33u8VAI9o77Xa8Lq5QPcpqNKEbMqitMag xgk9p0EuEBNWY61o9kNJHiJbZSnUvCPeBWjk2i0zNXxwIeiLNtrD5HfkGcQPBpfttHsk Hp3g== 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=S0em1TOpCoAJakdRKKFEDXoGK1Fmysrx+T8HujuYynsmDs4iFRYLwEZEYLRcce7w2n zaxc7fODFLcUdqrDaSY7J7Cqq2CA8LawWraiwM6TSEg7CiKROKeTNnWKiDew3hKH2knC bzFRSxhluNU1hYIPbHDIlUW/Z7D5msT/9ZH+cer0We7j7Qad5SFUnNk2OBi1WCXba7dL 25FVGAyEZQJ2z7UEZvnIztzGjauGBU52e4WQYSTKyY/rXxxr6xdZZ5Q4oKD150za2nT3 T0PmNbf1Ix3xVp6bH9H/OdqXar6MleaK5cncS5zRWGspRTLVKKMlTq8kesze0FAIZzSL O07A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KBQwGW/i"; 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 l24-20020a056402345800b00418c2b5beacsi542823edc.398.2022.04.15.00.17.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 00:17:09 -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="KBQwGW/i"; 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 846AD83C0E; Fri, 15 Apr 2022 09:16:37 +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="KBQwGW/i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 77AE883B4E; Fri, 15 Apr 2022 09:16:31 +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-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) (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 B861D839AA for ; Fri, 15 Apr 2022 09:16:27 +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-x52e.google.com with SMTP id r66so6718379pgr.3 for ; Fri, 15 Apr 2022 00:16:27 -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=KBQwGW/imgorQtpEKwZmI75e9i420R4ckTTB+J87HqccrObAtBlH97uOra4jokKcyh SQFJi6lDMhb2YuMPabOe6pVaesTfilVB6T/BLYVpo3kQMUfX+vaKCuOVCnhWwgX6okFj ZbI/F2ccScUUreymMkV4xkOGKLC+7GXtRcA5s0asz5fBQ97roAevlRIdFnEEMODctvpB 5Pz9jV/f+r9EIUz3asl032GCOjl8bRMxGW9TK7N+ZEHgVKF1OO9WfFSBQu+zctjo0yf1 tQ2ctfSFF2EFZXJFFAud12TfFYvGG4NfIjM4sYwUZ8hpkC6Lp9MEQYnV3heeKWx7rhwz N4QA== 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=w8bP36PG1pw+qY4rXZDY7kguPkCKePugG2P8IZRpcPN2T7ZUidtp75X1PeXEhNqBq5 ZUUJYUXGJoXKDxv0EcQhvN8geqrIYHE8wD/h0jIAvoZYD0PP7A0Zk3cU2iRLKkBj1ZMA tHFjR9VRUgi8RhadkNY/4az8UKCq04OIrg6YUtBlBlY9IclvSXkTOBiHR3BVnjiGLECu pec5v40N+ip9EPvJvC/9lHIuPHrjcjIGt9rV/HZdfG93A2GfC9N0lnLzOjvyzxcxcgol w8l85QUpTyuHkba3PMyS9BGGXD92DQw0nolv1mOanBdN9Kp8NWgydSG60wyaDp/CJCmz 6hUg== X-Gm-Message-State: AOAM530LpmhEVnnuli3k7nuSi9ljHX4/QmNIb03BPGSw/3gKbBDzVN0l pN1r9+6HWs1LXUR5N5FqlCNN2w== X-Received: by 2002:a63:2b0b:0:b0:39d:890a:ab68 with SMTP id r11-20020a632b0b000000b0039d890aab68mr5294638pgr.247.1650006986173; Fri, 15 Apr 2022 00:16:26 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c3e1:100:18f3:1e4:6c4:6ea3]) by smtp.gmail.com with ESMTPSA id p1-20020a17090a0e4100b001ce188720e5sm3566921pja.53.2022.04.15.00.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 00:16:25 -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 v4 05/12] dm: blk: add a device-probe hook for scanning disk partitions Date: Fri, 15 Apr 2022 16:15:39 +0900 Message-Id: <20220415071546.122475-6-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220415071546.122475-1-takahiro.akashi@linaro.org> References: <20220415071546.122475-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;