Message ID | 20140926090537.GH31106@ulmo (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
On 2014/9/26 17:05, Thierry Reding wrote: > On Fri, Sep 26, 2014 at 10:54:32AM +0200, Thierry Reding wrote: > [...] >> At least for Tegra it's trivial to just hook it up in tegra_pcie_scan_bus() >> directly (patch attached). > > Really attached this time. > > Thierry > It looks good to me, so I will update the arm pci hostbridge driver to assign pci root bus the msi chip instead of current pcibios_add_bus(). But for other platforms which only have a one msi chip, I will kept the arch_find_msi_chip() temporarily for more comments, especially from Bjorn. Thanks! Yijing.
On 2014/9/28 10:32, Yijing Wang wrote: > On 2014/9/26 17:05, Thierry Reding wrote: >> On Fri, Sep 26, 2014 at 10:54:32AM +0200, Thierry Reding wrote: >> [...] >>> At least for Tegra it's trivial to just hook it up in tegra_pcie_scan_bus() >>> directly (patch attached). >> >> Really attached this time. >> >> Thierry >> > > It looks good to me, so I will update the arm pci hostbridge driver to assign > pci root bus the msi chip instead of current pcibios_add_bus(). But for other > platforms which only have a one msi chip, I will kept the arch_find_msi_chip() > temporarily for more comments, especially from Bjorn. Oh, sorry, I found designware and rcar use pci_scan_root_bus(), so we can not simply assign msi chip to root bus in all host drivers's scan functions. > > Thanks! > Yijing. >
Am Sonntag, den 28.09.2014, 14:11 +0800 schrieb Yijing Wang: > On 2014/9/28 10:32, Yijing Wang wrote: > > On 2014/9/26 17:05, Thierry Reding wrote: > >> On Fri, Sep 26, 2014 at 10:54:32AM +0200, Thierry Reding wrote: > >> [...] > >>> At least for Tegra it's trivial to just hook it up in tegra_pcie_scan_bus() > >>> directly (patch attached). > >> > >> Really attached this time. > >> > >> Thierry > >> > > > > It looks good to me, so I will update the arm pci hostbridge driver to assign > > pci root bus the msi chip instead of current pcibios_add_bus(). But for other > > platforms which only have a one msi chip, I will kept the arch_find_msi_chip() > > temporarily for more comments, especially from Bjorn. > > Oh, sorry, I found designware and rcar use pci_scan_root_bus(), so we can not simply > assign msi chip to root bus in all host drivers's scan functions. Designware will switch away from pci_scan_root_bus() in the 3.18 cycle and I would think it would be no problem to to the same with rcar. Regards, Lucas
On 2014/9/29 16:37, Lucas Stach wrote: > Am Sonntag, den 28.09.2014, 14:11 +0800 schrieb Yijing Wang: >> On 2014/9/28 10:32, Yijing Wang wrote: >>> On 2014/9/26 17:05, Thierry Reding wrote: >>>> On Fri, Sep 26, 2014 at 10:54:32AM +0200, Thierry Reding wrote: >>>> [...] >>>>> At least for Tegra it's trivial to just hook it up in tegra_pcie_scan_bus() >>>>> directly (patch attached). >>>> >>>> Really attached this time. >>>> >>>> Thierry >>>> >>> >>> It looks good to me, so I will update the arm pci hostbridge driver to assign >>> pci root bus the msi chip instead of current pcibios_add_bus(). But for other >>> platforms which only have a one msi chip, I will kept the arch_find_msi_chip() >>> temporarily for more comments, especially from Bjorn. >> >> Oh, sorry, I found designware and rcar use pci_scan_root_bus(), so we can not simply >> assign msi chip to root bus in all host drivers's scan functions. > > Designware will switch away from pci_scan_root_bus() in the 3.18 cycle > and I would think it would be no problem to to the same with rcar. Good. > > Regards, > Lucas >
From 2cedfcf38cdfe21688d1363659f28e271ce43358 Mon Sep 17 00:00:00 2001 From: Thierry Reding <treding@nvidia.com> Date: Fri, 26 Sep 2014 10:35:47 +0200 Subject: [PATCH] PCI: tegra: Remove .add_bus() callback The .add_bus() callback is called for every bus and used to associate an MSI chip with each bus. However the PCI core code already propagates the root bus' MSI chip to child busses, so it is enough to associate the MSI chip with the root bus upon creation. Conveniently the Tegra PCIe host bridge driver creates the root bus directly, so the association can be done at the same time. Signed-off-by: Thierry Reding <treding@nvidia.com> --- drivers/pci/host/pci-tegra.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index 3d43874319be..d314e549ac0c 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); @@ -713,6 +704,9 @@ static struct pci_bus *tegra_pcie_scan_bus(int nr, struct pci_sys_data *sys) if (!bus) return NULL; + if (IS_ENABLED(CONFIG_PCI_MSI)) + bus->msi = &pcie->msi.chip; + pci_scan_child_bus(bus); return bus; @@ -1885,7 +1879,6 @@ static int tegra_pcie_enable(struct tegra_pcie *pcie) 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; -- 2.1.0