From: Andrew Lunn <andrew@lunn.ch>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
bhelgaas@google.com, Jason Cooper <jason@lakedaemon.net>,
linux-pci@vger.kernel.org,
linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] PCI: MVEBU: Use Device ID and revision from underlying endpoint
Date: Wed, 5 Feb 2014 17:54:32 +0100 [thread overview]
Message-ID: <20140205165432.GD29860@lunn.ch> (raw)
In-Reply-To: <20140205172110.22507687@skate>
> > @@ -388,7 +380,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;
>
> This could also have been replaced by:
>
> bridge->vendor = mvebu_readl(port, PCIE_DEV_ID_OFF) & 0xff;
O.K, but do we ever expect it not to be PCI_VENDOR_ID_MARVELL on the
underlying hardware?
>
> > - bridge->device = MARVELL_EMULATED_PCI_PCI_BRIDGE_ID;
> > + bridge->device = mvebu_readl(port, PCIE_DEV_ID_OFF) >> 16;
> > + bridge->revision = mvebu_readl(port, PCIE_DEV_REV_OFF) & 0xff;
>
> On Armada 370 and XP, this field is apparently always 0x0, so not very
> useful. But if it's useful on other mvebu SoCs, that's fine, it's just
> an informative field anyway.
Humm, that should be the stepping, unless i have made a mistake. The
code Gregory wrote for mvebu-soc-id.c does:
/* SoC ID */
soc_dev_id = readl(pci_base + PCIE_DEV_ID_OFF) >> 16;
/* SoC revision */
soc_rev = readl(pci_base + PCIE_DEV_REV_OFF) & SOC_REV_MASK;
However, the box i'm testing on has stepping 0, so it is hard to test.
Could you test this in an OpenBlocks AX3 B0, or some other B0 device?
Thanks
Andrew
WARNING: multiple messages have this Message-ID (diff)
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PCI: MVEBU: Use Device ID and revision from underlying endpoint
Date: Wed, 5 Feb 2014 17:54:32 +0100 [thread overview]
Message-ID: <20140205165432.GD29860@lunn.ch> (raw)
In-Reply-To: <20140205172110.22507687@skate>
> > @@ -388,7 +380,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;
>
> This could also have been replaced by:
>
> bridge->vendor = mvebu_readl(port, PCIE_DEV_ID_OFF) & 0xff;
O.K, but do we ever expect it not to be PCI_VENDOR_ID_MARVELL on the
underlying hardware?
>
> > - bridge->device = MARVELL_EMULATED_PCI_PCI_BRIDGE_ID;
> > + bridge->device = mvebu_readl(port, PCIE_DEV_ID_OFF) >> 16;
> > + bridge->revision = mvebu_readl(port, PCIE_DEV_REV_OFF) & 0xff;
>
> On Armada 370 and XP, this field is apparently always 0x0, so not very
> useful. But if it's useful on other mvebu SoCs, that's fine, it's just
> an informative field anyway.
Humm, that should be the stepping, unless i have made a mistake. The
code Gregory wrote for mvebu-soc-id.c does:
/* SoC ID */
soc_dev_id = readl(pci_base + PCIE_DEV_ID_OFF) >> 16;
/* SoC revision */
soc_rev = readl(pci_base + PCIE_DEV_REV_OFF) & SOC_REV_MASK;
However, the box i'm testing on has stepping 0, so it is hard to test.
Could you test this in an OpenBlocks AX3 B0, or some other B0 device?
Thanks
Andrew
next prev parent reply other threads:[~2014-02-05 16:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 10:55 [PATCH] PCI: MVEBU: Use Device ID and revision from underlying endpoint Andrew Lunn
2014-02-05 10:55 ` Andrew Lunn
2014-02-05 16:21 ` Thomas Petazzoni
2014-02-05 16:21 ` Thomas Petazzoni
2014-02-05 16:54 ` Andrew Lunn [this message]
2014-02-05 16:54 ` Andrew Lunn
2014-02-05 17:03 ` Thomas Petazzoni
2014-02-05 17:03 ` Thomas Petazzoni
2014-02-05 18:42 ` Jason Cooper
2014-02-05 18:42 ` Jason Cooper
2014-02-12 21:06 ` Bjorn Helgaas
2014-02-12 21:06 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140205165432.GD29860@lunn.ch \
--to=andrew@lunn.ch \
--cc=bhelgaas@google.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.