[PATCH v3 05/27] PCI: tegra: Save msi chip in pci_sys_data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
- Subject: [PATCH v3 05/27] PCI: tegra: Save msi chip in pci_sys_data
- From: Yijing Wang <wangyijing@xxxxxxxxxx>
- Date: Wed, 15 Oct 2014 11:06:53 +0800
- Cc: <linux-pci@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, Xinwei Hu <huxinwei@xxxxxxxxxx>, Wuyun <wuyun.wu@xxxxxxxxxx>, <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxxx>, <linux-arch@xxxxxxxxxxxxxxx>, <arnab.basu@xxxxxxxxxxxxx>, <Bharat.Bhushan@xxxxxxxxxxxxx>, <x86@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, "Konrad Rzeszutek Wilk" <konrad.wilk@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, <linux-mips@xxxxxxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, <linuxppc-dev@xxxxxxxxxxxxxxxx>, <linux-s390@xxxxxxxxxxxxxxx>, Sebastian Ott <sebott@xxxxxxxxxxxxxxxxxx>, "Tony Luck" <tony.luck@xxxxxxxxx>, <linux-ia64@xxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, <sparclinux@xxxxxxxxxxxxxxx>, Chris Metcalf <cmetcalf@xxxxxxxxxx>, Ralf Baechle <ralf@xxxxxxxxxxxxxx>, Lucas Stach <l.stach@xxxxxxxxxxxxxx>, David Vrabel <david.vrabel@xxxxxxxxxx>, "Sergei Shtylyov" <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Thierry Reding <thierry.reding@xxxxxxxxx>, "Thomas Petazzoni" <thomas.petazzoni@xxxxxxxxxxxxxxxxxx>, Liviu Dudau <liviu@xxxxxxxxxxx>, Yijing Wang <wangyijing@xxxxxxxxxx>
- In-reply-to: <1413342435-7876-1-git-send-email-wangyijing@huawei.com>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1413342435-7876-1-git-send-email-wangyijing@huawei.com>
Save msi chip in pci_sys_data instead of assign
msi chip to every pci bus in .add_bus().
Signed-off-by: Yijing Wang <wangyijing@xxxxxxxxxx>
---
drivers/pci/host/pci-tegra.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 3d43874..5af0525 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -694,15 +694,6 @@ static int tegra_pcie_map_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
return irq;
}
-static void tegra_pcie_add_bus(struct pci_bus *bus)
-{
- if (IS_ENABLED(CONFIG_PCI_MSI)) {
- struct tegra_pcie *pcie = sys_to_pcie(bus->sysdata);
-
- bus->msi = &pcie->msi.chip;
- }
-}
-
static struct pci_bus *tegra_pcie_scan_bus(int nr, struct pci_sys_data *sys)
{
struct tegra_pcie *pcie = sys_to_pcie(sys);
@@ -1881,11 +1872,13 @@ static int tegra_pcie_enable(struct tegra_pcie *pcie)
memset(&hw, 0, sizeof(hw));
+#ifdef CONFIG_PCI_MSI
+ hw.msi_chip = &pcie->msi.chip;
+#endif
hw.nr_controllers = 1;
hw.private_data = (void **)&pcie;
hw.setup = tegra_pcie_setup;
hw.map_irq = tegra_pcie_map_irq;
- hw.add_bus = tegra_pcie_add_bus;
hw.scan = tegra_pcie_scan_bus;
hw.ops = &tegra_pcie_ops;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]