net/bnxt: remove assert for zero data length in Tx
[dpdk.git] / drivers / common / cnxk / roc_bphy_irq.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2021 Marvell.
3  */
4
5 #ifndef _ROC_BPHY_IRQ_
6 #define _ROC_BPHY_IRQ_
7
8 struct roc_bphy_irq_vec {
9         int fd;
10         int handler_cpu;
11         void (*handler)(int irq_num, void *isr_data);
12         void *isr_data;
13 };
14
15 struct roc_bphy_irq_chip {
16         struct roc_bphy_irq_vec *irq_vecs;
17         uint64_t max_irq;
18         uint64_t avail_irq_bmask;
19         int intfd;
20         int n_handlers;
21         char *mz_name;
22 };
23
24 struct roc_bphy_intr {
25         int irq_num;
26         void (*intr_handler)(int irq_num, void *isr_data);
27         void *isr_data;
28         int cpu;
29         /* stack for this interrupt, not supplied by a user */
30         uint8_t *sp;
31 };
32
33 __roc_api struct roc_bphy_irq_chip *roc_bphy_intr_init(void);
34 __roc_api void roc_bphy_intr_fini(struct roc_bphy_irq_chip *irq_chip);
35 __roc_api void roc_bphy_intr_handler(unsigned int irq_num);
36 __roc_api bool roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip,
37                                        int irq_num);
38 __roc_api int roc_bphy_intr_clear(struct roc_bphy_irq_chip *chip, int irq_num);
39 __roc_api uint64_t roc_bphy_intr_max_get(struct roc_bphy_irq_chip *irq_chip);
40 __roc_api int roc_bphy_intr_register(struct roc_bphy_irq_chip *irq_chip,
41                                      struct roc_bphy_intr *intr);
42
43 #endif /* _ROC_BPHY_IRQ_ */