From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AFD6C4338F for ; Thu, 19 Aug 2021 03:51:13 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1D71A600D4 for ; Thu, 19 Aug 2021 03:51:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1D71A600D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4AC528326D; Thu, 19 Aug 2021 05:47:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="TChiFY5x"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 58330831F7; Thu, 19 Aug 2021 05:46:54 +0200 (CEST) Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) (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 9631F831C8 for ; Thu, 19 Aug 2021 05:46:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x22f.google.com with SMTP id o20so6606474oiw.12 for ; Wed, 18 Aug 2021 20:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WpV0+C48JJuC5pMxUtIJed+v2bTnaECVJdjdJHhnwZo=; b=TChiFY5x5CUbbNkCaK/lXuK5jaqWXEJUIkm8DGVySMnUPkAV/ieu2+lCbuNdTtNHQA 2FZ81sZAS2/3mYZRCxSoAWBjPuN2KgAX7YMFobeSzicu65SnUeT9DJXchsWfD1T//yfk WK8hbtdpo6aFpvIbpAqDk6xFz6goEtcY4TI9k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WpV0+C48JJuC5pMxUtIJed+v2bTnaECVJdjdJHhnwZo=; b=EjxLKp2+LH8ViK2IOTfl+POR1cqjirY/1HGSw49KJdnPJGOLS6/NbfNVv4hW1h5p3/ ptwhPSpWx0rK4N3tBV6/l+oPXQk+69Mv1g6IYX8bMGk7X8EhznrS7yoaj0dwYkdre5Ng vISOuI/3k2W1YP6/pzO+WgHgkXw60lpTwwy+yJrPTnAJDPg2X/MN6BzMQhw1bYk4YjEJ Mf0l9VInG73x+q0Vn7Z5y5rq9V99G79g4NIDya401fugxEfXhPbsIWtwnj2/m+mr2Qi7 yWFGSdFf+wNIpbbsMOoiEvaU9DJJtFSV7q6f+gol6tORPYaL26buu9A1ZIoD77yhsq/b eHNw== X-Gm-Message-State: AOAM533Bbfty2vYfkBs87fi3kXlwKuH6kggPYmsfMfK2BTWVByIs9TFX cAm0CODlmpLy69yak2phxLO8WS2kVxZAag== X-Google-Smtp-Source: ABdhPJyJ3RVsG+9sA5osajYu4KXR4NFDff2dhIGKIvKLg2aa4UEzWjJFxK3it9s+9OtJnRxofdm0tQ== X-Received: by 2002:a05:6808:5:: with SMTP id u5mr1213051oic.35.1629344800111; Wed, 18 Aug 2021 20:46:40 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id q3sm370025ooa.13.2021.08.18.20.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 20:46:39 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Steffen Jaeckel , Michal Simek , Tom Rini , Dennis Gilmore , Daniel Schwierzeck , Lukas Auer , Simon Glass , Jaehoon Chung , Peng Fan Subject: [PATCH 25/28] mmc: Allow for children other than the block device Date: Wed, 18 Aug 2021 21:45:58 -0600 Message-Id: <20210818214547.25.I3b044625feed74528dee0553a04dd0dc211877ef@changeid> X-Mailer: git-send-email 2.33.0.rc1.237.g0d66db33f3-goog In-Reply-To: <20210819034601.1618773-1-sjg@chromium.org> References: <20210819034601.1618773-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 At present the MMC uclass assumes that the only child it can have is a block device. Update this so we can add a bootmethod too. Signed-off-by: Simon Glass --- drivers/mmc/mmc-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index 0e13238c7e7..9e39fdd6c44 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -320,7 +320,7 @@ struct blk_desc *mmc_get_blk_desc(struct mmc *mmc) struct blk_desc *desc; struct udevice *dev; - device_find_first_child(mmc->dev, &dev); + device_find_first_child_by_uclass(mmc->dev, UCLASS_BLK, &dev); if (!dev) return NULL; desc = dev_get_uclass_plat(dev); @@ -422,7 +422,7 @@ int mmc_unbind(struct udevice *dev) { struct udevice *bdev; - device_find_first_child(dev, &bdev); + device_find_first_child_by_uclass(dev, UCLASS_BLK, &bdev); if (bdev) { device_remove(bdev, DM_REMOVE_NORMAL); device_unbind(bdev); -- 2.33.0.rc1.237.g0d66db33f3-goog