diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-05-21 15:04:01 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-05-21 15:04:01 +0300 |
| commit | 836026dbba64793afc0d2591ffdb6fb39b696977 (patch) | |
| tree | 214cab6c75ac15785a20728bde406e70797f5229 /include/libfdt.h | |
| parent | 1ea7d9dec1b460ab76dfd6270596c8138c9c2b40 (diff) | |
| download | kmi-836026dbba64793afc0d2591ffdb6fb39b696977.tar.gz kmi-836026dbba64793afc0d2591ffdb6fb39b696977.zip | |
implement timers better
Diffstat (limited to 'include/libfdt.h')
| -rw-r--r-- | include/libfdt.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/libfdt.h b/include/libfdt.h index ffe979d..63e96fd 100644 --- a/include/libfdt.h +++ b/include/libfdt.h @@ -20,8 +20,11 @@ void __dbg_fdt(const void *fdt, int node_offset, int depth); #define dbg_fdt(...) #endif +#define fdt_load_int32_ptr(p) fdt32_to_cpu(get_unaligned((uint32_t *)p)) + +#define fdt_load_int64_ptr(p) fdt64_to_cpu(get_unaligned((uint64_t *)p)) + #define fdt_load_int_ptr(c, p) \ - ((c) == 2 ? fdt64_to_cpu(get_unaligned((uint64_t *)p)) : \ - fdt32_to_cpu(get_unaligned((uint32_t *)p))) + ((c) == 2 ? fdt_load_int64_ptr(p) : fdt_load_int32_ptr(p)) #endif |
