1 From c092ab8994f1f777054c0179a9deb40b87ee606f Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <kabel@kernel.org>
3 Date: Mon, 10 Jan 2022 00:10:46 +0100
4 Subject: [PATCH] PCI: aardvark: Make msi_domain_info structure a static driver
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 Make Aardvark's msi_domain_info structure into a private driver structure.
11 Domain info is same for every potential instatination of a controller.
13 Signed-off-by: Marek BehĂșn <kabel@kernel.org>
15 drivers/pci/controller/pci-aardvark.c | 16 ++++++++--------
16 1 file changed, 8 insertions(+), 8 deletions(-)
18 --- a/drivers/pci/controller/pci-aardvark.c
19 +++ b/drivers/pci/controller/pci-aardvark.c
20 @@ -281,7 +281,6 @@ struct advk_pcie {
21 raw_spinlock_t irq_lock;
22 struct irq_domain *msi_domain;
23 struct irq_domain *msi_inner_domain;
24 - struct msi_domain_info msi_domain_info;
25 DECLARE_BITMAP(msi_used, MSI_IRQ_NUM);
26 struct mutex msi_used_lock;
28 @@ -1291,20 +1290,20 @@ static struct irq_chip advk_msi_irq_chip
32 +static struct msi_domain_info advk_msi_domain_info = {
33 + .flags = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
34 + MSI_FLAG_MULTI_PCI_MSI,
35 + .chip = &advk_msi_irq_chip,
38 static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)
40 struct device *dev = &pcie->pdev->dev;
41 struct device_node *node = dev->of_node;
42 - struct msi_domain_info *msi_di;
43 phys_addr_t msi_msg_phys;
45 mutex_init(&pcie->msi_used_lock);
47 - msi_di = &pcie->msi_domain_info;
48 - msi_di->flags = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
49 - MSI_FLAG_MULTI_PCI_MSI;
50 - msi_di->chip = &advk_msi_irq_chip;
52 msi_msg_phys = virt_to_phys(&pcie->msi_msg);
54 advk_writel(pcie, lower_32_bits(msi_msg_phys),
55 @@ -1320,7 +1319,8 @@ static int advk_pcie_init_msi_irq_domain
58 pci_msi_create_irq_domain(of_node_to_fwnode(node),
59 - msi_di, pcie->msi_inner_domain);
60 + &advk_msi_domain_info,
61 + pcie->msi_inner_domain);
62 if (!pcie->msi_domain) {
63 irq_domain_remove(pcie->msi_inner_domain);