Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp660437lqs; Tue, 5 Mar 2024 12:26:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVU0jQEeVHBKcz1sPFlG3vYRei7GnstnnKQMOp2cKQQF+CZwbn8qv/mA9ZjJ0aIvyk7MOnVLqerBOYfsUFCg6H3trGADJ7ir6bIObV6pQ== X-Google-Smtp-Source: AGHT+IGuTGflY4TwHu1rj1CR11JhQTg0GrM9D2BxRDYmQEPP8pVPk7MgwjQJxwYRuX5ti7dwlmGt X-Received: by 2002:a05:6512:3c97:b0:513:12cc:ed0b with SMTP id h23-20020a0565123c9700b0051312cced0bmr2687413lfv.4.1709670364720; Tue, 05 Mar 2024 12:26:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709670364; cv=pass; d=google.com; s=arc-20160816; b=drHmlf1zshZZdwDNQnmZsXJvSVdnaB+Zlk0iJ9YtoCG1Agmk+NT6TbxEVVyJ8XU48f UvW9ksZ42XetCcy44x8MF4RG/crjnvlA/aigQgba66rhBLdSmBaaIcZcXqmXsujNfmfa AGt+KZwSPfJAaGkflIcR8Uh076noiPSfrkATb97trwusjhvGaBtzNicYCFn/mUoozWEH yIYKo0nUOKOAulU1GqN/mLK/cDXZdYJr9Cx8Kkzjwfou1xzu/YMs7/Z6kMUPtGV905os UpW/9GnmKP6W7zB+leT/j9tQXbqvQetRO/VnAqxtfzHj7E9k4A4LcSavjWkIBC6vX2y5 E73g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=7rkwWpRocV0m/XYGOYS1P6nI6CyXHVDKpCkYllbjmRU=; fh=j7lw218M085b9rPtj+QACqlnmqhhsdWy5wQ1oNVKNQg=; b=tQRo0vMxVC2x4gw5ip0wC6yK12r3Bh9N3vMS/jpMjljcF9LA9zxfV2qAP0Uo52W8kt BDjr03jVvNG0Kj1L1D0n61V9X0KEkrssT/cXvu90jrCnIXEIS6xW7b605aUQrm21CqR7 PNImzRz8spihQRWoyR485ZleC0zV0dEb9ooTttE88Y33vObYIMZ1UCbmGJBLAeDxF8y7 Ef0MI6SLGxs6BNW4pvlE1FXuwVZFzVQ/CK8AD8/mRPgZdlc9ZAmyAHZDETtG+/LgA2Xf yjqGTCEMXQExBGfmgJ8zdoLOFZigWzU9IjExHtwTjTHvoach7ic9zJnGFcVFP8Lni30Z UpEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-92960-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92960-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x14-20020a170906710e00b00a442ebff480si5172900ejj.443.2024.03.05.12.26.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 12:26:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92960-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-92960-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92960-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6D41B1F2C775 for ; Tue, 5 Mar 2024 20:26:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 52D2B12C80B; Tue, 5 Mar 2024 20:24:54 +0000 (UTC) Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 530AC12881F; Tue, 5 Mar 2024 20:24:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709670293; cv=none; b=jEMfGIJvA1aXFmsPJ2PO5QbINHdgXklww9VdLD+yFgC3vaURMoCLnSJvH+FcNl0ALCpSEf/Boew4rCYeuaAh6+yU+knqoGuZ2IoYbnfGze5ymTlzVgZAqgKp+BmT/5mjOBNJPJPKSqgLiegKCsa8Fxv764KQiwbhYgMgHtxNsTQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709670293; c=relaxed/simple; bh=YaB2y2wN9NfY5eb0MhPB3fO/s+7TOMJVq/CsEjdI+HM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WaQt1cS3wOgwF50qL+CpMinGWTD2TIl1f4nIL5UleMQHj9DuAuMu11vVA2AMJKCvBVzKVLqbHrqrlEgb7tozv/ZGZYqefXG//3HH/rO4J8azWw5KVy1XBJkeGtOVnR0IVLiS59UNDw2ZHnjxKTjZ56joJW+AdLdVh+FTUXvbg/8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1rhbKz-0001RH-1q; Tue, 05 Mar 2024 20:24:33 +0000 Date: Tue, 5 Mar 2024 20:24:29 +0000 From: Daniel Golle To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ulf Hansson , Jens Axboe , Daniel Golle , Dave Chinner , Jan Kara , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Christian Brauner , Li Lingfeng , Damien Le Moal , Min Li , Adrian Hunter , Hannes Reinecke , Christian Loehle , Avri Altman , Bean Huo , Yeqi Fu , Victor Shih , Christophe JAILLET , "Ricardo B. Marliere" , Greg Kroah-Hartman , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-block@vger.kernel.org Cc: Diping Zhang , Jianhui Zhao , Jieying Zeng , Chad Monroe , Adam Fox , John Crispin Subject: [RFC PATCH v2 7/8] mmc: block: set fwnode of disk devices Message-ID: <84aba89131f19c836ad0bc029bb74ea1d6f08d17.1709667858.git.daniel@makrotopia.org> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Set fwnode of disk devices to 'block', 'boot0' and 'boot1' subnodes of the mmc-card. This is done in preparation for having the eMMC act as NVMEM provider. Signed-off-by: Daniel Golle --- drivers/mmc/core/block.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index bd165cef2bbc3..c3e9477743515 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -2461,6 +2461,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card, int area_type, unsigned int part_type) { + struct fwnode_handle *fwnode; struct mmc_blk_data *md; int devidx, ret; char cap_str[10]; @@ -2557,6 +2558,12 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card, blk_queue_write_cache(md->queue.queue, cache_enabled, fua_enabled); + fwnode = device_get_named_child_node(subname ? md->parent->parent : + md->parent, + subname ? subname : "block"); + if (fwnode) + device_set_node(disk_to_dev(md->disk), fwnode); + string_get_size((u64)size, 512, STRING_UNITS_2, cap_str, sizeof(cap_str)); pr_info("%s: %s %s %s%s\n", -- 2.44.0