git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/master' into isa/arm64
[lunaix-os.git]
/
lunaix-os
/
hal
/
devtree
/
devtree.h
diff --git
a/lunaix-os/hal/devtree/devtree.h
b/lunaix-os/hal/devtree/devtree.h
index c2374c82820d05d2352b28e12d0038d8ab455432..0ddda80e4b7703da2c1c5f0785d35708dfb0e60b 100644
(file)
--- a/
lunaix-os/hal/devtree/devtree.h
+++ b/
lunaix-os/hal/devtree/devtree.h
@@
-2,46
+2,34
@@
#define __LUNAIX_DEVTREE_INTERNAL_H
#include <hal/devtree.h>
#define __LUNAIX_DEVTREE_INTERNAL_H
#include <hal/devtree.h>
-
#include <klibc/string.h>
static inline bool
#include <klibc/string.h>
static inline bool
-propeq(struct fdt_iter* it, const char* key)
-{
- return streq(fdtit_prop_key(it), key);
-}
-
-static inline void
-__mkprop_val32(struct fdt_iter* it, struct dt_prop_val* val)
+propeq(struct fdt_blob* fdt, fdt_loc_t loc, const char* key)
{
{
- val->u32_val = le(*(u32_t*)&it->prop[1]);
- val->size = le(it->prop->len);
+ return streq(fdt_prop_key(fdt, loc), key);
}
}
-static inline
void
-__
mkprop_val64(struct fdt_iter* it, struct dt_prop_val* val
)
+static inline
ptr_t
+__
prop_val_ptr(struct fdt_prop* prop
)
{
{
- val->u64_val = le64(*(u64_t*)&it->prop[1]);
- val->size = le(it->prop->len);
+ return __ptr(prop) + sizeof(struct fdt_prop);
}
static inline void
}
static inline void
-__mkprop_ptr(
struct fdt_iter* it, struct dt_pro
p_val* val)
+__mkprop_ptr(
fdt_loc_t loc, struct dt
p_val* val)
{
{
- val->ptr_val = __p
tr(&it->prop[1]
);
- val->size = l
e(it->prop->len)
;
+ val->ptr_val = __p
rop_val_ptr(loc.prop
);
+ val->size = l
oc.prop->len
;
}
static inline u32_t
}
static inline u32_t
-__prop_getu32(
struct fdt_iter* it
)
+__prop_getu32(
fdt_loc_t loc
)
{
{
- return l
e(*(u32_t*)&it->prop[1])
;
+ return l
oc.prop->val[0]
;
}
bool
}
bool
-parse_stdintr_prop(struct fdt_iter* it, struct dt_intr_node* node);
-
-bool
-parse_stdintr_prop(struct fdt_iter* it, struct dt_intr_node* node);
+parse_stdintr_prop(struct fdt_blob*, fdt_loc_t, struct dtn_intr*);
#endif /* __LUNAIX_DEVTREE_H */
#endif /* __LUNAIX_DEVTREE_H */