devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] of: Common "memory-region" parsing
@ 2025-03-17 23:24 Rob Herring (Arm)
  2025-03-17 23:24 ` [PATCH 1/3] of: reserved_mem: Add functions to parse "memory-region" Rob Herring (Arm)
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Rob Herring (Arm) @ 2025-03-17 23:24 UTC (permalink / raw)
  To: Saravana Kannan, Bjorn Andersson, Mathieu Poirier, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Patrice Chotard, Maxime Coquelin, Alexandre Torgue
  Cc: devicetree, linux-kernel, linux-remoteproc, imx, linux-arm-kernel,
	linux-arm-msm, linux-stm32

While there's a common function to parse "memory-region" properties for
DMA pool regions, there's not anything for driver private regions. As a
result, drivers have resorted to parsing "memory-region" properties
themselves repeating the same pattern over and over. To fix this, this
series adds 2 functions to handle those cases:
of_reserved_mem_region_to_resource() and of_reserved_mem_region_count().

I've converted the whole tree, but just including remoteproc here as
it has the most cases. I intend to apply the first 2 patches for 6.15
so the driver conversions can be applied for 6.16.

A git tree with all the drivers converted is here[1].

[1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git dt/memory-region

Rob Herring (Arm) (3):
  of: reserved_mem: Add functions to parse "memory-region"
  of: Simplify of_dma_set_restricted_buffer() to use
    of_for_each_phandle()
  remoteproc: Use of_reserved_mem_region_* functions for "memory-region"

 drivers/of/device.c                       | 34 ++++------
 drivers/of/of_reserved_mem.c              | 77 +++++++++++++++++++++++
 drivers/remoteproc/imx_dsp_rproc.c        | 44 +++++--------
 drivers/remoteproc/imx_rproc.c            | 65 ++++++++-----------
 drivers/remoteproc/qcom_q6v5_adsp.c       | 24 +++----
 drivers/remoteproc/qcom_q6v5_mss.c        | 60 ++++++------------
 drivers/remoteproc/qcom_q6v5_pas.c        | 69 ++++++++------------
 drivers/remoteproc/qcom_q6v5_wcss.c       | 25 +++-----
 drivers/remoteproc/qcom_wcnss.c           | 23 +++----
 drivers/remoteproc/rcar_rproc.c           | 36 +++++------
 drivers/remoteproc/st_remoteproc.c        | 39 +++++-------
 drivers/remoteproc/stm32_rproc.c          | 42 ++++++-------
 drivers/remoteproc/ti_k3_dsp_remoteproc.c | 28 ++++-----
 drivers/remoteproc/ti_k3_m4_remoteproc.c  | 28 ++++-----
 drivers/remoteproc/ti_k3_r5_remoteproc.c  | 28 ++++-----
 drivers/remoteproc/xlnx_r5_remoteproc.c   | 49 +++++----------
 include/linux/of_reserved_mem.h           | 26 ++++++++
 17 files changed, 329 insertions(+), 368 deletions(-)

--
2.47.2


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

end of thread, other threads:[~2025-03-27  4:32 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-17 23:24 [PATCH 0/3] of: Common "memory-region" parsing Rob Herring (Arm)
2025-03-17 23:24 ` [PATCH 1/3] of: reserved_mem: Add functions to parse "memory-region" Rob Herring (Arm)
2025-03-18  8:54   ` Daniel Baluta
2025-03-18 11:12   ` Jonathan Cameron
2025-03-17 23:24 ` [PATCH 2/3] of: Simplify of_dma_set_restricted_buffer() to use of_for_each_phandle() Rob Herring (Arm)
2025-03-26  6:44   ` Chen-Yu Tsai
2025-03-26 18:52     ` Rob Herring
2025-03-27  4:32       ` Chen-Yu Tsai
2025-03-17 23:24 ` [PATCH 3/3] remoteproc: Use of_reserved_mem_region_* functions for "memory-region" Rob Herring (Arm)
2025-03-18  8:57   ` Daniel Baluta
2025-03-18 10:48   ` neil.armstrong
2025-03-19 15:23   ` [Linux-stm32] " Arnaud POULIQUEN
2025-03-19 23:04     ` Rob Herring
2025-03-20  9:21       ` Arnaud POULIQUEN
2025-03-20  9:37         ` Arnaud POULIQUEN
2025-03-20 18:02         ` Rob Herring
2025-03-21  8:22           ` Arnaud POULIQUEN
2025-03-21 13:14             ` Rob Herring

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