Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8775904rwp; Wed, 19 Jul 2023 15:25:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlFTECAE3PJjAnqZANd5JnpiJC9NeEsk69+bpqZ2tb/7foFY/estba+Wi79Aav0wsqW2hwdQ X-Received: by 2002:a17:906:7a5a:b0:993:d53b:9805 with SMTP id i26-20020a1709067a5a00b00993d53b9805mr761917ejo.11.1689805512472; Wed, 19 Jul 2023 15:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689805512; cv=none; d=google.com; s=arc-20160816; b=e33BdMIrPBsmo61YyDpthEK29Lx1j6tAN1TqQnR8X5SRDySo9GmPPntjrqzB3Tz9Li FDzg9DC2j98RD7gxBPP/OlSFMFi5nKfm2CKg8a/GeCzoAAOMNfJzKbNbDoCXqHoIdAic I8CQ96yWYL9gV4iFgve5pHY07DTwUrYmdW/xFu3SC72lpFPPLFN7byg6tjfGovqoNIRL LDBDo6U7/WDb33J4YxEHMp1kHJ6xpAjH5AH72TC13/VNC4Ef4HwPr4D8xT0L/2WfYmIC ZYOgOxg62U6FqOXTHgKvgYNQAAMdD7hpigI8eUINHU2/MV7t9O6rWsaEmxJ2ScF8cZxk yqTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date; bh=tXYT4uAYKkmC7cZff6dBIrrvsJsYT9JZconVxKgdMQ0=; fh=O/hjEvlM0nIN8LC6WbIQ4s0L6nmnRMOzajXXMF81As0=; b=oCRucd+de//4wafo4N5pFCkSbYhQcUofS1kVYxfHWXZu+C2GI4ixomCHgR3yJng8ko NqQTbe0AXrJanAm5dHClJYx5shtAaYdiZbDCui+ISZOa6DhmGtDvW2QKMMDN1laY2Dsu YUqrzCAo2AphOFQSS75/2lWj5ZQAMtOIkvo51mOdXMzmCNt5p8hYlVF9GOaxGQsqNiH7 VzESJeDnWMRv2cEnhV2Aff1JEqB/LjWcDkqrCkHGsR52W2eY9fO3KN47iEbBQpFP1E+/ 93lnaQ6KGCQZ1tjSbO2ehSPNWwh5Q1LgwBJPbcw+xmH1GbTJVjD2MiaFNhKCfYE9e143 yrKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h10-20020a17090634ca00b0098e1bbc2cffsi3684899ejb.958.2023.07.19.15.24.47; Wed, 19 Jul 2023 15:25:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230163AbjGSWD1 (ORCPT + 99 others); Wed, 19 Jul 2023 18:03:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230211AbjGSWDY (ORCPT ); Wed, 19 Jul 2023 18:03:24 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88BDA2122; Wed, 19 Jul 2023 15:03:19 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1qMFG1-0008Ji-2q; Wed, 19 Jul 2023 22:02:53 +0000 Date: Wed, 19 Jul 2023 23:02:45 +0100 From: Daniel Golle To: Jens Axboe , Ulf Hansson , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Dave Chinner , Matthew Wilcox , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Jan Kara , Daniel Golle , Damien Le Moal , Ming Lei , Min Li , Christian Loehle , Adrian Hunter , Hannes Reinecke , Jack Wang , Florian Fainelli , Yeqi Fu , Avri Altman , Hans de Goede , Ye Bin , Greg Kroah-Hartman , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [RFC PATCH 2/6] mmc: block: set fwnode of disk devices Message-ID: <1ce5f56df546cec25ef741f381286f1d7c33d000.1689802933.git.daniel@makrotopia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index f701efb1fa785..fc1a9f31bd253 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -2413,6 +2413,8 @@ 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 device *ddev; struct mmc_blk_data *md; int devidx, ret; char cap_str[10]; @@ -2509,6 +2511,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); + ddev = disk_to_dev(md->disk); + fwnode = device_get_named_child_node(subname ? md->parent->parent : + md->parent, + subname ? subname : "block"); + ddev->fwnode = fwnode; + string_get_size((u64)size, 512, STRING_UNITS_2, cap_str, sizeof(cap_str)); pr_info("%s: %s %s %s%s\n", -- 2.41.0