X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=include%2Flinux%2Fof_fdt.h;h=06653c979003e673093d08de30a880dceb9ec926;hb=6fa3eb70c07b7ce2061fd6602159ac2d45a7dc3d;hp=ed136ad698ce622e4d150d7fda337a99c78d5a4e;hpb=4d39aa1b998fffd481517c1dd03d83c38e1706f9;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index ed136ad698ce..06653c979003 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h @@ -90,13 +90,40 @@ extern void *of_get_flat_dt_prop(unsigned long node, const char *name, extern int of_flat_dt_is_compatible(unsigned long node, const char *name); extern int of_flat_dt_match(unsigned long node, const char *const *matches); extern unsigned long of_get_flat_dt_root(void); +extern int of_scan_flat_dt_by_path(const char *path, + int (*it)(unsigned long node, const char *name, int depth, void *data), + void *data); +/* + * early_init_dt_scan_chosen - scan the device tree for ramdisk and bootargs + * + * The boot arguments will be placed into the memory pointed to by @data. + * That memory should be COMMAND_LINE_SIZE big and initialized to be a valid + * (possibly empty) string. Logic for what will be in @data after this + * function finishes: + * + * - CONFIG_CMDLINE_FORCE=true + * CONFIG_CMDLINE + * - CONFIG_CMDLINE_EXTEND=true, @data is non-empty string + * @data + dt bootargs (even if dt bootargs are empty) + * - CONFIG_CMDLINE_EXTEND=true, @data is empty string + * CONFIG_CMDLINE + dt bootargs (even if dt bootargs are empty) + * - CMDLINE_FROM_BOOTLOADER=true, dt bootargs=non-empty: + * dt bootargs + * - CMDLINE_FROM_BOOTLOADER=true, dt bootargs=empty, @data is non-empty string + * @data is left unchanged + * - CMDLINE_FROM_BOOTLOADER=true, dt bootargs=empty, @data is empty string + * CONFIG_CMDLINE (or "" if that's not defined) + */ extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, int depth, void *data); extern void early_init_dt_check_for_initrd(unsigned long node); extern int early_init_dt_scan_memory(unsigned long node, const char *uname, int depth, void *data); +extern void early_init_fdt_scan_reserved_mem(void); extern void early_init_dt_add_memory_arch(u64 base, u64 size); +extern int early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, + bool no_map); extern void * early_init_dt_alloc_memory_arch(u64 size, u64 align); extern u64 dt_mem_next_cell(int s, __be32 **cellp); @@ -119,6 +146,7 @@ extern void unflatten_device_tree(void); extern void early_init_devtree(void *); #else /* CONFIG_OF_FLATTREE */ static inline void unflatten_device_tree(void) {} +static inline void early_init_fdt_scan_reserved_mem(void) {} #endif /* CONFIG_OF_FLATTREE */ #endif /* __ASSEMBLY__ */