• Home
  • Raw
  • Download

Lines Matching refs:msir

54 	struct ls_scfg_msir	*msir;  member
120 if (msi_data->msir[cpu].gic_irq <= 0) { in ls_scfg_msi_set_affinity()
194 struct ls_scfg_msir *msir = irq_desc_get_handler_data(desc); in ls_scfg_msi_irq_handler() local
195 struct ls_scfg_msi *msi_data = msir->msi_data; in ls_scfg_msi_irq_handler()
201 val = ioread32be(msir->reg); in ls_scfg_msi_irq_handler()
203 pos = msir->bit_start; in ls_scfg_msi_irq_handler()
204 size = msir->bit_end + 1; in ls_scfg_msi_irq_handler()
207 hwirq = ((msir->bit_end - pos) << msi_data->cfg->ibs_shift) | in ls_scfg_msi_irq_handler()
208 msir->srs; in ls_scfg_msi_irq_handler()
242 struct ls_scfg_msir *msir; in ls_scfg_msi_setup_hwirq() local
249 msir = &msi_data->msir[index]; in ls_scfg_msi_setup_hwirq()
250 msir->index = index; in ls_scfg_msi_setup_hwirq()
251 msir->msi_data = msi_data; in ls_scfg_msi_setup_hwirq()
252 msir->gic_irq = virq; in ls_scfg_msi_setup_hwirq()
253 msir->reg = msi_data->regs + msi_data->cfg->msir_base + 4 * index; in ls_scfg_msi_setup_hwirq()
256 msir->bit_start = 32 - ((msir->index + 1) * in ls_scfg_msi_setup_hwirq()
258 msir->bit_end = msir->bit_start + in ls_scfg_msi_setup_hwirq()
261 msir->bit_start = 0; in ls_scfg_msi_setup_hwirq()
262 msir->bit_end = msi_data->cfg->msir_irqs - 1; in ls_scfg_msi_setup_hwirq()
265 irq_set_chained_handler_and_data(msir->gic_irq, in ls_scfg_msi_setup_hwirq()
267 msir); in ls_scfg_msi_setup_hwirq()
271 irq_set_affinity(msir->gic_irq, get_cpu_mask(index)); in ls_scfg_msi_setup_hwirq()
272 msir->srs = 0; /* This value is determined by the CPU */ in ls_scfg_msi_setup_hwirq()
274 msir->srs = index; in ls_scfg_msi_setup_hwirq()
277 if (!msi_affinity_flag || msir->index == 0) { in ls_scfg_msi_setup_hwirq()
279 hwirq = i << msi_data->cfg->ibs_shift | msir->index; in ls_scfg_msi_setup_hwirq()
287 static int ls_scfg_msi_teardown_hwirq(struct ls_scfg_msir *msir) in ls_scfg_msi_teardown_hwirq() argument
289 struct ls_scfg_msi *msi_data = msir->msi_data; in ls_scfg_msi_teardown_hwirq()
292 if (msir->gic_irq > 0) in ls_scfg_msi_teardown_hwirq()
293 irq_set_chained_handler_and_data(msir->gic_irq, NULL, NULL); in ls_scfg_msi_teardown_hwirq()
296 hwirq = i << msi_data->cfg->ibs_shift | msir->index; in ls_scfg_msi_teardown_hwirq()
386 msi_data->msir = devm_kcalloc(&pdev->dev, msi_data->msir_num, in ls_scfg_msi_probe()
387 sizeof(*msi_data->msir), in ls_scfg_msi_probe()
389 if (!msi_data->msir) in ls_scfg_msi_probe()
410 ls_scfg_msi_teardown_hwirq(&msi_data->msir[i]); in ls_scfg_msi_remove()