Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1019432lqb; Wed, 29 May 2024 19:16:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWmHHJj3CEgCmn6jdbNpLZtSvocqBZzlQGXgjI7w75D9YUEpol8gmdFlEepRpur3mfJmxgQb0ommQWrTZI0X6uVczzc6SBVu1z54d19pA== X-Google-Smtp-Source: AGHT+IGnatxVKr7KyhPmOyWy1WbMgDF2XQ8hyeGjhTBnADCYd3wShz236YbtDxzQHjQtPqyayeuh X-Received: by 2002:a05:6214:3288:b0:6ad:814a:a2a0 with SMTP id 6a1803df08f44-6ae0cb235ddmr10425606d6.26.1717035397765; Wed, 29 May 2024 19:16:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717035397; cv=pass; d=google.com; s=arc-20160816; b=z8s1cS7SeaOa4jNJKbff/SuRhtm89z6NQZdqSgm00dAvKld9PLlSwCIqK0NwENQIK0 96sDx27cGrYz3WNCs71LAuXzKeviDqcpmaRDCLZ2aztUsZ8AMgVc4YDnBdyzo1QSfFWZ eWTh9NKXvKi5xtFQfFn9Je80Bp5A3vQGs9LGoIIUh7jYxEo7v4FMPD7hqagwodZZilyt 05Y2wrysGTpx3tYwZM8+jRCVkqym2LLbL8i6/7/pAkfQfEe+E7+dF4yWe357Yj7yPY0Y PBnrzU5pz4npNV/Xcy2VWJgNJbp6LsJ2tp2ffutGbH7h7GrM/CUSrA6w9LNaE7s0oiWD Gtdg== 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:to :from:date; bh=PHX1NEMAscb4kWE/ZVRTaVEPgj9Yb2Y6tIApEIJtbPA=; fh=PTscWTIHcoR2vyQtw5VESTy9e97dUqI8eGwoqj4vbiM=; b=WWeGAjjMmmUJPHZz9cgLfbFrnLu25saaORk6fwvRK9deYyxRK4TP7S0S1s98X3AswQ lwkIEuNZc44MHdn99cKimHdnRF178EoN9sQcrwWOc2xpMe44Yy00XaSpBRHlIeqB/ALH NH4twefhqIowyroa0jJBvn4GxD1yp5n3P/68PImQn5guqPUmYBWbxxtMy75m1UIOKKaD +xXhgAmAn0LKj9yEIKIs7Fax6DMtmvggQ3KmcZEOHBoNDpBklZZoc9g728nvzONdEJU8 b6JANaExQlw1/cMZJMJrEuNX4GRiD2ZGGZRXL3NtleZOZlAsrPNFFJZqmGpPF/wkaryd TpJQ==; 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-194884-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194884-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ad752e40e1si103949416d6.537.2024.05.29.19.16.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 19:16:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194884-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-194884-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194884-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 558D51C23617 for ; Thu, 30 May 2024 02:16:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 341BC224F0; Thu, 30 May 2024 02:15:51 +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 522BA3D57A; Thu, 30 May 2024 02:15:49 +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=1717035350; cv=none; b=T5EU8eGdqALO0cHJWc7VJTSu3gIC/odDEzZ53MNGVzCuiH5Wuag2DBjuql3tLKt5F+/prTaNcQzZWrty4sWy1CVYgHs9WOKOrNuNxKeu3fh9PrF/gBo9ZKXlC5FLykVjIpCeyDTOOvWSdTJQf34o6B/2pVJ7TX8i1c2Bl3dvvrk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717035350; c=relaxed/simple; bh=jUdRJVyoIcjUb4yayy/yqSHIWyvEbd3XvWtltACDs4w=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cV+ThJ1aRtEY+hFtAm16c13e1KrDc89GimVNu2mhRUX/OJKTyYuFKKi/TnSjFY+gRBYFUltPWknPQ8M+FP/tWEZAkDW29UuWyUTSG10ZJ4bydvSEPZyIjFmIMJgEg4GXKb2fum6ttJ6WmhNwVOVyTCjGXj1qgQUr12ykLxInRD8= 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.97.1) (envelope-from ) id 1sCVKO-000000004is-1sla; Thu, 30 May 2024 02:15:40 +0000 Date: Thu, 30 May 2024 03:15:36 +0100 From: Daniel Golle To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ulf Hansson , Jens Axboe , Srinivas Kandagatla , Daniel Golle , Dave Chinner , Jan Kara , Christian Brauner , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Al Viro , Li Lingfeng , Christian Heusel , Min Li , Avri Altman , Adrian Hunter , Hannes Reinecke , Mikko Rapeli , Yeqi Fu , Victor Shih , Christophe JAILLET , Li Zhijian , "Ricardo B. Marliere" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-block@vger.kernel.org Subject: [PATCH v2 8/9] mmc: block: set fwnode of disk devices Message-ID: 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 367509b5b646..cd3ee6d69aaa 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -2463,6 +2463,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]; @@ -2559,6 +2560,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.45.1