Lines Matching refs:fwspec
370 struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, in irq_find_matching_fwspec() argument
374 struct fwnode_handle *fwnode = fwspec->fwnode; in irq_find_matching_fwspec()
388 if (h->ops->select && fwspec->param_count) in irq_find_matching_fwspec()
389 rc = h->ops->select(h, fwspec, bus_token); in irq_find_matching_fwspec()
720 struct irq_fwspec *fwspec, in irq_domain_translate() argument
725 return d->ops->translate(d, fwspec, hwirq, type); in irq_domain_translate()
728 return d->ops->xlate(d, to_of_node(fwspec->fwnode), in irq_domain_translate()
729 fwspec->param, fwspec->param_count, in irq_domain_translate()
733 *hwirq = fwspec->param[0]; in irq_domain_translate()
739 struct irq_fwspec *fwspec) in of_phandle_args_to_fwspec() argument
743 fwspec->fwnode = np ? &np->fwnode : NULL; in of_phandle_args_to_fwspec()
744 fwspec->param_count = count; in of_phandle_args_to_fwspec()
747 fwspec->param[i] = args[i]; in of_phandle_args_to_fwspec()
750 unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec) in irq_create_fwspec_mapping() argument
758 if (fwspec->fwnode) { in irq_create_fwspec_mapping()
759 domain = irq_find_matching_fwspec(fwspec, DOMAIN_BUS_WIRED); in irq_create_fwspec_mapping()
761 domain = irq_find_matching_fwspec(fwspec, DOMAIN_BUS_ANY); in irq_create_fwspec_mapping()
768 of_node_full_name(to_of_node(fwspec->fwnode))); in irq_create_fwspec_mapping()
772 if (irq_domain_translate(domain, fwspec, &hwirq, &type)) in irq_create_fwspec_mapping()
810 hwirq, of_node_full_name(to_of_node(fwspec->fwnode))); in irq_create_fwspec_mapping()
815 virq = irq_domain_alloc_irqs(domain, 1, NUMA_NO_NODE, fwspec); in irq_create_fwspec_mapping()
843 struct irq_fwspec fwspec; in irq_create_of_mapping() local
846 irq_data->args_count, &fwspec); in irq_create_of_mapping()
848 return irq_create_fwspec_mapping(&fwspec); in irq_create_of_mapping()
939 struct irq_fwspec fwspec; in irq_domain_xlate_twocell() local
941 of_phandle_args_to_fwspec(ctrlr, intspec, intsize, &fwspec); in irq_domain_xlate_twocell()
942 return irq_domain_translate_twocell(d, &fwspec, out_hwirq, out_type); in irq_domain_xlate_twocell()
983 struct irq_fwspec *fwspec, in irq_domain_translate_onecell() argument
987 if (WARN_ON(fwspec->param_count < 1)) in irq_domain_translate_onecell()
989 *out_hwirq = fwspec->param[0]; in irq_domain_translate_onecell()
1004 struct irq_fwspec *fwspec, in irq_domain_translate_twocell() argument
1008 if (WARN_ON(fwspec->param_count < 2)) in irq_domain_translate_twocell()
1010 *out_hwirq = fwspec->param[0]; in irq_domain_translate_twocell()
1011 *out_type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK; in irq_domain_translate_twocell()