Lines Matching refs:fdt

119 TEE_Result dt_driver_register_provider(const void *fdt, int nodeoffset,  in dt_driver_register_provider()  argument
129 provider_cells = fdt_get_dt_driver_cells(fdt, nodeoffset, type); in dt_driver_register_provider()
135 phandle = fdt_get_phandle(fdt, nodeoffset); in dt_driver_register_provider()
161 int fdt_get_dt_driver_cells(const void *fdt, int nodeoffset, in fdt_get_dt_driver_cells() argument
179 c = fdt_getprop(fdt, nodeoffset, cells_name, &len); in fdt_get_dt_driver_cells()
245 const void *fdt, int nodeoffset, in dt_driver_device_from_node_idx_prop() argument
258 prop = fdt_getprop(fdt, nodeoffset, prop_name, &len); in dt_driver_device_from_node_idx_prop()
261 fdt_get_name(fdt, nodeoffset, NULL)); in dt_driver_device_from_node_idx_prop()
291 static void __maybe_unused print_probe_list(const void *fdt __maybe_unused) in print_probe_list()
303 fdt_get_name(fdt, elt->nodeoffset, NULL)); in print_probe_list()
314 fdt_get_name(fdt, elt->nodeoffset, NULL)); in print_probe_list()
323 static TEE_Result probe_driver_node(const void *fdt, in probe_driver_node() argument
330 node_name = fdt_get_name(fdt, elt->nodeoffset, NULL); in probe_driver_node()
340 res = elt->dt_drv->probe(fdt, elt->nodeoffset, elt->dm->compat_data); in probe_driver_node()
365 static TEE_Result alloc_elt_and_probe(const void *fdt, int node, in alloc_elt_and_probe() argument
381 return probe_driver_node(fdt, elt); in alloc_elt_and_probe()
385 static TEE_Result probe_device_by_compat(const void *fdt, int node, in probe_device_by_compat() argument
398 return alloc_elt_and_probe(fdt, node, drv, dm); in probe_device_by_compat()
408 TEE_Result dt_driver_probe_device_by_node(const void *fdt, int nodeoffset, in dt_driver_probe_device_by_node() argument
419 count = fdt_stringlist_count(fdt, nodeoffset, "compatible"); in dt_driver_probe_device_by_node()
424 compat = fdt_stringlist_get(fdt, nodeoffset, "compatible", in dt_driver_probe_device_by_node()
429 res = probe_device_by_compat(fdt, nodeoffset, compat, type); in dt_driver_probe_device_by_node()
438 static TEE_Result process_probe_list(const void *fdt) in process_probe_list() argument
454 print_probe_list(fdt); in process_probe_list()
472 switch (probe_driver_node(fdt, elt)) { in process_probe_list()
513 static TEE_Result add_node_to_probe(const void *fdt, int node, in add_node_to_probe() argument
517 const char __maybe_unused *node_name = fdt_get_name(fdt, node, NULL); in add_node_to_probe()
550 print_probe_list(fdt); in add_node_to_probe()
565 static TEE_Result add_probe_node_by_compat(const void *fdt, int node, in add_probe_node_by_compat() argument
578 res = add_node_to_probe(fdt, node, dt_drv, dm); in add_probe_node_by_compat()
602 TEE_Result dt_driver_maybe_add_probe_node(const void *fdt, int node) in dt_driver_maybe_add_probe_node() argument
610 if (_fdt_get_status(fdt, node) == DT_STATUS_DISABLED) in dt_driver_maybe_add_probe_node()
613 count = fdt_stringlist_count(fdt, node, "compatible"); in dt_driver_maybe_add_probe_node()
618 compat = fdt_stringlist_get(fdt, node, "compatible", idx, &len); in dt_driver_maybe_add_probe_node()
621 res = add_probe_node_by_compat(fdt, node, compat); in dt_driver_maybe_add_probe_node()
631 static void parse_node(const void *fdt, int node) in parse_node() argument
636 fdt_for_each_subnode(subnode, fdt, node) { in parse_node()
637 res = dt_driver_maybe_add_probe_node(fdt, subnode); in parse_node()
640 fdt_get_name(fdt, subnode, NULL), res); in parse_node()
650 if (_fdt_get_status(fdt, subnode) == DT_STATUS_DISABLED) in parse_node()
653 parse_node(fdt, subnode); in parse_node()
665 const void *fdt = NULL; in probe_dt_drivers_early() local
670 fdt = get_embedded_dt(); in probe_dt_drivers_early()
671 assert(fdt); in probe_dt_drivers_early()
673 parse_node(fdt, fdt_path_offset(fdt, "/")); in probe_dt_drivers_early()
675 res = process_probe_list(fdt); in probe_dt_drivers_early()
678 print_probe_list(fdt); in probe_dt_drivers_early()
688 const void *fdt = NULL; in probe_dt_drivers() local
693 fdt = get_embedded_dt(); in probe_dt_drivers()
694 assert(fdt); in probe_dt_drivers()
696 res = process_probe_list(fdt); in probe_dt_drivers()
699 print_probe_list(fdt); in probe_dt_drivers()
716 const void * __maybe_unused fdt = NULL; in release_probe_lists() local
721 fdt = get_embedded_dt(); in release_probe_lists()
723 assert(fdt && TAILQ_EMPTY(&dt_driver_probe_list)); in release_probe_lists()
742 static TEE_Result simple_bus_probe(const void *fdt, int node, in simple_bus_probe() argument
748 fdt_for_each_subnode(subnode, fdt, node) { in simple_bus_probe()
749 res = dt_driver_maybe_add_probe_node(fdt, subnode); in simple_bus_probe()
752 fdt_get_name(fdt, subnode, NULL), res); in simple_bus_probe()