From patchwork Wed Nov 13 17:15:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1194409 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LJl9NwOH"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47CrqF3Wyjz9s7T for ; Thu, 14 Nov 2019 04:15:53 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=jhMC179HDHmuSm1FmPuE8rVlrrbPFKk2t8eFyiL58h8=; b=LJl9NwOHk6Sxxs tu/bRCKNj7PcEFN4hCuZdrM2qjt4UEhMb2lnGOmTOUoQp3k3u6itlK0lTHB98q720qt9Zvr9oOBLe r1RNsu+4JcM5+Y0vSwFRVyNFnKCeE0O/Ay1f5+aDopsrMJQHaqNLkjRUMurxMvNaj0thqod6s/9tD zgZ9T8n8b9yrqDs+Jd0nzKrsLjHMLzb6Ef1bB9mZ+oBdld9KBmsFLPzJHaIqR1DmlHkhn/XWqiIfx n2VjghMmjVe8C+ZXA/jEXF41Unk379vI9T9lFI2YbjQaDF9Zy/uekoLjjx7wdlHnsbCicPsvH1EXj lzoeu48kUdI2UXXOSwGQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUwF1-0001ez-91; Wed, 13 Nov 2019 17:15:39 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUwEk-0001RA-GU for linux-mtd@lists.infradead.org; Wed, 13 Nov 2019 17:15:24 +0000 X-Originating-IP: 91.224.148.103 Received: from localhost.localdomain (unknown [91.224.148.103]) (Authenticated sender: miquel.raynal@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 3E329E0007; Wed, 13 Nov 2019 17:15:07 +0000 (UTC) From: Miquel Raynal To: Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus Subject: [PATCH v4 0/4] MTD concat Date: Wed, 13 Nov 2019 18:15:01 +0100 Message-Id: <20191113171505.26128-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191113_091522_684604_E28B23D6 X-CRM114-Status: GOOD ( 13.00 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.70.183.196 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.70.183.196 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Miquel Raynal , linux-kernel@vger.kernel.org, Rob Herring , Paul Kocialkowski , Mark Brown , linux-mtd@lists.infradead.org, Thomas Petazzoni , Boris Brezillon Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hello, A year ago Bernhard Frauendienst started an effort to bring MTD devices concatenation generic [1]. Today I also need this concatenation to be possible in order to support configurations where two MTD devices are treated like one bigger in order to be able to define partitions across chip boundaries, hence reviving this patchset. After having talked with Mark Brown and Boris Brezillon this approach seems to be the cleanest and easiest one. If discussions need to happen, it is probably on the dt-bindings file where I tried to summarize the issue and the possible solutions in the commit log. I changed a bit the code logic and style but not so much, all the changes with the 2018 version are in [ ] in the commit logs. I would like to add another way to concatenate devices: with module parameters/arguments on the cmdline. I will extend this work once the bindings will have been discussed and accepted. Thanks, Miquèl [1] https://lwn.net/ml/linux-kernel/20180907173515.19990-1-kernel@nospam.obeliks.de/ Bernhard Frauendienst (3): mtd: Add get_mtd_device_by_node() helper dt-bindings: mtd: Describe mtd-concat devices mtd: Add driver for concatenating devices Miquel Raynal (1): mtd: concat: Fix a comment referring to an unknown symbol .../devicetree/bindings/mtd/mtd-concat.yaml | 56 ++++++++ drivers/mtd/Kconfig | 8 ++ drivers/mtd/Makefile | 1 + drivers/mtd/mtd_virt_concat.c | 132 ++++++++++++++++++ drivers/mtd/mtdconcat.c | 5 +- drivers/mtd/mtdcore.c | 38 +++++ include/linux/mtd/mtd.h | 2 + 7 files changed, 238 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/mtd/mtd-concat.yaml create mode 100644 drivers/mtd/mtd_virt_concat.c