diff options
| author | Yuntao Wang <yuntao.wang@linux.dev> | 2025-11-15 16:47:46 +0300 |
|---|---|---|
| committer | Rob Herring (Arm) <robh@kernel.org> | 2025-11-20 17:32:48 +0300 |
| commit | 8278cb72c60399f6dc6300c409879fb4c7291513 (patch) | |
| tree | 71c6043ac81eb195f39c2169f87582a8152e6da2 /include/linux | |
| parent | a5387fbc66486a54add1db74a11c12f383a44987 (diff) | |
| download | linux-8278cb72c60399f6dc6300c409879fb4c7291513.tar.xz | |
of/fdt: Consolidate duplicate code into helper functions
Currently, there are many pieces of nearly identical code scattered across
different places. Consolidate the duplicate code into helper functions to
improve maintainability and reduce the likelihood of errors.
Signed-off-by: Yuntao Wang <yuntao.wang@linux.dev>
Link: https://patch.msgid.link/20251115134753.179931-2-yuntao.wang@linux.dev
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/of_fdt.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index b8d6c0c20876..51dadbaa3d63 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h @@ -55,6 +55,15 @@ extern int of_get_flat_dt_subnode_by_name(unsigned long node, const char *uname); extern const void *of_get_flat_dt_prop(unsigned long node, const char *name, int *size); + +extern const __be32 *of_flat_dt_get_addr_size_prop(unsigned long node, + const char *name, + int *entries); +extern bool of_flat_dt_get_addr_size(unsigned long node, const char *name, + u64 *addr, u64 *size); +extern void of_flat_dt_read_addr_size(const __be32 *prop, int entry_index, + u64 *addr, u64 *size); + extern int of_flat_dt_is_compatible(unsigned long node, const char *name); extern unsigned long of_get_flat_dt_root(void); extern uint32_t of_get_flat_dt_phandle(unsigned long node); |
