[3.11.y.z extended stable] Patch "PCI: mvebu: Use Device ID and revision from underlying endpoint" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Wed Mar 5 14:18:18 UTC 2014
This is a note to let you know that I have just added a patch titled
PCI: mvebu: Use Device ID and revision from underlying endpoint
to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 4208aca4991692063cde08577fa3c8868ab6679c Mon Sep 17 00:00:00 2001
From: Andrew Lunn <andrew at lunn.ch>
Date: Wed, 5 Feb 2014 11:55:49 +0100
Subject: PCI: mvebu: Use Device ID and revision from underlying endpoint
commit 322a8e91844f4ae2093e0d3d8a318d0ef2596756 upstream.
Marvell SoCs place the SoC number into the PCIe endpoint device ID. The
SoC stepping is placed into the PCIe revision. The old plat-orion PCIe
driver allowed this information to be seen in user space with a simple
lspci command.
The new driver places a virtual PCI-PCI bridge on top of these endpoints.
It has its own hard coded PCI device ID. Thus it is no longer possible to
see what the SoC is using lspci.
When initializing the PCI-PCI bridge, set its device ID and revision from
the underlying endpoint, thus restoring this functionality. Debian would
like to use this in order to aid installing the correct DTB file.
Fixes: 45361a4fe4464 ("pci: PCIe driver for Marvell Armada 370/XP systems")
Signed-off-by: Andrew Lunn <andrew at lunn.ch>
Signed-off-by: Bjorn Helgaas <bhelgaas at google.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Acked-by: Jason Cooper <jason at lakedaemon.net>
[ luis: backported to 3.11: replaced mvebu_readl() by readl() ]
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/pci/host/pci-mvebu.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index 7bf3926..86d3fa4 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -56,14 +56,6 @@
#define PCIE_DEBUG_CTRL 0x1a60
#define PCIE_DEBUG_SOFT_RESET BIT(20)
-/*
- * This product ID is registered by Marvell, and used when the Marvell
- * SoC is not the root complex, but an endpoint on the PCIe bus. It is
- * therefore safe to re-use this PCI ID for our emulated PCI-to-PCI
- * bridge.
- */
-#define MARVELL_EMULATED_PCI_PCI_BRIDGE_ID 0x7846
-
/* PCI configuration space of a PCI-to-PCI bridge */
struct mvebu_sw_pci_bridge {
u16 vendor;
@@ -356,7 +348,8 @@ static void mvebu_sw_pci_bridge_init(struct mvebu_pcie_port *port)
bridge->class = PCI_CLASS_BRIDGE_PCI;
bridge->vendor = PCI_VENDOR_ID_MARVELL;
- bridge->device = MARVELL_EMULATED_PCI_PCI_BRIDGE_ID;
+ bridge->device = readl(port->base + PCIE_DEV_ID_OFF) >> 16;
+ bridge->revision = readl(port->base + PCIE_DEV_REV_OFF) & 0xff;
bridge->header_type = PCI_HEADER_TYPE_BRIDGE;
bridge->cache_line_size = 0x10;
--
1.9.0
More information about the kernel-team
mailing list