Add support for checking whether given IRQ is available.
Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
plt_free(irq_chip->irq_vecs);
plt_free(irq_chip);
}
+
+bool
+roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip, int irq_num)
+{
+ if (irq_num < 0 || (uint64_t)irq_num >= irq_chip->max_irq)
+ return false;
+
+ return irq_chip->avail_irq_bmask & BIT(irq_num);
+}
__roc_api struct roc_bphy_irq_chip *roc_bphy_intr_init(void);
__roc_api void roc_bphy_intr_fini(struct roc_bphy_irq_chip *irq_chip);
+__roc_api bool roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip,
+ int irq_num);
#endif /* _ROC_BPHY_IRQ_ */
roc_bphy_cgx_stop_rxtx;
roc_bphy_dev_fini;
roc_bphy_dev_init;
+ roc_bphy_intr_available;
roc_bphy_intr_fini;
roc_bphy_intr_init;
roc_clk_freq_get;