diff mbox

[2/2] PCI: tegra: remove bogus bridge setup fixup

Message ID 1415907457-3147-3-git-send-email-l.stach@pengutronix.de
State Not Applicable, archived
Headers show

Commit Message

Lucas Stach Nov. 13, 2014, 7:37 p.m. UTC
The bridge setup is already done by generic code
while scanning the buses. Do not duplicate (or potentially
alter) this setup as a fixup.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/pci/host/pci-tegra.c | 13 -------------
 1 file changed, 13 deletions(-)

Comments

Alexandre Courbot Dec. 9, 2014, 3:17 a.m. UTC | #1
On Fri, Nov 14, 2014 at 4:37 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> The bridge setup is already done by generic code
> while scanning the buses. Do not duplicate (or potentially
> alter) this setup as a fixup.

Jetson seems to be happy with this change.

Tested-by: Alexandre Courbot <acourbot@nvidia.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thierry Reding Dec. 10, 2014, 12:16 p.m. UTC | #2
On Thu, Nov 13, 2014 at 08:37:37PM +0100, Lucas Stach wrote:
> The bridge setup is already done by generic code
> while scanning the buses. Do not duplicate (or potentially
> alter) this setup as a fixup.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  drivers/pci/host/pci-tegra.c | 13 -------------
>  1 file changed, 13 deletions(-)

I've been carrying the same patch locally for a while now, I thought I
had sent it out long ago, but I can't find any record of that, so I
probably didn't. Anyway:

Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Bjorn Helgaas Dec. 10, 2014, 9:14 p.m. UTC | #3
On Thu, Nov 13, 2014 at 08:37:37PM +0100, Lucas Stach wrote:
> The bridge setup is already done by generic code
> while scanning the buses. Do not duplicate (or potentially
> alter) this setup as a fixup.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Applied to next-pci/host-tegra for v3.19, with Tested-by, Reviewed-by, and
Acked-by from Alexandre and Thierry.  This branch will be rebased to
v3.19-rc1 when it comes out.

Bjorn

> ---
>  drivers/pci/host/pci-tegra.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
> index d5a14f22ebb8..0ef22505cead 100644
> --- a/drivers/pci/host/pci-tegra.c
> +++ b/drivers/pci/host/pci-tegra.c
> @@ -624,19 +624,6 @@ static void tegra_pcie_port_free(struct tegra_pcie_port *port)
>  	devm_kfree(pcie->dev, port);
>  }
>  
> -static void tegra_pcie_fixup_bridge(struct pci_dev *dev)
> -{
> -	u16 reg;
> -
> -	if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE) {
> -		pci_read_config_word(dev, PCI_COMMAND, &reg);
> -		reg |= (PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
> -			PCI_COMMAND_MASTER | PCI_COMMAND_SERR);
> -		pci_write_config_word(dev, PCI_COMMAND, reg);
> -	}
> -}
> -DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, tegra_pcie_fixup_bridge);
> -
>  /* Tegra PCIE root complex wrongly reports device class */
>  static void tegra_pcie_fixup_class(struct pci_dev *dev)
>  {
> -- 
> 2.1.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index d5a14f22ebb8..0ef22505cead 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -624,19 +624,6 @@  static void tegra_pcie_port_free(struct tegra_pcie_port *port)
 	devm_kfree(pcie->dev, port);
 }
 
-static void tegra_pcie_fixup_bridge(struct pci_dev *dev)
-{
-	u16 reg;
-
-	if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE) {
-		pci_read_config_word(dev, PCI_COMMAND, &reg);
-		reg |= (PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
-			PCI_COMMAND_MASTER | PCI_COMMAND_SERR);
-		pci_write_config_word(dev, PCI_COMMAND, reg);
-	}
-}
-DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, tegra_pcie_fixup_bridge);
-
 /* Tegra PCIE root complex wrongly reports device class */
 static void tegra_pcie_fixup_class(struct pci_dev *dev)
 {