From: "Pali Rohár" <pali@kernel.org>
To: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] PCI: aardvark: Add support for PCI Bridge Subsystem Vendor ID on emulated bridge
Date: Mon, 29 Aug 2022 11:34:28 +0200 [thread overview]
Message-ID: <20220829093428.4danatwennps55dr@pali> (raw)
In-Reply-To: <YwyHdMv1JsQNuVGS@lpieralisi>
On Monday 29 August 2022 11:31:32 Lorenzo Pieralisi wrote:
> On Tue, Jul 12, 2022 at 12:59:15AM +0200, Pali Rohár wrote:
> > Register with Subsystem Device/Vendor ID is at offset 0x2c. Export is via
> > emulated bridge.
>
> "Export it..." I suppose.
Yes, it is a typo :-(
> So in short, this patch enables support for the Subsystem Device/Vendor
> ID - by reading it in the PCI controller config space and storing it
> in the emulated bridge control structures, so that it is exposed in
> the respective PCI capability.
Yes, it reads it from internal aardvark registers and stores it into the
emulated bridge config space.
> Correct ?
>
> Thanks,
> Lorenzo
>
> > After this change Subsystem ID is visible in lspci output at line:
> >
> > Capabilities: [40] Subsystem
> >
> > Signed-off-by: Pali Rohár <pali@kernel.org>
> >
> > ---
> > Changes in v2:
> > * Fix wrong rebase, do not add PCIE_CORE_EXP_ROM_BAR_REG
> > ---
> > drivers/pci/controller/pci-aardvark.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c
> > index 74511f015168..060936ef01fe 100644
> > --- a/drivers/pci/controller/pci-aardvark.c
> > +++ b/drivers/pci/controller/pci-aardvark.c
> > @@ -32,6 +32,7 @@
> > #define PCIE_CORE_DEV_ID_REG 0x0
> > #define PCIE_CORE_CMD_STATUS_REG 0x4
> > #define PCIE_CORE_DEV_REV_REG 0x8
> > +#define PCIE_CORE_SSDEV_ID_REG 0x2c
> > #define PCIE_CORE_PCIEXP_CAP 0xc0
> > #define PCIE_CORE_ERR_CAPCTL_REG 0x118
> > #define PCIE_CORE_ERR_CAPCTL_ECRC_CHK_TX BIT(5)
> > @@ -982,6 +983,8 @@ static int advk_sw_pci_bridge_init(struct advk_pcie *pcie)
> > /* Indicates supports for Completion Retry Status */
> > bridge->pcie_conf.rootcap = cpu_to_le16(PCI_EXP_RTCAP_CRSVIS);
> >
> > + bridge->subsystem_vendor_id = advk_readl(pcie, PCIE_CORE_SSDEV_ID_REG) & 0xffff;
> > + bridge->subsystem_id = advk_readl(pcie, PCIE_CORE_SSDEV_ID_REG) >> 16;
> > bridge->has_pcie = true;
> > bridge->data = pcie;
> > bridge->ops = &advk_pci_bridge_emul_ops;
> > --
> > 2.20.1
> >
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-08-29 9:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 22:18 [PATCH] PCI: aardvark: Add support for PCI Bridge Subsystem Vendor ID on emulated bridge Pali Rohár
2022-07-11 22:59 ` [PATCH v2] " Pali Rohár
2022-08-29 9:31 ` Lorenzo Pieralisi
2022-08-29 9:34 ` Pali Rohár [this message]
2022-09-16 12:44 ` Lorenzo Pieralisi
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=20220829093428.4danatwennps55dr@pali \
--to=pali@kernel.org \
--cc=bhelgaas@google.com \
--cc=kw@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).