diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-10-11 13:58:11 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-10-11 13:58:11 +0300 |
| commit | 091463c1057f50b47156a138d7d1dbd09494a6d5 (patch) | |
| tree | 954bc11974362f5a856a20e6d7d8b0b451d35fa5 /include | |
| parent | d2ff961a2a08229e1f2245e8dba9b2275016133c (diff) | |
| download | kmi-091463c1057f50b47156a138d7d1dbd09494a6d5.tar.gz kmi-091463c1057f50b47156a138d7d1dbd09494a6d5.zip | |
Moved some functions to common/
Diffstat (limited to 'include')
| -rw-r--r-- | include/apos/debug.h | 6 | ||||
| -rw-r--r-- | include/libfdt.h | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/apos/debug.h b/include/apos/debug.h index 021612d..5830c45 100644 --- a/include/apos/debug.h +++ b/include/apos/debug.h @@ -9,8 +9,14 @@ enum serial_dev_t { NS16550A, }; +struct dbg_info_t { + void *dbg_ptr; + enum serial_dev_t dev; +}; + void __fmt(1, 2) dbg(const char *fmt, ...); void dbg_init(void *pt, enum serial_dev_t dev); +struct dbg_info_t dbg_from_fdt(void *fdt); #else diff --git a/include/libfdt.h b/include/libfdt.h index 406b6d7..aa95bd3 100644 --- a/include/libfdt.h +++ b/include/libfdt.h @@ -2,6 +2,15 @@ #define APOS_LIBFDT_H #include "../dtc/libfdt/libfdt.h" +/* apos additions, implementation can be found in common/fdt.c */ +struct cell_info_t { + uint32_t size_cells; + uint32_t addr_cells; +}; + +struct cell_info_t get_cellinfo(void *fdt, int offset); +struct cell_info_t get_reginfo(void *fdt, const char *path); + #if defined(DEBUG) void __dbg_fdt(void *fdt, int node_offset, int depth); #define dbg_fdt(fdt) __dbg_fdt(fdt, 0, 0) |
