1*7ab1a32cSRuslan Bukin /*-
2*7ab1a32cSRuslan Bukin * SPDX-License-Identifier: BSD-2-Clause
3*7ab1a32cSRuslan Bukin *
4*7ab1a32cSRuslan Bukin * Copyright (c) 2024 Jessica Clarke <jrtc27@FreeBSD.org>
5*7ab1a32cSRuslan Bukin *
6*7ab1a32cSRuslan Bukin * Redistribution and use in source and binary forms, with or without
7*7ab1a32cSRuslan Bukin * modification, are permitted provided that the following conditions
8*7ab1a32cSRuslan Bukin * are met:
9*7ab1a32cSRuslan Bukin * 1. Redistributions of source code must retain the above copyright
10*7ab1a32cSRuslan Bukin * notice, this list of conditions and the following disclaimer.
11*7ab1a32cSRuslan Bukin * 2. Redistributions in binary form must reproduce the above copyright
12*7ab1a32cSRuslan Bukin * notice, this list of conditions and the following disclaimer in the
13*7ab1a32cSRuslan Bukin * documentation and/or other materials provided with the distribution.
14*7ab1a32cSRuslan Bukin *
15*7ab1a32cSRuslan Bukin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16*7ab1a32cSRuslan Bukin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17*7ab1a32cSRuslan Bukin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18*7ab1a32cSRuslan Bukin * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19*7ab1a32cSRuslan Bukin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20*7ab1a32cSRuslan Bukin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21*7ab1a32cSRuslan Bukin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22*7ab1a32cSRuslan Bukin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23*7ab1a32cSRuslan Bukin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24*7ab1a32cSRuslan Bukin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25*7ab1a32cSRuslan Bukin * SUCH DAMAGE.
26*7ab1a32cSRuslan Bukin */
27*7ab1a32cSRuslan Bukin
28*7ab1a32cSRuslan Bukin #ifndef __PCI_IRQ_MD_H__
29*7ab1a32cSRuslan Bukin #define __PCI_IRQ_MD_H__
30*7ab1a32cSRuslan Bukin
31*7ab1a32cSRuslan Bukin struct pci_irq {
32*7ab1a32cSRuslan Bukin int aplic_irq;
33*7ab1a32cSRuslan Bukin };
34*7ab1a32cSRuslan Bukin
35*7ab1a32cSRuslan Bukin void pci_irq_init(int intrs[static 4]);
36*7ab1a32cSRuslan Bukin
37*7ab1a32cSRuslan Bukin static inline void
pci_irq_init_irq(struct pci_irq * irq)38*7ab1a32cSRuslan Bukin pci_irq_init_irq(struct pci_irq *irq)
39*7ab1a32cSRuslan Bukin {
40*7ab1a32cSRuslan Bukin irq->aplic_irq = 0;
41*7ab1a32cSRuslan Bukin }
42*7ab1a32cSRuslan Bukin
43*7ab1a32cSRuslan Bukin static inline uint8_t
pci_irq_intline(struct pci_irq * irq __unused)44*7ab1a32cSRuslan Bukin pci_irq_intline(struct pci_irq *irq __unused)
45*7ab1a32cSRuslan Bukin {
46*7ab1a32cSRuslan Bukin return (255);
47*7ab1a32cSRuslan Bukin }
48*7ab1a32cSRuslan Bukin
49*7ab1a32cSRuslan Bukin #endif
50