devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] of: reserved-memory: Various improvements
@ 2020-04-03 18:56 Thierry Reding
  2020-04-03 18:56 ` [PATCH 1/4] dt-bindings: reserved-memory: Introduce memory-region{s,-names} Thierry Reding
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Thierry Reding @ 2020-04-03 18:56 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand; +Cc: devicetree, linux-tegra, linux-kernel

From: Thierry Reding <treding@nvidia.com>

Hi Rob, all,

this is a set of patches that I've been working on to allow me to use
reserved memory regions more flexibly. One of the use-cases that I have
is an external memory controller driver that gets passed one or two
tables from firmware containing a set of EMC frequencies and the
corresponding register values to program for these frequencies.

One of these tables is the "nominal" table and an optional second table
is "derated" and is used when the DRAM chips are overheating. I want to
be able to pass these tables as separate memory-region entries.

So what this small patchset does is make the reserved-memory code adapt
to this situation better. On one hand, while the DT bindings currently
support multiple regions per device tree node, it's slightly unintuitive
to specify them. The first patch adds a memory-region-names property
that allows the DT to specify a "consumer" name for these regions much
like we do for things like clocks, resets or the reg property. At the
same time, a new alias for memory-region, named memory-regions, is
introduced to make this more consistent with other bindings.

Patches 2 and 3 add support in the core OF reserved-memory code for
these binding changes, with a fallback to the memory-region property if
no memory-regions property exists.

Patch 4 implements support for releasing multiple regions assigned to a
single device rather than just the first.

Thierry

Thierry Reding (4):
  dt-bindings: reserved-memory: Introduce memory-region{s,-names}
  of: reserved-memory: Support memory-regions property
  of: reserved-memory: Support lookup of regions by name
  of: reserved-memory: Support multiple regions per device

 .../reserved-memory/reserved-memory.txt       | 12 +++--
 drivers/of/of_reserved_mem.c                  | 52 +++++++++++++------
 include/linux/of_reserved_mem.h               | 11 ++++
 3 files changed, 55 insertions(+), 20 deletions(-)

-- 
2.24.1


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

end of thread, other threads:[~2020-04-06 10:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-03 18:56 [PATCH 0/4] of: reserved-memory: Various improvements Thierry Reding
2020-04-03 18:56 ` [PATCH 1/4] dt-bindings: reserved-memory: Introduce memory-region{s,-names} Thierry Reding
2020-04-03 18:56 ` [PATCH 2/4] of: reserved-memory: Support memory-regions property Thierry Reding
2020-04-03 18:56 ` [PATCH 3/4] of: reserved-memory: Support lookup of regions by name Thierry Reding
2020-04-03 18:56 ` [PATCH 4/4] of: reserved-memory: Support multiple regions per device Thierry Reding
2020-04-05  1:24 ` [PATCH 0/4] of: reserved-memory: Various improvements Rob Herring
2020-04-06 10:04   ` Thierry Reding

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