raw/cnxk_bphy: use ROC calls for max IRQ get
authorJakub Palider <jpalider@marvell.com>
Fri, 1 Oct 2021 20:19:41 +0000 (22:19 +0200)
committerJerin Jacob <jerinj@marvell.com>
Thu, 7 Oct 2021 11:02:48 +0000 (13:02 +0200)
Maximum interrupt number function used direct access to
structure field while ROC helper exists and serves the
same purpose.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
drivers/common/cnxk/roc_bphy_irq.c
drivers/common/cnxk/roc_bphy_irq.h
drivers/common/cnxk/version.map
drivers/raw/cnxk_bphy/cnxk_bphy_irq.c

index 53eb89c..f4e9b34 100644 (file)
@@ -318,6 +318,12 @@ roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip, int irq_num)
        return irq_chip->avail_irq_bmask & BIT(irq_num);
 }
 
+uint64_t
+roc_bphy_intr_max_get(struct roc_bphy_irq_chip *irq_chip)
+{
+       return irq_chip->max_irq;
+}
+
 int
 roc_bphy_intr_clear(struct roc_bphy_irq_chip *chip, int irq_num)
 {
index 185b635..93335e0 100644 (file)
@@ -36,6 +36,7 @@ __roc_api void roc_bphy_intr_handler(unsigned int irq_num);
 __roc_api bool roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip,
                                       int irq_num);
 __roc_api int roc_bphy_intr_clear(struct roc_bphy_irq_chip *chip, int irq_num);
+__roc_api uint64_t roc_bphy_intr_max_get(struct roc_bphy_irq_chip *irq_chip);
 __roc_api int roc_bphy_intr_register(struct roc_bphy_irq_chip *irq_chip,
                                     struct roc_bphy_intr *intr);
 
index 926d5c2..ccf8ec1 100644 (file)
@@ -46,6 +46,7 @@ INTERNAL {
        roc_bphy_intr_fini;
        roc_bphy_intr_handler;
        roc_bphy_intr_init;
+       roc_bphy_intr_max_get;
        roc_bphy_intr_register;
        roc_bphy_npa_pf_func_get;
        roc_bphy_sso_pf_func_get;
index 1fb3bf7..a328029 100644 (file)
@@ -32,7 +32,7 @@ cnxk_bphy_irq_max_get(uint16_t dev_id)
        bphy_dev = cnxk_bphy_get_bphy_dev_by_dev_id(dev_id);
        irq_chip = bphy_dev->irq_chip;
 
-       return irq_chip->max_irq;
+       return roc_bphy_intr_max_get(irq_chip);
 }
 
 int