net/hns3: refactor multi-process initialization
[dpdk.git] / drivers / raw / cnxk_bphy / cnxk_bphy_irq.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2021 Marvell.
3  */
4
5 #ifndef _CNXK_BPHY_IRQ_
6 #define _CNXK_BPHY_IRQ_
7
8 #include <roc_api.h>
9
10 #include "rte_pmd_bphy.h"
11
12 struct bphy_irq_queue {
13         /* queue holds up to one response */
14         void *rsp;
15 };
16
17 struct bphy_device {
18 #define BPHY_QUEUE_CNT 1
19         struct roc_bphy bphy;
20         struct roc_bphy_irq_chip *irq_chip;
21         struct cnxk_bphy_mem mem;
22         /* bphy irq interface supports single queue only */
23         struct bphy_irq_queue queues[BPHY_QUEUE_CNT];
24 };
25
26 int cnxk_bphy_intr_init(uint16_t dev_id);
27 void cnxk_bphy_intr_fini(uint16_t dev_id);
28 struct cnxk_bphy_mem *cnxk_bphy_mem_get(uint16_t dev_id);
29 int cnxk_bphy_intr_register(uint16_t dev_id, int irq_num,
30                             cnxk_bphy_intr_handler_t handler, void *isr_data,
31                             int cpu);
32 void cnxk_bphy_intr_unregister(uint16_t dev_id, int irq_num);
33 uint64_t cnxk_bphy_irq_max_get(uint16_t dev_id);
34
35 #endif /* _CNXK_BPHY_IRQ_ */