Lines Matching refs:fdt

16 const struct dt_driver *dt_find_compatible_driver(const void *fdt, int offs)  in dt_find_compatible_driver()  argument
26 if (!fdt_node_check_compatible(fdt, offs, in dt_find_compatible_driver()
36 bool dt_have_prop(const void *fdt, int offs, const char *propname) in dt_have_prop() argument
40 prop = fdt_getprop(fdt, offs, propname, NULL); in dt_have_prop()
45 int dt_disable_status(void *fdt, int node) in dt_disable_status() argument
50 prop = fdt_getprop(fdt, node, "status", &len); in dt_disable_status()
52 if (fdt_setprop_string(fdt, node, "status", "disabled")) in dt_disable_status()
69 if (fdt_setprop_inplace(fdt, node, "status", "disabled", len)) in dt_disable_status()
76 int dt_enable_secure_status(void *fdt, int node) in dt_enable_secure_status() argument
78 if (dt_disable_status(fdt, node)) { in dt_enable_secure_status()
83 if (fdt_setprop_string(fdt, node, "secure-status", "okay")) in dt_enable_secure_status()
89 int dt_map_dev(const void *fdt, int offs, vaddr_t *base, size_t *size) in dt_map_dev() argument
99 st = _fdt_get_status(fdt, offs); in dt_map_dev()
103 pbase = _fdt_reg_base_address(fdt, offs); in dt_map_dev()
106 sz = _fdt_reg_size(fdt, offs); in dt_map_dev()
159 paddr_t _fdt_reg_base_address(const void *fdt, int offs) in _fdt_reg_base_address() argument
166 parent = fdt_parent_offset(fdt, offs); in _fdt_reg_base_address()
170 reg = fdt_getprop(fdt, offs, "reg", &len); in _fdt_reg_base_address()
174 ncells = fdt_address_cells(fdt, parent); in _fdt_reg_base_address()
181 size_t _fdt_reg_size(const void *fdt, int offs) in _fdt_reg_size() argument
189 parent = fdt_parent_offset(fdt, offs); in _fdt_reg_size()
193 reg = (const uint32_t *)fdt_getprop(fdt, offs, "reg", &len); in _fdt_reg_size()
197 n = fdt_address_cells(fdt, parent); in _fdt_reg_size()
203 n = fdt_size_cells(fdt, parent); in _fdt_reg_size()
223 int _fdt_get_status(const void *fdt, int offs) in _fdt_get_status() argument
229 prop = fdt_getprop(fdt, offs, "status", &len); in _fdt_get_status()
235 prop = fdt_getprop(fdt, offs, "secure-status", &len); in _fdt_get_status()
251 void _fdt_fill_device_info(const void *fdt, struct dt_node_info *info, int offs) in _fdt_fill_device_info() argument
262 dinfo.reg = _fdt_reg_base_address(fdt, offs); in _fdt_fill_device_info()
263 dinfo.reg_size = _fdt_reg_size(fdt, offs); in _fdt_fill_device_info()
265 cuint = fdt_getprop(fdt, offs, "clocks", NULL); in _fdt_fill_device_info()
271 cuint = fdt_getprop(fdt, offs, "resets", NULL); in _fdt_fill_device_info()
277 dinfo.interrupt = dt_get_irq_type_prio(fdt, offs, &dinfo.type, in _fdt_fill_device_info()
280 dinfo.status = _fdt_get_status(fdt, offs); in _fdt_fill_device_info()