raw/cnxk_bphy: support reading number of BPHY IRQs
Add support for retrieving maximum number of interrupts. Signed-off-by: Jakub Palider <jpalider@marvell.com> Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
This commit is contained in:
parent
7cf1976845
commit
61278bc794
@ -24,6 +24,18 @@ cnxk_bphy_get_bphy_dev_by_dev_id(uint16_t dev_id)
|
|||||||
return (struct bphy_device *)rawdev->dev_private;
|
return (struct bphy_device *)rawdev->dev_private;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t
|
||||||
|
cnxk_bphy_irq_max_get(uint16_t dev_id)
|
||||||
|
{
|
||||||
|
struct roc_bphy_irq_chip *irq_chip;
|
||||||
|
struct bphy_device *bphy_dev;
|
||||||
|
|
||||||
|
bphy_dev = cnxk_bphy_get_bphy_dev_by_dev_id(dev_id);
|
||||||
|
irq_chip = bphy_dev->irq_chip;
|
||||||
|
|
||||||
|
return irq_chip->max_irq;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
cnxk_bphy_intr_init(uint16_t dev_id)
|
cnxk_bphy_intr_init(uint16_t dev_id)
|
||||||
{
|
{
|
||||||
|
@ -31,5 +31,6 @@ struct bphy_device {
|
|||||||
|
|
||||||
int cnxk_bphy_intr_init(uint16_t dev_id);
|
int cnxk_bphy_intr_init(uint16_t dev_id);
|
||||||
void cnxk_bphy_intr_fini(uint16_t dev_id);
|
void cnxk_bphy_intr_fini(uint16_t dev_id);
|
||||||
|
uint64_t cnxk_bphy_irq_max_get(uint16_t dev_id);
|
||||||
|
|
||||||
#endif /* _CNXK_BPHY_IRQ_ */
|
#endif /* _CNXK_BPHY_IRQ_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user