From 81d0848fc8d2058c4cc645d971435c889869433b Mon Sep 17 00:00:00 2001 From: Frank Rowand Date: Tue, 25 Apr 2017 17:09:54 -0700 Subject: of: Add unit tests for applying overlays Existing overlay unit tests examine individual pieces of the overlay code. The new tests target the entire process of applying an overlay. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring --- drivers/of/of_private.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/of/of_private.h') diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h index 18bbb4517e25..de5c604f5cc4 100644 --- a/drivers/of/of_private.h +++ b/drivers/of/of_private.h @@ -55,6 +55,18 @@ static inline int of_property_notify(int action, struct device_node *np, } #endif /* CONFIG_OF_DYNAMIC */ +#ifdef CONFIG_OF_UNITTEST +extern void __init unittest_unflatten_overlay_base(void); +#else +static inline void unittest_unflatten_overlay_base(void) {}; +#endif + +extern void *__unflatten_device_tree(const void *blob, + struct device_node *dad, + struct device_node **mynodes, + void *(*dt_alloc)(u64 size, u64 align), + bool detached); + /** * General utilities for working with live trees. * -- cgit v1.2.3