Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3174297rwb; Mon, 7 Aug 2023 09:15:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwTEGBufZOVm88GEWElDxkj4Yd4rP//whMMm6ms7mGVS8JQBQLQLSC+TFORNgLtDOYfJxN X-Received: by 2002:a17:903:2581:b0:1bb:1523:b311 with SMTP id jb1-20020a170903258100b001bb1523b311mr6597355plb.41.1691424909863; Mon, 07 Aug 2023 09:15:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691424909; cv=none; d=google.com; s=arc-20160816; b=IHRBpPj/vmYzXaNK9ul2S8bW0/vlxBGQxnsDQoC/3+8IdNiIZsmKkM9MpjtqfRVd2e 9VVvEabnZejqQxRLG8NzIzgzddSldx5wYuv5lLJwiUID8RUEAeNVtzbC5r3h9SfBu454 BtMNCvqML8YRFqSHeK5kY+ISvwH4vp5nWcIqyhDdX/Xx/x2Z8i94ATSla3yZD5P1bu24 SZP1cmxCOSZXfPoFM+QzwWI/rtill9AkRxFR68q8/b1+KVhEyPrsRrLjN6Yef/K//R39 vbzJ9HQ0+koflrcLsic06fdL3lLtmOrlQwq8ajNOJB804qAJEUqnLhvHk4uQCCUeleS+ fOSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=LrwjN5Q8LetwblRISR8oyofHz7AZ81IID5+NzR+/8cA=; fh=ADdcXHC5QiXb/3QNGvtQQRS3QZQTJ6r2IF2wHhMK8X4=; b=NEdrsuDi13tcL0hUxj0f8h2YTPhVVxkeFuZFgC7fpebW7gYeM14lnUPuwFbNgIdN9f MBp4n/oSWhaml7hMjUPryglm86a4jRmPnKx3PE1TFgsMjbTAgx2lroybtAtE8+vD6dN3 L2QhJbQxvViOdpkP8rdzu57QUhx5lZQGndxCgHvzqiJbjrnF5ENBZYdiFR9QO+fMcQRM UhVPykFJNOOocQ1E9/+JyR7P8ufWlUwhGhRw3daHm6CZPrjYB5k33OKURwTwNtYiUvIu oSApmEOlvllRx0hQ4mTFfB5eaqBj+xKmAHnjCBp8FQCQvHbEDbp63SQU2sjdvedmxcGA cm5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V7Jh7Nsn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ik26-20020a170902ab1a00b001bc18e52c81si5845931plb.204.2023.08.07.09.14.57; Mon, 07 Aug 2023 09:15:09 -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; dkim=pass header.i=@linaro.org header.s=google header.b=V7Jh7Nsn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233416AbjHGNt1 (ORCPT + 99 others); Mon, 7 Aug 2023 09:49:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234451AbjHGNtV (ORCPT ); Mon, 7 Aug 2023 09:49:21 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26A461BE2 for ; Mon, 7 Aug 2023 06:49:09 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-d075a831636so4954157276.3 for ; Mon, 07 Aug 2023 06:49:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691416148; x=1692020948; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LrwjN5Q8LetwblRISR8oyofHz7AZ81IID5+NzR+/8cA=; b=V7Jh7Nsn3GJVY+ygsTFOkvGh4bLV8N8/Ew/DUfO2RWeke7HQyKDyjJX+JH09EUP2rA Jju6Z82uwl1JMOag6O15FNgv0xHCpxqyF6scOiN5H6wvWBVLBpQAZYVxgKhm29sonjSH TUYPL4ckDcXINMIpHVuFl+V+kpgsZjqnuZdEpGzTr8XStLu6S+g4JDUmGdlgBXaAUM9n bjPmpPjvVEQJr0K3eRuPaaXg4zdZFd/S2DaXMRrvLdjIBJLBqdqpOTfsnkgnGeK64FJR NxGiN3P3Vg/fHgZLkbbIvyLeA/NV8B11XiV/mObIGlymdQt9CJQqeELnuL5Kv2Sayvt0 dJqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691416148; x=1692020948; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LrwjN5Q8LetwblRISR8oyofHz7AZ81IID5+NzR+/8cA=; b=ifWFRs2Jldq2utj3S3zBVJqpRDa3tPMbRE4fSW1+j6z43MAtuGz/bKrrijE5kwDXy8 mMl6AGzHwD2dpdpewIVbUDeaPKvYtS7XyfABuxex8pvFI9EAE+6KNlr8UmVhJfniIj83 jjtraZpyvhWUOGZTbkXWOxJAEKkLS/Enjay6JNCHYhtf2Vl6pGuSFYrAJ3EIeWvVtrVD muZbxFeT8sUtw0pgokxSQekmOPCompuwvkEkKbHCRGlcDBP8D7EglQEFumqzIpH6BkLk lFEkIAY1MnVuCmw7248bYkf1GtzJ++BcV/P6dOi49+zqBvxb5tByZfF3pqa9nkYHTBU7 uA2A== X-Gm-Message-State: AOJu0Yzt4n7DWtebMLNLkRZjTjDnHicrJZ30WJ2x+sEjLsV78bS4ciBS MldSweVGiuzOekFJgNFmHwNX00rqwPJSAPKJ83ICDQ== X-Received: by 2002:a25:b316:0:b0:cea:b62d:620f with SMTP id l22-20020a25b316000000b00ceab62d620fmr9376359ybj.45.1691416147971; Mon, 07 Aug 2023 06:49:07 -0700 (PDT) MIME-Version: 1.0 References: <1ce5f56df546cec25ef741f381286f1d7c33d000.1689802933.git.daniel@makrotopia.org> In-Reply-To: <1ce5f56df546cec25ef741f381286f1d7c33d000.1689802933.git.daniel@makrotopia.org> From: Ulf Hansson Date: Mon, 7 Aug 2023 15:48:31 +0200 Message-ID: Subject: Re: [RFC PATCH 2/6] mmc: block: set fwnode of disk devices To: Daniel Golle Cc: Jens Axboe , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Dave Chinner , Matthew Wilcox , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Jan Kara , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 On Thu, 20 Jul 2023 at 00:02, Daniel Golle wrote: > > 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. Sorry, but I don't quite understand what you are trying to do here. Maybe you should re-order the patches in the series so it becomes clear why this is needed? Moreover, I don't see any DT docs being updated as a part of the series, which looks like it is needed too. That would also help to understand what you are proposing, I think. > > 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", Kind regards Uffe