From mboxrd@z Thu Jan 1 00:00:00 1970 From: sjg at google.com Date: Fri, 12 Apr 2019 14:50:03 -0700 Subject: [U-Boot] [PATCH v3 05/13] fdtdec: Implement fdtdec_add_reserved_memory() In-Reply-To: <20190321181010.27005-6-thierry.reding@gmail.com> References: <20190321181010.27005-6-thierry.reding@gmail.com> <20190321181010.27005-1-thierry.reding@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Thierry Reding This function can be used to add subnodes in the /reserved-memory node. Reviewed-by: Simon Glass Signed-off-by: Thierry Reding --- Changes in v3: - use fdt_generate_phandle() instead of fdtdec_generate_phandle() - add device tree bindings for /reserved-memory - add examples to code comments Changes in v2: - split fdt_{addr,size}_unpack() helpers into separate patch - use name at x,y notation only if the upper cell is > 0 - use debug() instead of printf() to save code size - properly compute number of cells in reg property - fix carveout size computations, was off by one - use #size-cells where appropriate .../reserved-memory/reserved-memory.txt | 136 ++++++++++++++++++ include/fdtdec.h | 48 +++++++ lib/fdtdec.c | 131 +++++++++++++++++ 3 files changed, 315 insertions(+) create mode 100644 Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt Applied to u-boot-dm, thanks!