linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] mtd: phram improvements
@ 2022-04-12 13:52 Vincent Whitchurch
  2022-04-12 13:52 ` [PATCH v3 1/4] mtd: core: Check devicetree alias for index Vincent Whitchurch
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Vincent Whitchurch @ 2022-04-12 13:52 UTC (permalink / raw)
  To: vigneshr, richard, miquel.raynal, joern
  Cc: kernel, Vincent Whitchurch, linux-mtd, devicetree, robh+dt,
	krzk+dt, frowand.list, linux-kernel

v3:
- Fix build error on some configs.
- Reword binding.
- Added note about alternatives in cover letter (see below)

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 squashfs 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.

If there is no interest in extending the phram driver to support this, an
option is to use a new custom block driver.  I have patches for that too.  That
will not support MTDs of course, but it works for block devices and it is
faster and smaller than mtdblock + MTD + phram.

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: Support MTD/block device
  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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-05-10 15:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12 13:52 [PATCH v3 0/4] mtd: phram improvements Vincent Whitchurch
2022-04-12 13:52 ` [PATCH v3 1/4] mtd: core: Check devicetree alias for index Vincent Whitchurch
2022-04-21  7:36   ` Miquel Raynal
2022-04-12 13:53 ` [PATCH v3 2/4] dt-bindings: reserved-memory: Support MTD/block device Vincent Whitchurch
2022-04-14 16:00   ` Rob Herring
2022-04-21  7:36   ` Miquel Raynal
2022-04-12 13:53 ` [PATCH v3 3/4] mtd: phram: Allow probing via reserved-memory Vincent Whitchurch
2022-04-14 16:02   ` Rob Herring
2022-04-21  7:36   ` Miquel Raynal
2022-04-12 13:53 ` [PATCH v3 4/4] mtd: phram: Allow cached mappings Vincent Whitchurch
2022-04-13  6:45   ` kernel test robot
2022-04-14  9:04     ` Vincent Whitchurch
2022-04-25  8:28       ` Miquel Raynal
2022-04-25  8:30         ` Miquel Raynal
2022-05-10 15:26           ` Vincent Whitchurch
2022-04-21  7:35   ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).