]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/of/fdt.c
of/irq: Rename "intc_desc" to "of_intc_desc" to fix OF on sh
[karo-tx-linux.git] / drivers / of / fdt.c
index cde35c5d0191bd5950c7953d5b8e88a2d139306f..1c193610c9506f5f98109a1e3640b287fa236d74 100644 (file)
@@ -164,11 +164,14 @@ static void *unflatten_dt_alloc(void **mem, unsigned long size,
  * unflatten_dt_node - Alloc and populate a device_node from the flat tree
  * @blob: The parent device tree blob
  * @mem: Memory chunk to use for allocating device nodes and properties
- * @p: pointer to node in flat tree
+ * @poffset: pointer to node in flat tree
  * @dad: Parent struct device_node
+ * @nodepp: The device_node tree created by the call
  * @fpsize: Size of the node path up at the current depth.
+ * @dryrun: If true, do not allocate device nodes but still calculate needed
+ * memory size
  */
-static void * unflatten_dt_node(void *blob,
+static void * unflatten_dt_node(const void *blob,
                                void *mem,
                                int *poffset,
                                struct device_node *dad,
@@ -378,7 +381,7 @@ static void * unflatten_dt_node(void *blob,
  * @dt_alloc: An allocator that provides a virtual address to memory
  * for the resulting tree
  */
-static void __unflatten_device_tree(void *blob,
+static void __unflatten_device_tree(const void *blob,
                             struct device_node **mynodes,
                             void * (*dt_alloc)(u64 size, u64 align))
 {
@@ -441,7 +444,7 @@ static void *kernel_tree_alloc(u64 size, u64 align)
  * pointers of the nodes so the normal device-tree walking functions
  * can be used.
  */
-void of_fdt_unflatten_tree(unsigned long *blob,
+void of_fdt_unflatten_tree(const unsigned long *blob,
                        struct device_node **mynodes)
 {
        __unflatten_device_tree(blob, mynodes, &kernel_tree_alloc);
@@ -1015,6 +1018,11 @@ void * __init __weak early_init_dt_alloc_memory_arch(u64 size, u64 align)
        return __va(memblock_alloc(size, align));
 }
 #else
+void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size)
+{
+       WARN_ON(1);
+}
+
 int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base,
                                        phys_addr_t size, bool nomap)
 {
@@ -1022,6 +1030,12 @@ int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base,
                  &base, &size, nomap ? " (nomap)" : "");
        return -ENOSYS;
 }
+
+void * __init __weak early_init_dt_alloc_memory_arch(u64 size, u64 align)
+{
+       WARN_ON(1);
+       return NULL;
+}
 #endif
 
 bool __init early_init_dt_verify(void *params)