Lines Matching refs:msir

55 	struct ls_scfg_msir	*msir;  member
121 if (msi_data->msir[cpu].gic_irq <= 0) { in ls_scfg_msi_set_affinity()
195 struct ls_scfg_msir *msir = irq_desc_get_handler_data(desc); in ls_scfg_msi_irq_handler() local
196 struct ls_scfg_msi *msi_data = msir->msi_data; in ls_scfg_msi_irq_handler()
202 val = ioread32be(msir->reg); in ls_scfg_msi_irq_handler()
204 pos = msir->bit_start; in ls_scfg_msi_irq_handler()
205 size = msir->bit_end + 1; in ls_scfg_msi_irq_handler()
208 hwirq = ((msir->bit_end - pos) << msi_data->cfg->ibs_shift) | in ls_scfg_msi_irq_handler()
209 msir->srs; in ls_scfg_msi_irq_handler()
243 struct ls_scfg_msir *msir; in ls_scfg_msi_setup_hwirq() local
250 msir = &msi_data->msir[index]; in ls_scfg_msi_setup_hwirq()
251 msir->index = index; in ls_scfg_msi_setup_hwirq()
252 msir->msi_data = msi_data; in ls_scfg_msi_setup_hwirq()
253 msir->gic_irq = virq; in ls_scfg_msi_setup_hwirq()
254 msir->reg = msi_data->regs + msi_data->cfg->msir_base + 4 * index; in ls_scfg_msi_setup_hwirq()
257 msir->bit_start = 32 - ((msir->index + 1) * in ls_scfg_msi_setup_hwirq()
259 msir->bit_end = msir->bit_start + in ls_scfg_msi_setup_hwirq()
262 msir->bit_start = 0; in ls_scfg_msi_setup_hwirq()
263 msir->bit_end = msi_data->cfg->msir_irqs - 1; in ls_scfg_msi_setup_hwirq()
266 irq_set_chained_handler_and_data(msir->gic_irq, in ls_scfg_msi_setup_hwirq()
268 msir); in ls_scfg_msi_setup_hwirq()
272 irq_set_affinity(msir->gic_irq, get_cpu_mask(index)); in ls_scfg_msi_setup_hwirq()
273 msir->srs = 0; /* This value is determined by the CPU */ in ls_scfg_msi_setup_hwirq()
275 msir->srs = index; in ls_scfg_msi_setup_hwirq()
278 if (!msi_affinity_flag || msir->index == 0) { in ls_scfg_msi_setup_hwirq()
280 hwirq = i << msi_data->cfg->ibs_shift | msir->index; in ls_scfg_msi_setup_hwirq()
288 static int ls_scfg_msi_teardown_hwirq(struct ls_scfg_msir *msir) in ls_scfg_msi_teardown_hwirq() argument
290 struct ls_scfg_msi *msi_data = msir->msi_data; in ls_scfg_msi_teardown_hwirq()
293 if (msir->gic_irq > 0) in ls_scfg_msi_teardown_hwirq()
294 irq_set_chained_handler_and_data(msir->gic_irq, NULL, NULL); in ls_scfg_msi_teardown_hwirq()
297 hwirq = i << msi_data->cfg->ibs_shift | msir->index; in ls_scfg_msi_teardown_hwirq()
383 msi_data->msir = devm_kcalloc(&pdev->dev, msi_data->msir_num, in ls_scfg_msi_probe()
384 sizeof(*msi_data->msir), in ls_scfg_msi_probe()
386 if (!msi_data->msir) in ls_scfg_msi_probe()
407 ls_scfg_msi_teardown_hwirq(&msi_data->msir[i]); in ls_scfg_msi_remove()