xref: /freebsd/sys/contrib/alpine-hal/al_hal_pcie_interrupts.h (revision 3fc36ee018bb836bd1796067cf4ef8683f166ebc)
1f4b37ed0SZbigniew Bodek /*-
2f4b37ed0SZbigniew Bodek ********************************************************************************
3f4b37ed0SZbigniew Bodek Copyright (C) 2015 Annapurna Labs Ltd.
4f4b37ed0SZbigniew Bodek 
5f4b37ed0SZbigniew Bodek This file may be licensed under the terms of the Annapurna Labs Commercial
6f4b37ed0SZbigniew Bodek License Agreement.
7f4b37ed0SZbigniew Bodek 
8f4b37ed0SZbigniew Bodek Alternatively, this file can be distributed under the terms of the GNU General
9f4b37ed0SZbigniew Bodek Public License V2 as published by the Free Software Foundation and can be
10f4b37ed0SZbigniew Bodek found at http://www.gnu.org/licenses/gpl-2.0.html
11f4b37ed0SZbigniew Bodek 
12f4b37ed0SZbigniew Bodek Alternatively, redistribution and use in source and binary forms, with or
13f4b37ed0SZbigniew Bodek without modification, are permitted provided that the following conditions are
14f4b37ed0SZbigniew Bodek met:
15f4b37ed0SZbigniew Bodek 
16f4b37ed0SZbigniew Bodek     *     Redistributions of source code must retain the above copyright notice,
17f4b37ed0SZbigniew Bodek this list of conditions and the following disclaimer.
18f4b37ed0SZbigniew Bodek 
19f4b37ed0SZbigniew Bodek     *     Redistributions in binary form must reproduce the above copyright
20f4b37ed0SZbigniew Bodek notice, this list of conditions and the following disclaimer in
21f4b37ed0SZbigniew Bodek the documentation and/or other materials provided with the
22f4b37ed0SZbigniew Bodek distribution.
23f4b37ed0SZbigniew Bodek 
24f4b37ed0SZbigniew Bodek THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
25f4b37ed0SZbigniew Bodek ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26f4b37ed0SZbigniew Bodek WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27f4b37ed0SZbigniew Bodek DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
28f4b37ed0SZbigniew Bodek ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29f4b37ed0SZbigniew Bodek (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30f4b37ed0SZbigniew Bodek LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
31f4b37ed0SZbigniew Bodek ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32f4b37ed0SZbigniew Bodek (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33f4b37ed0SZbigniew Bodek SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34f4b37ed0SZbigniew Bodek 
35f4b37ed0SZbigniew Bodek *******************************************************************************/
36f4b37ed0SZbigniew Bodek 
37f4b37ed0SZbigniew Bodek #ifndef _AL_HAL_PCIE_INTERRUPTS_H_
38f4b37ed0SZbigniew Bodek #define _AL_HAL_PCIE_INTERRUPTS_H_
39f4b37ed0SZbigniew Bodek 
40f4b37ed0SZbigniew Bodek #include "al_hal_common.h"
41f4b37ed0SZbigniew Bodek #include "al_hal_pcie.h"
42f4b37ed0SZbigniew Bodek #include "al_hal_iofic.h"
43f4b37ed0SZbigniew Bodek 
44f4b37ed0SZbigniew Bodek /**
45f4b37ed0SZbigniew Bodek  * @defgroup group_pcie_interrupts PCIe interrupts
46f4b37ed0SZbigniew Bodek  * @ingroup grouppcie
47f4b37ed0SZbigniew Bodek  *  @{
48f4b37ed0SZbigniew Bodek  *  The PCIe interrupts HAL can be used to control PCIe unit interrupts.
49f4b37ed0SZbigniew Bodek  *  There are 5 groups of interrupts: app group A, B, C, D and AXI.
50f4b37ed0SZbigniew Bodek  *  Only 2 interrupts go from the pcie unit to the GIC:
51f4b37ed0SZbigniew Bodek  *  1. Summary for all the int groups (AXI+APP CORE).
52f4b37ed0SZbigniew Bodek  *  2. INTA assert/deassert (RC only).
53f4b37ed0SZbigniew Bodek  *  For the specific GIC interrupt line, please check the architecture reference
54f4b37ed0SZbigniew Bodek  *  manual.
55f4b37ed0SZbigniew Bodek  *  The reset mask state of all interrupts is: Masked
56f4b37ed0SZbigniew Bodek  *
57f4b37ed0SZbigniew Bodek  * @file   al_hal_pcie_interrupts.h
58f4b37ed0SZbigniew Bodek  *
59f4b37ed0SZbigniew Bodek  */
60f4b37ed0SZbigniew Bodek 
61f4b37ed0SZbigniew Bodek /**
62f4b37ed0SZbigniew Bodek  * PCIe interrupt groups
63f4b37ed0SZbigniew Bodek  */
64f4b37ed0SZbigniew Bodek enum al_pcie_int_group {
65f4b37ed0SZbigniew Bodek 	AL_PCIE_INT_GRP_A,
66f4b37ed0SZbigniew Bodek 	AL_PCIE_INT_GRP_B,
67f4b37ed0SZbigniew Bodek 	AL_PCIE_INT_GRP_C, /* Rev3 only */
68f4b37ed0SZbigniew Bodek 	AL_PCIE_INT_GRP_D, /* Rev3 only */
69f4b37ed0SZbigniew Bodek 	AL_PCIE_INT_GRP_AXI_A,
70f4b37ed0SZbigniew Bodek };
71f4b37ed0SZbigniew Bodek 
72f4b37ed0SZbigniew Bodek /**
73f4b37ed0SZbigniew Bodek  * App group A interrupts mask - don't change
74f4b37ed0SZbigniew Bodek  * All interrupts not listed below should be masked
75f4b37ed0SZbigniew Bodek  */
76f4b37ed0SZbigniew Bodek enum al_pcie_app_int_grp_a {
77f4b37ed0SZbigniew Bodek 	/** [RC only] Deassert_INTD received */
78f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_DEASSERT_INTD = AL_BIT(0),
79f4b37ed0SZbigniew Bodek 	/** [RC only] Deassert_INTC received */
80f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_DEASSERT_INTC = AL_BIT(1),
81f4b37ed0SZbigniew Bodek 	/** [RC only] Deassert_INTB received */
82f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_DEASSERT_INTB = AL_BIT(2),
83f4b37ed0SZbigniew Bodek 	/**
84*3fc36ee0SWojciech Macek 	 * [RC only] Deassert_INTA received - there's a dedicated GIC interrupt
85f4b37ed0SZbigniew Bodek 	 * line that reflects the status of ASSERT/DEASSERT of INTA
86f4b37ed0SZbigniew Bodek 	 */
87f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_DEASSERT_INTA = AL_BIT(3),
88f4b37ed0SZbigniew Bodek 	/** [RC only] Assert_INTD received */
89f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_ASSERT_INTD = AL_BIT(4),
90f4b37ed0SZbigniew Bodek 	/** [RC only] Assert_INTC received */
91f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_ASSERT_INTC = AL_BIT(5),
92f4b37ed0SZbigniew Bodek 	/** [RC only] Assert_INTB received */
93f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_ASSERT_INTB = AL_BIT(6),
94f4b37ed0SZbigniew Bodek 	/**
95*3fc36ee0SWojciech Macek 	 * [RC only] Assert_INTA received - there's a dedicated GIC interrupt
96f4b37ed0SZbigniew Bodek 	 * line that reflects the status of ASSERT/DEASSERT of INTA
97f4b37ed0SZbigniew Bodek 	 */
98f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_ASSERT_INTA = AL_BIT(7),
99f4b37ed0SZbigniew Bodek 	/** [RC only] MSI Controller Interrupt */
100f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_MSI_CNTR_RCV_INT = AL_BIT(8),
101f4b37ed0SZbigniew Bodek 	/** [EP only] MSI sent grant */
102f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_MSI_TRNS_GNT = AL_BIT(9),
103f4b37ed0SZbigniew Bodek 	/** [RC only] System error detected  (ERR_COR, ERR_FATAL, ERR_NONFATAL) */
104f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_SYS_ERR_RC = AL_BIT(10),
105f4b37ed0SZbigniew Bodek 	/** [EP only] Software initiates FLR on a Physical Function */
106f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_FLR_PF_ACTIVE = AL_BIT(11),
107f4b37ed0SZbigniew Bodek 	/** [RC only] Root Error Command register assertion notification */
108f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_AER_RC_ERR = AL_BIT(12),
109f4b37ed0SZbigniew Bodek 	/** [RC only] Root Error Command register assertion notification With MSI or MSIX enabled */
110f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_AER_RC_ERR_MSI = AL_BIT(13),
111f4b37ed0SZbigniew Bodek 	/** [RC only] PME Status bit assertion in the Root Status register With INTA */
112f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_PME_INT = AL_BIT(15),
113f4b37ed0SZbigniew Bodek 	/** [RC only] PME Status bit assertion in the Root Status register With MSI or MSIX enabled */
114f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_PME_MSI = AL_BIT(16),
115f4b37ed0SZbigniew Bodek 	/** [RC/EP] The core assert link down event, whenever the link is going down */
116f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_LINK_DOWN = AL_BIT(21),
117f4b37ed0SZbigniew Bodek 	/** [EP only] When the EP gets a command to shut down, signal the software to block any new TLP. */
118f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_PM_XTLH_BLOCK_TLP = AL_BIT(22),
119f4b37ed0SZbigniew Bodek 	/** [RC/EP] PHY/MAC link up */
120f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_XMLH_LINK_UP = AL_BIT(23),
121f4b37ed0SZbigniew Bodek 	/** [RC/EP] Data link up */
122f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_RDLH_LINK_UP = AL_BIT(24),
123f4b37ed0SZbigniew Bodek 	/** [RC/EP] The LTSSM is in RCVRY_LOCK state. */
124f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_LTSSM_RCVRY_STATE = AL_BIT(25),
125f4b37ed0SZbigniew Bodek 	/**
126f4b37ed0SZbigniew Bodek 	 * [RC/EP] CFG write transaction to the configuration space by the RC peer
127f4b37ed0SZbigniew Bodek 	 * For RC the int/ will be set from DBI write (internal SoC write)]
128f4b37ed0SZbigniew Bodek 	 */
129f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_CFG_WR = AL_BIT(26),
130f4b37ed0SZbigniew Bodek 	/** [EP only] CFG access in EP mode */
131f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_CFG_ACCESS = AL_BIT(31),
132f4b37ed0SZbigniew Bodek };
133f4b37ed0SZbigniew Bodek 
134f4b37ed0SZbigniew Bodek /**
135f4b37ed0SZbigniew Bodek  * App group B interrupts mask - don't change
136f4b37ed0SZbigniew Bodek  * All interrupts not listed below should be masked
137f4b37ed0SZbigniew Bodek  */
138f4b37ed0SZbigniew Bodek enum al_pcie_app_int_grp_b {
139f4b37ed0SZbigniew Bodek 	/** [RC only] PM_PME Message received */
140f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_PM_PME_MSG_RCVD = AL_BIT(0),
141f4b37ed0SZbigniew Bodek 	/** [RC only] PME_TO_Ack Message received */
142f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_PME_TO_ACK_MSG_RCVD = AL_BIT(1),
143f4b37ed0SZbigniew Bodek 	/** [EP only] PME_Turn_Off Message received */
144f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_PME_TURN_OFF_MSG_RCVD = AL_BIT(2),
145f4b37ed0SZbigniew Bodek 	/** [RC only] ERR_CORR Message received */
146f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_CORR_ERR_MSG_RCVD = AL_BIT(3),
147f4b37ed0SZbigniew Bodek 	/** [RC only] ERR_NONFATAL Message received */
148f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_NON_FTL_ERR_MSG_RCVD = AL_BIT(4),
149f4b37ed0SZbigniew Bodek 	/** [RC only] ERR_FATAL Message received */
150f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_FTL_ERR_MSG_RCVD = AL_BIT(5),
151f4b37ed0SZbigniew Bodek 	/**
152f4b37ed0SZbigniew Bodek 	 * [RC/EP] Vendor Defined Message received
153*3fc36ee0SWojciech Macek 	 * Asserted when a vendor message is received (with no data), buffers 2
154f4b37ed0SZbigniew Bodek 	 * messages only, and latch the headers in registers
155f4b37ed0SZbigniew Bodek 	 */
156f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_VNDR_MSG_A_RCVD = AL_BIT(6),
157f4b37ed0SZbigniew Bodek 	/**
158f4b37ed0SZbigniew Bodek 	 * [RC/EP] Vendor Defined Message received
159*3fc36ee0SWojciech Macek 	 * Asserted when a vendor message is received (with no data), buffers 2
160f4b37ed0SZbigniew Bodek 	 * messages only, and latch the headers in registers
161f4b37ed0SZbigniew Bodek 	 */
162f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_VNDR_MSG_B_RCVD = AL_BIT(7),
163f4b37ed0SZbigniew Bodek 	/** [EP only] Link Autonomous Bandwidth Status is updated */
164f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_LNK_BW_UPD = AL_BIT(12),
165f4b37ed0SZbigniew Bodek 	/** [EP only] Link Equalization Request bit in the Link Status 2 Register has been set */
166f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_LNK_EQ_REQ = AL_BIT(13),
167f4b37ed0SZbigniew Bodek 	/** [RC/EP] OB Vendor message request is granted by the PCIe core */
168f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_OB_VNDR_MSG_REQ_GRNT = AL_BIT(14),
169*3fc36ee0SWojciech Macek 	/** [RC only] CPL timeout from the PCIe core indication */
170f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_CPL_TO = AL_BIT(15),
171f4b37ed0SZbigniew Bodek 	/** [RC/EP] Slave Response Composer Lookup Error */
172f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_SLV_RESP_COMP_LKUP_ERR = AL_BIT(16),
173f4b37ed0SZbigniew Bodek 	/** [RC/EP] Parity Error */
174f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_PARITY_ERR = AL_BIT(17),
175f4b37ed0SZbigniew Bodek 	/** [EP only] Speed change request */
176f4b37ed0SZbigniew Bodek 	AL_PCIE_APP_INT_GRP_B_SPEED_CHANGE = AL_BIT(31),
177f4b37ed0SZbigniew Bodek };
178f4b37ed0SZbigniew Bodek 
179f4b37ed0SZbigniew Bodek /**
180f4b37ed0SZbigniew Bodek  * AXI interrupts mask - don't change
181f4b37ed0SZbigniew Bodek  * These are internal errors that can happen on the internal chip interface
182f4b37ed0SZbigniew Bodek  * between the PCIe port and the I/O Fabric over the AXI bus. The notion of
183f4b37ed0SZbigniew Bodek  * master and slave refer to the PCIe port master interface towards the I/O
184f4b37ed0SZbigniew Bodek  * Fabric (i.e. for inbound PCIe writes/reads toward the I/O Fabric), while the
185f4b37ed0SZbigniew Bodek  * slave interface refer to the I/O Fabric to PCIe port interface where the
186f4b37ed0SZbigniew Bodek  * internal chip DMAs and CPU cluster is initiating transactions.
187f4b37ed0SZbigniew Bodek  * All interrupts not listed below should be masked.
188f4b37ed0SZbigniew Bodek  */
189f4b37ed0SZbigniew Bodek enum al_pcie_axi_int {
190f4b37ed0SZbigniew Bodek 	/** [RC/EP] Master Response Composer Lookup Error */
191f4b37ed0SZbigniew Bodek 	AL_PCIE_AXI_INT_MSTR_RESP_COMP_LKUP_ERR = AL_BIT(0),
192f4b37ed0SZbigniew Bodek 	/** [RC/EP] PARITY ERROR on the master data read channel */
193f4b37ed0SZbigniew Bodek 	AL_PCIE_AXI_INT_PARITY_ERR_MSTR_DATA_RD_CHNL = AL_BIT(2),
194f4b37ed0SZbigniew Bodek 	/** [RC/EP] PARITY ERROR on the slave addr read channel */
195f4b37ed0SZbigniew Bodek 	AL_PCIE_AXI_INT_PARITY_ERR_SLV_ADDR_RD_CHNL = AL_BIT(3),
196f4b37ed0SZbigniew Bodek 	/** [RC/EP] PARITY ERROR on the slave addr write channel */
197f4b37ed0SZbigniew Bodek 	AL_PCIE_AXI_INT_PARITY_ERR_SLV_ADDR_WR_CHNL = AL_BIT(4),
198f4b37ed0SZbigniew Bodek 	/** [RC/EP] PARITY ERROR on the slave data write channel */
199f4b37ed0SZbigniew Bodek 	AL_PCIE_AXI_INT_PARITY_ERR_SLV_DATA_WR_CHNL = AL_BIT(5),
200f4b37ed0SZbigniew Bodek 	/** [RC only] Software error: ECAM write request with invalid bus number */
201f4b37ed0SZbigniew Bodek 	AL_PCIE_AXI_INT_ECAM_WR_REQ_INVLD_BUS_NUM = AL_BIT(7),
202f4b37ed0SZbigniew Bodek 	/** [RC only] Software error: ECAM read request with invalid bus number */
203f4b37ed0SZbigniew Bodek 	AL_PCIE_AXI_INT_ECAM_RD_REQ_INVLD_BUS_NUM = AL_BIT(8),
204f4b37ed0SZbigniew Bodek 	/** [RC/EP] Read AXI completion has ERROR */
205f4b37ed0SZbigniew Bodek 	AL_PCIE_AXI_INT_RD_AXI_COMPL_ERR = AL_BIT(11),
206f4b37ed0SZbigniew Bodek 	/** [RC/EP] Write AXI completion has ERROR */
207f4b37ed0SZbigniew Bodek 	AL_PCIE_AXI_INT_WR_AXI_COMPL_ERR = AL_BIT(12),
208f4b37ed0SZbigniew Bodek 	/** [RC/EP] Read AXI completion has timed out */
209f4b37ed0SZbigniew Bodek 	AL_PCIE_AXI_INT_RD_AXI_COMPL_TO = AL_BIT(13),
210f4b37ed0SZbigniew Bodek 	/** [RC/EP] Write AXI completion has timed out */
211f4b37ed0SZbigniew Bodek 	AL_PCIE_AXI_INT_WR_AXI_COMPL_TO = AL_BIT(14),
212f4b37ed0SZbigniew Bodek 	/** [RC/EP] Parity error AXI domain */
213f4b37ed0SZbigniew Bodek 	AL_PCIE_AXI_INT_AXI_DOM_PARITY_ERR = AL_BIT(15),
214f4b37ed0SZbigniew Bodek 	/** [RC/EP] POS error interrupt */
215f4b37ed0SZbigniew Bodek 	AL_PCIE_AXI_INT_POS_ERR = AL_BIT(16),
216f4b37ed0SZbigniew Bodek };
217f4b37ed0SZbigniew Bodek 
218f4b37ed0SZbigniew Bodek /**
219f4b37ed0SZbigniew Bodek  * @brief   Initialize and configure PCIe controller interrupts
220f4b37ed0SZbigniew Bodek  * 	    Doesn't change the mask state of the interrupts
221f4b37ed0SZbigniew Bodek  * 	    The reset mask state of all interrupts is: Masked
222f4b37ed0SZbigniew Bodek  *
223f4b37ed0SZbigniew Bodek  * @param   pcie_port pcie port handle
224f4b37ed0SZbigniew Bodek  */
225f4b37ed0SZbigniew Bodek void al_pcie_ints_config(struct al_pcie_port *pcie_port);
226f4b37ed0SZbigniew Bodek 
227f4b37ed0SZbigniew Bodek /**
228f4b37ed0SZbigniew Bodek  * Unmask PCIe app group interrupts
229f4b37ed0SZbigniew Bodek  * @param  pcie_port pcie_port pcie port handle
230f4b37ed0SZbigniew Bodek  * @param  int_group interrupt group
231f4b37ed0SZbigniew Bodek  * @param  int_mask  int_mask interrupts to unmask ('1' to unmask)
232f4b37ed0SZbigniew Bodek  */
233f4b37ed0SZbigniew Bodek void al_pcie_app_int_grp_unmask(
234f4b37ed0SZbigniew Bodek 	struct al_pcie_port *pcie_port,
235f4b37ed0SZbigniew Bodek 	enum al_pcie_int_group int_group,
236f4b37ed0SZbigniew Bodek 	uint32_t int_mask);
237f4b37ed0SZbigniew Bodek 
238f4b37ed0SZbigniew Bodek /**
239f4b37ed0SZbigniew Bodek  * Mask PCIe app group interrupts
240f4b37ed0SZbigniew Bodek  * @param  pcie_port pcie_port pcie port handle
241f4b37ed0SZbigniew Bodek  * @param  int_group interrupt group
242f4b37ed0SZbigniew Bodek  * @param  int_mask  int_mask interrupts to unmask ('1' to mask)
243f4b37ed0SZbigniew Bodek  */
244f4b37ed0SZbigniew Bodek void al_pcie_app_int_grp_mask(
245f4b37ed0SZbigniew Bodek 	struct al_pcie_port *pcie_port,
246f4b37ed0SZbigniew Bodek 	enum al_pcie_int_group int_group,
247f4b37ed0SZbigniew Bodek 	uint32_t int_mask);
248f4b37ed0SZbigniew Bodek 
249f4b37ed0SZbigniew Bodek /**
250f4b37ed0SZbigniew Bodek  * Clear the PCIe app group interrupt cause
251f4b37ed0SZbigniew Bodek  * @param  pcie_port pcie port handle
252f4b37ed0SZbigniew Bodek  * @param  int_group interrupt group
253f4b37ed0SZbigniew Bodek  * @param  int_cause interrupt cause
254f4b37ed0SZbigniew Bodek  */
255f4b37ed0SZbigniew Bodek void al_pcie_app_int_grp_cause_clear(
256f4b37ed0SZbigniew Bodek 	struct al_pcie_port *pcie_port,
257f4b37ed0SZbigniew Bodek 	enum al_pcie_int_group int_group,
258f4b37ed0SZbigniew Bodek 	uint32_t int_cause);
259f4b37ed0SZbigniew Bodek 
260f4b37ed0SZbigniew Bodek /**
261f4b37ed0SZbigniew Bodek  * Read PCIe app group interrupt cause
262f4b37ed0SZbigniew Bodek  * @param  pcie_port pcie port handle
263f4b37ed0SZbigniew Bodek  * @param  int_group interrupt group
264f4b37ed0SZbigniew Bodek  * @return interrupt cause or 0 in case the group is not supported
265f4b37ed0SZbigniew Bodek  */
266f4b37ed0SZbigniew Bodek uint32_t al_pcie_app_int_grp_cause_read(
267f4b37ed0SZbigniew Bodek 	struct al_pcie_port *pcie_port,
268f4b37ed0SZbigniew Bodek 	enum al_pcie_int_group int_group);
269f4b37ed0SZbigniew Bodek 
270f4b37ed0SZbigniew Bodek #endif
271f4b37ed0SZbigniew Bodek /** @} end of group_pcie_interrupts group */
272