From 5b8f828963db94fb7ae67951060fc7fc13516902 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Fri, 28 Feb 2014 14:42:48 +0100 Subject: drivers: of: add initialization code for dynamic reserved memory This patch adds support for dynamically allocated reserved memory regions declared in device tree. Such regions are defined by 'size', 'alignment' and 'alloc-ranges' properties. Based on previous code provided by Josh Cartwright Signed-off-by: Marek Szyprowski Signed-off-by: Grant Likely (cherry picked from commit 3f0c8206644836e4f10a6b9fc47cda6a9a372f9b) Signed-off-by: Mark Brown --- drivers/of/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/of/Kconfig') diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index d37bfcf5a3a2..bdc7f9a0c500 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -83,4 +83,10 @@ config OF_MTD depends on MTD def_bool y +config OF_RESERVED_MEM + depends on OF_EARLY_FLATTREE + bool + help + Helpers to allow for reservation of memory regions + endmenu # OF -- cgit v1.2.3 From a0e28c9fb2fbb2234dd0cb0eeb9d3f63160d8a53 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 2 Apr 2014 15:10:14 -0500 Subject: of/fdt: Convert FDT functions to use libfdt The kernel FDT functions predate libfdt and are much more limited in functionality. Also, the kernel functions and libfdt functions are not compatible with each other because they have different definitions of node offsets. To avoid this incompatibility and in preparation to add more FDT parsing functions which will need libfdt, let's first convert the existing code to use libfdt. The FDT unflattening, top-level FDT scanning, and property retrieval functions are converted to use libfdt. The scanning code should be re-worked to be more efficient and understandable by using libfdt to find nodes directly by path or compatible strings. Signed-off-by: Rob Herring Tested-by: Michal Simek Tested-by: Grant Likely Tested-by: Stephen Chivers (cherry picked from commit e6a6928c3ea1d0195ed75a091e345696b916c09b) Signed-off-by: Mark Brown Conflicts: drivers/of/fdt.c --- drivers/of/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/of/Kconfig') diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index bdc7f9a0c500..a7bb5da6a96b 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -27,6 +27,7 @@ config OF_SELFTEST config OF_FLATTREE bool select DTC + select LIBFDT config OF_EARLY_FLATTREE bool -- cgit v1.2.3