Lines Matching refs:fwspec
435 struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, in irq_find_matching_fwspec() argument
439 struct fwnode_handle *fwnode = fwspec->fwnode; in irq_find_matching_fwspec()
453 if (h->ops->select && fwspec->param_count) in irq_find_matching_fwspec()
454 rc = h->ops->select(h, fwspec, bus_token); in irq_find_matching_fwspec()
763 struct irq_fwspec *fwspec, in irq_domain_translate() argument
768 return d->ops->translate(d, fwspec, hwirq, type); in irq_domain_translate()
771 return d->ops->xlate(d, to_of_node(fwspec->fwnode), in irq_domain_translate()
772 fwspec->param, fwspec->param_count, in irq_domain_translate()
776 *hwirq = fwspec->param[0]; in irq_domain_translate()
781 unsigned int count, struct irq_fwspec *fwspec) in of_phandle_args_to_fwspec() argument
785 fwspec->fwnode = of_node_to_fwnode(np); in of_phandle_args_to_fwspec()
786 fwspec->param_count = count; in of_phandle_args_to_fwspec()
789 fwspec->param[i] = args[i]; in of_phandle_args_to_fwspec()
793 unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec) in irq_create_fwspec_mapping() argument
801 if (fwspec->fwnode) { in irq_create_fwspec_mapping()
802 domain = irq_find_matching_fwspec(fwspec, DOMAIN_BUS_WIRED); in irq_create_fwspec_mapping()
804 domain = irq_find_matching_fwspec(fwspec, DOMAIN_BUS_ANY); in irq_create_fwspec_mapping()
811 of_node_full_name(to_of_node(fwspec->fwnode))); in irq_create_fwspec_mapping()
815 if (irq_domain_translate(domain, fwspec, &hwirq, &type)) in irq_create_fwspec_mapping()
857 hwirq, of_node_full_name(to_of_node(fwspec->fwnode))); in irq_create_fwspec_mapping()
864 fwspec, false, NULL); in irq_create_fwspec_mapping()
893 struct irq_fwspec fwspec; in irq_create_of_mapping() local
896 irq_data->args_count, &fwspec); in irq_create_of_mapping()
898 return irq_create_fwspec_mapping(&fwspec); in irq_create_of_mapping()
1007 struct irq_fwspec fwspec; in irq_domain_xlate_twocell() local
1009 of_phandle_args_to_fwspec(ctrlr, intspec, intsize, &fwspec); in irq_domain_xlate_twocell()
1010 return irq_domain_translate_twocell(d, &fwspec, out_hwirq, out_type); in irq_domain_xlate_twocell()
1051 struct irq_fwspec *fwspec, in irq_domain_translate_onecell() argument
1055 if (WARN_ON(fwspec->param_count < 1)) in irq_domain_translate_onecell()
1057 *out_hwirq = fwspec->param[0]; in irq_domain_translate_onecell()
1072 struct irq_fwspec *fwspec, in irq_domain_translate_twocell() argument
1076 if (WARN_ON(fwspec->param_count < 2)) in irq_domain_translate_twocell()
1078 *out_hwirq = fwspec->param[0]; in irq_domain_translate_twocell()
1079 *out_type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK; in irq_domain_translate_twocell()