Lines Matching full:irq

42 	int irq, hwirq;  in hsta_setup_msi_irqs()  local
52 irq = msi_bitmap_alloc_hwirqs(&ppc4xx_hsta_msi.bmp, 1); in hsta_setup_msi_irqs()
53 if (irq < 0) { in hsta_setup_msi_irqs()
56 return irq; in hsta_setup_msi_irqs()
59 hwirq = ppc4xx_hsta_msi.irq_map[irq]; in hsta_setup_msi_irqs()
61 pr_err("%s: Failed mapping irq %d\n", __func__, irq); in hsta_setup_msi_irqs()
69 addr = ppc4xx_hsta_msi.address + irq*0x10; in hsta_setup_msi_irqs()
76 pr_debug("%s: Setup irq %d (0x%0llx)\n", __func__, hwirq, in hsta_setup_msi_irqs()
83 msi_bitmap_free_hwirqs(&ppc4xx_hsta_msi.bmp, irq, 1); in hsta_setup_msi_irqs()
94 int irq; in hsta_find_hwirq_offset() local
97 for (irq = 0; irq < ppc4xx_hsta_msi.irq_count; irq++) in hsta_find_hwirq_offset()
98 if (ppc4xx_hsta_msi.irq_map[irq] == hwirq) in hsta_find_hwirq_offset()
99 return irq; in hsta_find_hwirq_offset()
107 int irq; in hsta_teardown_msi_irqs() local
110 irq = hsta_find_hwirq_offset(entry->irq); in hsta_teardown_msi_irqs()
112 /* entry->irq should always be in irq_map */ in hsta_teardown_msi_irqs()
113 BUG_ON(irq < 0); in hsta_teardown_msi_irqs()
114 irq_set_msi_desc(entry->irq, NULL); in hsta_teardown_msi_irqs()
115 msi_bitmap_free_hwirqs(&ppc4xx_hsta_msi.bmp, irq, 1); in hsta_teardown_msi_irqs()
116 pr_debug("%s: Teardown IRQ %u (index %u)\n", __func__, in hsta_teardown_msi_irqs()
117 entry->irq, irq); in hsta_teardown_msi_irqs()
118 entry->irq = 0; in hsta_teardown_msi_irqs()
126 int irq, ret, irq_count; in hsta_msi_probe() local
137 dev_err(dev, "Unable to find IRQ range\n"); in hsta_msi_probe()
161 /* Setup a mapping from irq offsets to hardware irq numbers */ in hsta_msi_probe()
162 for (irq = 0; irq < irq_count; irq++) { in hsta_msi_probe()
163 ppc4xx_hsta_msi.irq_map[irq] = in hsta_msi_probe()
164 irq_of_parse_and_map(dev->of_node, irq); in hsta_msi_probe()
165 if (!ppc4xx_hsta_msi.irq_map[irq]) { in hsta_msi_probe()
166 dev_err(dev, "Unable to map IRQ\n"); in hsta_msi_probe()