]> www.infradead.org Git - users/jedix/linux-maple.git/commit
of: reserved_mem: Add functions to parse "memory-region"
authorRob Herring (Arm) <robh@kernel.org>
Wed, 23 Apr 2025 19:42:13 +0000 (14:42 -0500)
committerRob Herring (Arm) <robh@kernel.org>
Mon, 5 May 2025 21:17:40 +0000 (16:17 -0500)
commitf4fcfdda2fd8834c62dcb9bfddcf1f89d190b70e
treeb8167cb425cd73fe62ce5048046fe6ab52b974dc
parent67dd139c917aa4773139807e9258c3aa88ac1436
of: reserved_mem: Add functions to parse "memory-region"

Drivers with "memory-region" properties currently have to do their own
parsing of "memory-region" properties. The result is all the drivers
have similar patterns of a call to parse "memory-region" and then get
the region's address and size. As this is a standard property, it should
have common functions for drivers to use. Add new functions to count the
number of regions and retrieve the region's address as a resource.

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Link: https://lore.kernel.org/r/20250423-dt-memory-region-v2-v2-1-2fbd6ebd3c88@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
drivers/of/of_reserved_mem.c
include/linux/of_reserved_mem.h