public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] MTD physmap: Adding reserved RAM support and fixing reserved_mem limitations
@ 2026-01-07 13:04 Gregory CLEMENT
  2026-01-07 13:04 ` [PATCH v3 1/4] of: reserved_mem: Fix placement of __free() annotation Gregory CLEMENT
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Gregory CLEMENT @ 2026-01-07 13:04 UTC (permalink / raw)
  To: Rob Herring, Linus Walleij, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Krzysztof Kozlowski, Conor Dooley
  Cc: Thomas Petazzoni, Vladimir Kondratiev, Benoît Monin,
	Théo Lebrun, devicetree, linux-kernel, linux-arm-kernel,
	linux-mtd, Gregory CLEMENT

Hello,

While working on adding reserved RAM support to the MTD physmap
driver, I encountered a limitation in the kernel's reserved memory
support: although the Device Tree specification allows multiple reg
entries for a memory-region node, the kernel only processed the first
one. This limitation prevented proper support for reserved RAM regions
in MTD.

This series addresses both issues:

First, the reserved memory support is extended to fully support
multiple reg entries per memory-region node, ensuring compliance with
the Device Tree specification.

Then, with this foundation in place, the series updates the MTD
physmap driver to support reserved RAM regions. The DT bindings are
extended to allow memory-region for RAM access, and the physmap driver
is modified to use these regions.

Gregory

Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
---
Changes in v3:

- Fix the placement of the __free() annotation in patch 4, and also
  address the same issue in the current codebase with patch 1.
- Add MTD properties directly into /reserved-memory nodes, as
  suggested by Rob.
- Rebase on v6.19-rc1
- Link to v2: https://lore.kernel.org/r/20251121-mtd-memregion-v2-0-c5535fdcebe4@bootlin.com

Changes in v2:

- Properly managed cases where register entries used by the memory
  region are out of order, particularly when one or more register
  entries are mixed with memory region entries in an other node.
- Used "memlog" as the node name instead of "sram," which was misleading.
- Link to v1: https://lore.kernel.org/r/20251117-mtd-memregion-v1-0-7b35611c79a6@bootlin.com

---
Gregory CLEMENT (4):
      of: reserved_mem: Fix placement of __free() annotation
      of: reserved_mem: Support multiple 'reg' entries for memory-region
      dt-bindings: mtd: physmap: Allow using memory-region to access memory resources
      mtd: physmap: Add support for RAM reserved memory regions

 .../devicetree/bindings/mtd/mtd-physmap.yaml       |  69 +++++++---
 drivers/mtd/maps/physmap-core.c                    |  73 ++++++++--
 drivers/of/of_reserved_mem.c                       | 150 ++++++++++++++++++---
 drivers/of/platform.c                              |   2 +
 include/linux/of_reserved_mem.h                    |   4 +
 5 files changed, 252 insertions(+), 46 deletions(-)
---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20251117-mtd-memregion-8830c1dd70ce

Best regards,
-- 
Grégory CLEMENT, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


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

end of thread, other threads:[~2026-01-21  2:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-07 13:04 [PATCH v3 0/4] MTD physmap: Adding reserved RAM support and fixing reserved_mem limitations Gregory CLEMENT
2026-01-07 13:04 ` [PATCH v3 1/4] of: reserved_mem: Fix placement of __free() annotation Gregory CLEMENT
2026-01-21  2:30   ` Rob Herring (Arm)
2026-01-07 13:04 ` [PATCH v3 2/4] of: reserved_mem: Support multiple 'reg' entries for memory-region Gregory CLEMENT
2026-01-08 20:17   ` kernel test robot
2026-01-09 16:12     ` Gregory CLEMENT
2026-01-08 23:06   ` kernel test robot
2026-01-13  2:59   ` kernel test robot
2026-01-13  3:41   ` kernel test robot
2026-01-14 22:31   ` Rob Herring
2026-01-07 13:04 ` [PATCH v3 3/4] dt-bindings: mtd: physmap: Allow using memory-region to access memory resources Gregory CLEMENT
2026-01-09  9:52   ` Linus Walleij
2026-01-07 13:04 ` [PATCH v3 4/4] mtd: physmap: Add support for RAM reserved memory regions Gregory CLEMENT

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox