Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1877715/?format=api
{ "id": 1877715, "url": "http://patchwork.ozlabs.org/api/patches/1877715/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/688484b386b6d6ce96dfcc2e31b2a03a4bae567c.1702952891.git.daniel@makrotopia.org/", "project": { "id": 3, "url": "http://patchwork.ozlabs.org/api/projects/3/?format=api", "name": "Linux MTD development", "link_name": "linux-mtd", "list_id": "linux-mtd.lists.infradead.org", "list_email": "linux-mtd@lists.infradead.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<688484b386b6d6ce96dfcc2e31b2a03a4bae567c.1702952891.git.daniel@makrotopia.org>", "list_archive_url": null, "date": "2023-12-19T02:33:38", "name": "[v7,6/7] mtd: ubi: populate ubi volume fwnode", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "d066a74b485010ba052fd589d8b3ad1b8d202d2f", "submitter": { "id": 64091, "url": "http://patchwork.ozlabs.org/api/people/64091/?format=api", "name": "Daniel Golle", "email": "daniel@makrotopia.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/688484b386b6d6ce96dfcc2e31b2a03a4bae567c.1702952891.git.daniel@makrotopia.org/mbox/", "series": [ { "id": 387243, "url": "http://patchwork.ozlabs.org/api/series/387243/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/list/?series=387243", "date": "2023-12-19T02:32:00", "name": "mtd: ubi: allow UBI volumes to provide NVMEM", "version": 7, "mbox": "http://patchwork.ozlabs.org/series/387243/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1877715/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1877715/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=uGTXX1E8;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256\n header.s=desiato.20200630 header.b=QU5U4SBx;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4SvLQ025zRz20H4\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 19 Dec 2023 13:35:04 +1100 (AEDT)", "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux))\n\tid 1rFPvq-00CbGl-39;\n\tTue, 19 Dec 2023 02:34:07 +0000", "from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05])\n\tby bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux))\n\tid 1rFPvp-00CbFU-0g\n\tfor linux-mtd@bombadil.infradead.org;\n\tTue, 19 Dec 2023 02:34:05 +0000", "from pidgin.makrotopia.org ([185.142.180.65])\n\tby desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux))\n\tid 1rFPva-00DM7Y-0z\n\tfor linux-mtd@lists.infradead.org;\n\tTue, 19 Dec 2023 02:33:54 +0000", "from local\n\tby pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256)\n\t (Exim 4.96.2)\n\t(envelope-from <daniel@makrotopia.org>)\n\tid 1rFPvP-0008Jk-3B;\n\tTue, 19 Dec 2023 02:33:41 +0000" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Cc:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=gxdL8r96bAGA+kZLs1Hd0j0fgCYoLqgtVCcNbSYMm8A=; b=uGTXX1E8lekNY3\n\t9T1g4xnqyZr0RO6+bG12tU6KhI9JrZleXB+WSmyi0WE97n5uuvTRDB36yjaVh9cttUKOX5n+FyXcu\n\tjByCavGeRa/WziFS4mnSJP+FcjjUu9cEbbVNEXPVwpKLMZN5Dh6mbeY+UOtz0GEnhZ5KkNOeAgFPa\n\tlh3SrTFzgOtf78DktVqfaBhIG8zBzBdA4VsLWGIZGjRlyJnlItOX1WJvgSpaD4XdWBykmKgvN+Yhu\n\txIYk2wGlOMOGZ5n/zaGjkWpaWYlI1WhEYkpzcF/1JzuCUa4oVm6bK25B63qa73pyINjbpBsKk8CFE\n\t5pkGFvfduectFKhT0Izw==;", "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version:\n\tReferences:Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc:\n\tContent-Transfer-Encoding:Content-ID:Content-Description;\n\tbh=TFryK93pKSqtFYp6InnEraIpYdiHALWWbxp94Yi5ZZg=; b=QU5U4SBxChRs8BuFBvk6dEMAoW\n\tnOlgj8esEcmiS5z/el5gXr6cnMeFrwpO1bG6s0Ep+5wykc1nnROAdutplwLCLWKMG08ru3dxPLAe9\n\tvVKRgeshr8CFmf5gMN0mgIsn+niuxNMgeE8G8ZEO2b3HkiF+7BTtWXqAi521Qd0ImR4rsCFpFl099\n\tksl5i5XTsgXpsvNbf7zwXc8GQeH18reDB22/1V2dUcKrP6pbKyM+urf0wNHtJy1CwiYYXwBjQOo65\n\t3T6om6sQsU5bFVad9qUqhml8CMlIb4Cuo3GNSZUixzjZHcw9FPrqrScfNhHL/VWM3L64j9yPBSQnS\n\tvtCgz/5g==;" ], "Date": "Tue, 19 Dec 2023 02:33:38 +0000", "From": "Daniel Golle <daniel@makrotopia.org>", "To": "Miquel Raynal <miquel.raynal@bootlin.com>,\n\tRichard Weinberger <richard@nod.at>,\n\tVignesh Raghavendra <vigneshr@ti.com>,\n\tRob Herring <robh+dt@kernel.org>,\n\tKrzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,\n\tConor Dooley <conor+dt@kernel.org>,\n\tDaniel Golle <daniel@makrotopia.org>, linux-mtd@lists.infradead.org,\n\tdevicetree@vger.kernel.org, linux-kernel@vger.kernel.org", "Subject": "[PATCH v7 6/7] mtd: ubi: populate ubi volume fwnode", "Message-ID": "\n <688484b386b6d6ce96dfcc2e31b2a03a4bae567c.1702952891.git.daniel@makrotopia.org>", "References": "<cover.1702952891.git.daniel@makrotopia.org>", "MIME-Version": "1.0", "Content-Disposition": "inline", "In-Reply-To": "<cover.1702952891.git.daniel@makrotopia.org>", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20231219_023351_429019_A9DC9B0E ", "X-CRM114-Status": "GOOD ( 12.17 )", "X-Spam-Score": "0.0 (/)", "X-Spam-Report": "Spam detection software,\n running on the system \"desiato.infradead.org\",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n the administrator of that system for details.\n Content preview: Look for the 'volumes' subnode of an MTD partition attached\n to a UBI device and attach matching child nodes to UBI volumes. This\n allows\n UBI volumes to be referenced in device tree, e.g. for use as NVM [...]\n Content analysis details: (0.0 points, 5.0 required)\n pts rule name description\n ---- ----------------------\n --------------------------------------------------\n 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record\n -0.0 SPF_PASS SPF: sender matches SPF record", "X-BeenThere": "linux-mtd@lists.infradead.org", "X-Mailman-Version": "2.1.34", "Precedence": "list", "List-Id": "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>", "List-Archive": "<http://lists.infradead.org/pipermail/linux-mtd/>", "List-Post": "<mailto:linux-mtd@lists.infradead.org>", "List-Help": "<mailto:linux-mtd-request@lists.infradead.org?subject=help>", "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>", "Errors-To": "linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org" }, "content": "Look for the 'volumes' subnode of an MTD partition attached to a UBI\ndevice and attach matching child nodes to UBI volumes.\nThis allows UBI volumes to be referenced in device tree, e.g. for use\nas NVMEM providers.\n\nSigned-off-by: Daniel Golle <daniel@makrotopia.org>\n---\n drivers/mtd/ubi/vmt.c | 27 +++++++++++++++++++++++++++\n 1 file changed, 27 insertions(+)", "diff": "diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c\nindex ee80c04d1d5d0..7824ff069bd62 100644\n--- a/drivers/mtd/ubi/vmt.c\n+++ b/drivers/mtd/ubi/vmt.c\n@@ -124,6 +124,31 @@ static void vol_release(struct device *dev)\n \tkfree(vol);\n }\n \n+static struct fwnode_handle *find_volume_fwnode(struct ubi_volume *vol)\n+{\n+\tstruct fwnode_handle *fw_vols, *fw_vol;\n+\tconst char *volname;\n+\tu32 volid;\n+\n+\tfw_vols = device_get_named_child_node(vol->dev.parent->parent, \"volumes\");\n+\tif (!fw_vols)\n+\t\treturn NULL;\n+\n+\tfwnode_for_each_child_node(fw_vols, fw_vol) {\n+\t\tif (!fwnode_property_read_string(fw_vol, \"volname\", &volname) &&\n+\t\t strncmp(volname, vol->name, vol->name_len))\n+\t\t\tcontinue;\n+\n+\t\tif (!fwnode_property_read_u32(fw_vol, \"volid\", &volid) &&\n+\t\t vol->vol_id != volid)\n+\t\t\tcontinue;\n+\n+\t\treturn fw_vol;\n+\t}\n+\n+\treturn NULL;\n+}\n+\n /**\n * ubi_create_volume - create volume.\n * @ubi: UBI device description object\n@@ -223,6 +248,7 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req)\n \tvol->name_len = req->name_len;\n \tmemcpy(vol->name, req->name, vol->name_len);\n \tvol->ubi = ubi;\n+\tdevice_set_node(&vol->dev, find_volume_fwnode(vol));\n \n \t/*\n \t * Finish all pending erases because there may be some LEBs belonging\n@@ -605,6 +631,7 @@ int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol)\n \tvol->dev.class = &ubi_class;\n \tvol->dev.groups = volume_dev_groups;\n \tdev_set_name(&vol->dev, \"%s_%d\", ubi->ubi_name, vol->vol_id);\n+\tdevice_set_node(&vol->dev, find_volume_fwnode(vol));\n \terr = device_register(&vol->dev);\n \tif (err) {\n \t\tcdev_del(&vol->cdev);\n", "prefixes": [ "v7", "6/7" ] }