diff options
Diffstat (limited to 'drivers/pci/host/pcie-designware.h')
-rw-r--r-- | drivers/pci/host/pcie-designware.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h index 133820f1da97..faccbbf31907 100644 --- a/drivers/pci/host/pcie-designware.h +++ b/drivers/pci/host/pcie-designware.h | |||
@@ -20,6 +20,14 @@ struct pcie_port_info { | |||
20 | phys_addr_t mem_bus_addr; | 20 | phys_addr_t mem_bus_addr; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | /* | ||
24 | * Maximum number of MSI IRQs can be 256 per controller. But keep | ||
25 | * it 32 as of now. Probably we will never need more than 32. If needed, | ||
26 | * then increment it in multiple of 32. | ||
27 | */ | ||
28 | #define MAX_MSI_IRQS 32 | ||
29 | #define MAX_MSI_CTRLS (MAX_MSI_IRQS / 32) | ||
30 | |||
23 | struct pcie_port { | 31 | struct pcie_port { |
24 | struct device *dev; | 32 | struct device *dev; |
25 | u8 root_bus_nr; | 33 | u8 root_bus_nr; |
@@ -38,6 +46,10 @@ struct pcie_port { | |||
38 | int irq; | 46 | int irq; |
39 | u32 lanes; | 47 | u32 lanes; |
40 | struct pcie_host_ops *ops; | 48 | struct pcie_host_ops *ops; |
49 | int msi_irq; | ||
50 | int msi_irq_start; | ||
51 | unsigned long msi_data; | ||
52 | DECLARE_BITMAP(msi_irq_in_use, MAX_MSI_IRQS); | ||
41 | }; | 53 | }; |
42 | 54 | ||
43 | struct pcie_host_ops { | 55 | struct pcie_host_ops { |
@@ -57,6 +69,8 @@ int cfg_read(void __iomem *addr, int where, int size, u32 *val); | |||
57 | int cfg_write(void __iomem *addr, int where, int size, u32 val); | 69 | int cfg_write(void __iomem *addr, int where, int size, u32 val); |
58 | int dw_pcie_wr_own_conf(struct pcie_port *pp, int where, int size, u32 val); | 70 | int dw_pcie_wr_own_conf(struct pcie_port *pp, int where, int size, u32 val); |
59 | int dw_pcie_rd_own_conf(struct pcie_port *pp, int where, int size, u32 *val); | 71 | int dw_pcie_rd_own_conf(struct pcie_port *pp, int where, int size, u32 *val); |
72 | void dw_handle_msi_irq(struct pcie_port *pp); | ||
73 | void dw_pcie_msi_init(struct pcie_port *pp); | ||
60 | int dw_pcie_link_up(struct pcie_port *pp); | 74 | int dw_pcie_link_up(struct pcie_port *pp); |
61 | void dw_pcie_setup_rc(struct pcie_port *pp); | 75 | void dw_pcie_setup_rc(struct pcie_port *pp); |
62 | int dw_pcie_host_init(struct pcie_port *pp); | 76 | int dw_pcie_host_init(struct pcie_port *pp); |