Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __ASM_GENERIC_MSI_H
0003 #define __ASM_GENERIC_MSI_H
0004 
0005 #include <linux/types.h>
0006 
0007 #ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN
0008 
0009 #ifndef NUM_MSI_ALLOC_SCRATCHPAD_REGS
0010 # define NUM_MSI_ALLOC_SCRATCHPAD_REGS  2
0011 #endif
0012 
0013 struct msi_desc;
0014 
0015 /**
0016  * struct msi_alloc_info - Default structure for MSI interrupt allocation.
0017  * @desc:   Pointer to msi descriptor
0018  * @hwirq:  Associated hw interrupt number in the domain
0019  * @scratchpad: Storage for implementation specific scratch data
0020  *
0021  * Architectures can provide their own implementation by not including
0022  * asm-generic/msi.h into their arch specific header file.
0023  */
0024 typedef struct msi_alloc_info {
0025     struct msi_desc         *desc;
0026     irq_hw_number_t         hwirq;
0027     unsigned long           flags;
0028     union {
0029         unsigned long       ul;
0030         void            *ptr;
0031     } scratchpad[NUM_MSI_ALLOC_SCRATCHPAD_REGS];
0032 } msi_alloc_info_t;
0033 
0034 /* Device generating MSIs is proxying for another device */
0035 #define MSI_ALLOC_FLAGS_PROXY_DEVICE    (1UL << 0)
0036 
0037 #define GENERIC_MSI_DOMAIN_OPS      1
0038 
0039 #endif /* CONFIG_GENERIC_MSI_IRQ_DOMAIN */
0040 
0041 #endif