···571571int irq_domain_xlate_onetwocell(struct irq_domain *d, struct device_node *ctrlr,572572 const u32 *intspec, unsigned int intsize,573573 irq_hw_number_t *out_hwirq, unsigned int *out_type);574574+int irq_domain_xlate_twothreecell(struct irq_domain *d, struct device_node *ctrlr,575575+ const u32 *intspec, unsigned int intsize,576576+ irq_hw_number_t *out_hwirq, unsigned int *out_type);574577575575-int irq_domain_translate_twocell(struct irq_domain *d,576576- struct irq_fwspec *fwspec,577577- unsigned long *out_hwirq,578578- unsigned int *out_type);579579-580580-int irq_domain_translate_onecell(struct irq_domain *d,581581- struct irq_fwspec *fwspec,582582- unsigned long *out_hwirq,583583- unsigned int *out_type);578578+int irq_domain_translate_onecell(struct irq_domain *d, struct irq_fwspec *fwspec,579579+ unsigned long *out_hwirq, unsigned int *out_type);580580+int irq_domain_translate_twocell(struct irq_domain *d, struct irq_fwspec *fwspec,581581+ unsigned long *out_hwirq, unsigned int *out_type);582582+int irq_domain_translate_twothreecell(struct irq_domain *d, struct irq_fwspec *fwspec,583583+ unsigned long *out_hwirq, unsigned int *out_type);584584585585/* IPI functions */586586int irq_reserve_ipi(struct irq_domain *domain, const struct cpumask *dest);
+56
kernel/irq/irqdomain.c
···11331133EXPORT_SYMBOL_GPL(irq_domain_xlate_twocell);1134113411351135/**11361136+ * irq_domain_xlate_twothreecell() - Generic xlate for direct two or three cell bindings11371137+ * @d: Interrupt domain involved in the translation11381138+ * @ctrlr: The device tree node for the device whose interrupt is translated11391139+ * @intspec: The interrupt specifier data from the device tree11401140+ * @intsize: The number of entries in @intspec11411141+ * @out_hwirq: Pointer to storage for the hardware interrupt number11421142+ * @out_type: Pointer to storage for the interrupt type11431143+ *11441144+ * Device Tree interrupt specifier translation function for two or three11451145+ * cell bindings, where the cell values map directly to the hardware11461146+ * interrupt number and the type specifier.11471147+ */11481148+int irq_domain_xlate_twothreecell(struct irq_domain *d, struct device_node *ctrlr,11491149+ const u32 *intspec, unsigned int intsize,11501150+ irq_hw_number_t *out_hwirq, unsigned int *out_type)11511151+{11521152+ struct irq_fwspec fwspec;11531153+11541154+ of_phandle_args_to_fwspec(ctrlr, intspec, intsize, &fwspec);11551155+11561156+ return irq_domain_translate_twothreecell(d, &fwspec, out_hwirq, out_type);11571157+}11581158+EXPORT_SYMBOL_GPL(irq_domain_xlate_twothreecell);11591159+11601160+/**11361161 * irq_domain_xlate_onetwocell() - Generic xlate for one or two cell bindings11371162 * @d: Interrupt domain involved in the translation11381163 * @ctrlr: The device tree node for the device whose interrupt is translated···12401215 return 0;12411216}12421217EXPORT_SYMBOL_GPL(irq_domain_translate_twocell);12181218+12191219+/**12201220+ * irq_domain_translate_twothreecell() - Generic translate for direct two or three cell12211221+ * bindings12221222+ * @d: Interrupt domain involved in the translation12231223+ * @fwspec: The firmware interrupt specifier to translate12241224+ * @out_hwirq: Pointer to storage for the hardware interrupt number12251225+ * @out_type: Pointer to storage for the interrupt type12261226+ *12271227+ * Firmware interrupt specifier translation function for two or three cell12281228+ * specifications, where the parameter values map directly to the hardware12291229+ * interrupt number and the type specifier.12301230+ */12311231+int irq_domain_translate_twothreecell(struct irq_domain *d, struct irq_fwspec *fwspec,12321232+ unsigned long *out_hwirq, unsigned int *out_type)12331233+{12341234+ if (fwspec->param_count == 2) {12351235+ *out_hwirq = fwspec->param[0];12361236+ *out_type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK;12371237+ return 0;12381238+ }12391239+12401240+ if (fwspec->param_count == 3) {12411241+ *out_hwirq = fwspec->param[1];12421242+ *out_type = fwspec->param[2] & IRQ_TYPE_SENSE_MASK;12431243+ return 0;12441244+ }12451245+12461246+ return -EINVAL;12471247+}12481248+EXPORT_SYMBOL_GPL(irq_domain_translate_twothreecell);1243124912441250int irq_domain_alloc_descs(int virq, unsigned int cnt, irq_hw_number_t hwirq,12451251 int node, const struct irq_affinity_desc *affinity)