From patchwork Thu Mar 21 19:35:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 13599313 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 10A6B134720; Thu, 21 Mar 2024 19:36:06 +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=1711049768; cv=none; b=VHdSxcDKUM8QfpiWR1+EJgYoOhYMaLBn6UcTlLrCnpzZATe/lT7ZHhNeXOFr4oOX3CeNYZ+NH+m7b524Xc7M4M8ndQamjbr/KquHjDEI+Z9wsfxAXkJT7iDkaJSVrd7s0m69IBXkpr34O/AuM8sdLHhWJnXdfz7/cSGsDwZ1zzo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711049768; c=relaxed/simple; bh=+WqGCWepyys8XN9kGbVvy3zBzdke5WnUfuDS6v5KvYo=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f3qq07u+KpC7uGj71TvbXuq0wK6TSxTTDAU1dhyYwNbAUjwsrTcKLglPSWfnhZMQ7ni06Pd3+52/Rr5/gDEz3eWV4cHZYL4va/+C0i9A+vEx+rdkJR5cke9LtfwIfZ32AeURmAt1Xqeh2W+XkDdJvFh4vMOfA/VueQ69K6NUugU= 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 1rnOCZ-0000KR-1x; Thu, 21 Mar 2024 19:35:47 +0000 Date: Thu, 21 Mar 2024 19:35:43 +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?= , Damien Le Moal , Li Lingfeng , Christian Brauner , Christian Heusel , Min Li , Adrian Hunter , Avri Altman , Hannes Reinecke , Christian Loehle , Bean Huo , Yeqi Fu , Victor Shih , Christophe JAILLET , Dominique Martinet , "Ricardo B. Marliere" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-block@vger.kernel.org Subject: [PATCH 7/8] mmc: block: set fwnode of disk devices Message-ID: References: Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 64a3492e8002f..5b7dfd4a21fa5 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",