Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp938047pxb; Wed, 6 Apr 2022 04:50:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCy9d2LBYAZaL97ryRjYX1ab4O7Q+XRxq1Y/7SQgWs42akLGJtgTvwjqIYGStG7DzYJBP8 X-Received: by 2002:a17:902:aa84:b0:156:6b35:9681 with SMTP id d4-20020a170902aa8400b001566b359681mr8523643plr.48.1649245847903; Wed, 06 Apr 2022 04:50:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649245847; cv=none; d=google.com; s=arc-20160816; b=qG3pnZFYYyuuhNtHDQYl52yeFGtmCDMYgygCIIGGG6XP/mVKfCRqynUEZRBwpqi7ZN QrWrrRU8Z/3O86u9TsMfg00oV5WCQa69TGy/hxifpzLHwreRZ/Uu4ML/x6rdTP/GVQfp EucdzvUca1Gl+CRlS/j9AE8jIjPE7/ia43kKeSOkdup93DxxM/S2NhAB9wmgmNc0jE+6 C7sYxN6FeyNb18G4Pits1XoEzVKbMwSpnU62lVDjNMf+8EGGG+LGzfWvgig8BijG6jJI AJf8Tal5eFdvWksAqaTx6gHnMkOrxpW+1b4PAqlghGFVtjngqm66dWItpfzwLIiqAMAg vm2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=LB9Z91H4lxNWiHmnPf+yOrh5/8wfRKj1DRyzVPm5Z0s=; b=wU6k0VTtqKR9hQRG224/4WRh/UUk2QV9FsfrCUjc6cPMeZcUDFj6QbJFRoA7/0SA/t UXrKWrwFIysWqp2YtnuE9wj5BGzgxl7ofDuaeKSo/2n3a9fA1l0q/6bOGIND7rIduhpi 23GAmJri4W2KWYvFpaD6MZ7/HYyiHLIEL4YnP/p5tRdgME61H6l682H3SLVAn/qgDD+Q h3fplXEuoIT4zi5g3z0fT6HseQUkHVhI34mW4lKea9ruGGtXNQFHIDtULGlB8qrJEmrr buV5VFNOeeqQ5/3UWJw9N8R/4FnQ/W/Od9QBKf5/jzlViKuXUpy9V/rYdHDB+bgNW02c FiRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=WUZj+nhN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m4-20020a170902db0400b0015616086a11si16067915plx.546.2022.04.06.04.50.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 04:50:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=WUZj+nhN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2EE95633FFC; Wed, 6 Apr 2022 03:09:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239553AbiDEWlr (ORCPT + 99 others); Tue, 5 Apr 2022 18:41:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384347AbiDEOSB (ORCPT ); Tue, 5 Apr 2022 10:18:01 -0400 Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFF392E09E; Tue, 5 Apr 2022 06:03:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1649163839; x=1680699839; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=LB9Z91H4lxNWiHmnPf+yOrh5/8wfRKj1DRyzVPm5Z0s=; b=WUZj+nhNaQk+plWanfhUOe+OsLv68D/+hZsmIxc3F7IhlWxRaDIg81Jf mrV7Rnur5M93c1gfVtOZTNZaynpnE35xTtz1zCyWQXhS3rH1Xm7JpVBoQ HVHmPp81CxvwmrKQS33lkypf1dXHcVlwg5EQvCsE3+g6eHejF/KHcx0Q+ BkiiMWRNIZWp4bbF/Ruwn/wKI6YmehfD/JZiaS+WPYPYQwEm4IT0UFRW/ PJv5G4CbGoGi99GyNdIsPXxbemScV3FTTH/u3U6FZCoBJCqKTJKuMdTgN eay7AyS3hki5eMrm76CcDIIR71yaYJQsSQm4za/tYVRsfbcZxnINxwDtg A==; From: Vincent Whitchurch To: , , , CC: , Vincent Whitchurch , , , , , , Subject: [PATCH v2 0/4] mtd: phram improvements Date: Tue, 5 Apr 2022 15:03:46 +0200 Message-ID: <20220405130350.1640985-1-vincent.whitchurch@axis.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 v2: - Add note on what "phram" means in binding. - Use /schemas/mtd/mtd.yaml instead of relative pathUse /schemas/mtd/mtd.yaml instead of relative path in binding. The phram driver in the MTD subsystem can be used to allow the kernel to use an MTD or (via mtdblock) a block device in RAM (with the contents loaded by a bootloader for example). This series has some improvements to make it more usable by adding device tree support and to significantly improve its performance by using cached mappings when possible. I use this feature to pass the rootfs to the kernel when booting from RAM. The boot is much faster and requires less memory than initrd (which is on top of that being deprecated), and it allows the same disk images to be used when booting from RAM, unlike initramfs. Cc: linux-mtd@lists.infradead.org Cc: devicetree@vger.kernel.org Cc: robh+dt@kernel.org Cc: krzk+dt@kernel.org Cc: frowand.list@gmail.com Cc: linux-kernel@vger.kernel.org Vincent Whitchurch (4): mtd: core: Check devicetree alias for index dt-bindings: reserved-memory: Add phram mtd: phram: Allow probing via reserved-memory mtd: phram: Allow cached mappings .../bindings/reserved-memory/phram.yaml | 47 +++++++++++ drivers/mtd/devices/phram.c | 78 +++++++++++++++++-- drivers/mtd/mtdcore.c | 11 ++- drivers/of/platform.c | 1 + 4 files changed, 129 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/reserved-memory/phram.yaml -- 2.34.1