diff options
author | Yijing Wang <wangyijing@huawei.com> | 2014-11-11 17:44:17 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-11-21 11:34:15 -0500 |
commit | 26914233b1cc290f7b5c0189f7d121ad345df48b (patch) | |
tree | 4f76d1a39c6da8113f0f102f04e4f4efa72de2f9 /drivers/pci/host | |
parent | 7840cba885a4570314feac1d68b5e128e1bdc94c (diff) |
PCI: mvebu: Save MSI controller in pci_sys_data
Save MSI controller in pci_sys_data instead of assigning MSI controller
pointer to every PCI bus in .add_bus().
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/host')
-rw-r--r-- | drivers/pci/host/pci-mvebu.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index cf907fec0652..9aa810b733a8 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c | |||
@@ -774,12 +774,6 @@ static struct pci_bus *mvebu_pcie_scan_bus(int nr, struct pci_sys_data *sys) | |||
774 | return bus; | 774 | return bus; |
775 | } | 775 | } |
776 | 776 | ||
777 | static void mvebu_pcie_add_bus(struct pci_bus *bus) | ||
778 | { | ||
779 | struct mvebu_pcie *pcie = sys_to_pcie(bus->sysdata); | ||
780 | bus->msi = pcie->msi; | ||
781 | } | ||
782 | |||
783 | static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev, | 777 | static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev, |
784 | const struct resource *res, | 778 | const struct resource *res, |
785 | resource_size_t start, | 779 | resource_size_t start, |
@@ -816,6 +810,10 @@ static void mvebu_pcie_enable(struct mvebu_pcie *pcie) | |||
816 | 810 | ||
817 | memset(&hw, 0, sizeof(hw)); | 811 | memset(&hw, 0, sizeof(hw)); |
818 | 812 | ||
813 | #ifdef CONFIG_PCI_MSI | ||
814 | hw.msi_ctrl = pcie->msi; | ||
815 | #endif | ||
816 | |||
819 | hw.nr_controllers = 1; | 817 | hw.nr_controllers = 1; |
820 | hw.private_data = (void **)&pcie; | 818 | hw.private_data = (void **)&pcie; |
821 | hw.setup = mvebu_pcie_setup; | 819 | hw.setup = mvebu_pcie_setup; |
@@ -823,7 +821,6 @@ static void mvebu_pcie_enable(struct mvebu_pcie *pcie) | |||
823 | hw.map_irq = of_irq_parse_and_map_pci; | 821 | hw.map_irq = of_irq_parse_and_map_pci; |
824 | hw.ops = &mvebu_pcie_ops; | 822 | hw.ops = &mvebu_pcie_ops; |
825 | hw.align_resource = mvebu_pcie_align_resource; | 823 | hw.align_resource = mvebu_pcie_align_resource; |
826 | hw.add_bus = mvebu_pcie_add_bus; | ||
827 | 824 | ||
828 | pci_common_init(&hw); | 825 | pci_common_init(&hw); |
829 | } | 826 | } |