Commit 3c4c142e5deed2a9362e65e45372044652ac57b5
Committed by
Simon Glass
1 parent
10be5b5d3a
Exists in
v2017.01-smarct4x
and in
34 other branches
fdt: Documentation for a few support functions aside their prototypes
This instroduces comments that explain the purpose, parameters and return codes of a few fdt support functions, that are used to fill the fdt. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Acked-by: Simon Glass <sjg@chromium.org>
Showing 1 changed file with 26 additions and 0 deletions Side-by-side Diff
include/fdt_support.h
... | ... | @@ -16,9 +16,35 @@ |
16 | 16 | const char *prop, const u32 dflt); |
17 | 17 | u32 fdt_getprop_u32_default(const void *fdt, const char *path, |
18 | 18 | const char *prop, const u32 dflt); |
19 | + | |
20 | +/** | |
21 | + * Add data to the root of the FDT before booting the OS. | |
22 | + * | |
23 | + * See doc/device-tree-bindings/root.txt | |
24 | + * | |
25 | + * @param fdt FDT address in memory | |
26 | + * @return 0 if ok, or -FDT_ERR_... on error | |
27 | + */ | |
19 | 28 | int fdt_root(void *fdt); |
29 | + | |
30 | +/** | |
31 | + * Add chosen data the FDT before booting the OS. | |
32 | + * | |
33 | + * In particular, this adds the kernel command line (bootargs) to the FDT. | |
34 | + * | |
35 | + * @param fdt FDT address in memory | |
36 | + * @return 0 if ok, or -FDT_ERR_... on error | |
37 | + */ | |
20 | 38 | int fdt_chosen(void *fdt); |
39 | + | |
40 | +/** | |
41 | + * Add initrd information to the FDT before booting the OS. | |
42 | + * | |
43 | + * @param fdt FDT address in memory | |
44 | + * @return 0 if ok, or -FDT_ERR_... on error | |
45 | + */ | |
21 | 46 | int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end); |
47 | + | |
22 | 48 | void do_fixup_by_path(void *fdt, const char *path, const char *prop, |
23 | 49 | const void *val, int len, int create); |
24 | 50 | void do_fixup_by_path_u32(void *fdt, const char *path, const char *prop, |