From: Lizhi Hou <lizhi.hou@amd.com>
To: <linux-pci@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <robh@kernel.org>,
<frowand.list@gmail.com>, <helgaas@kernel.org>
Cc: Lizhi Hou <lizhi.hou@amd.com>, <clement.leger@bootlin.com>,
<max.zhen@amd.com>, <sonal.santan@amd.com>, <larry.liu@amd.com>,
<brian.xu@amd.com>, <stefano.stabellini@xilinx.com>,
<trix@redhat.com>
Subject: [PATCH V7 3/3] PCI: Add PCI quirks to generate device tree node for Xilinx Alveo U50
Date: Thu, 19 Jan 2023 19:02:12 -0800 [thread overview]
Message-ID: <1674183732-5157-4-git-send-email-lizhi.hou@amd.com> (raw)
In-Reply-To: <1674183732-5157-1-git-send-email-lizhi.hou@amd.com>
The Xilinx Alveo U50 PCI card exposes multiple hardware peripherals on
its PCI BAR. The card firmware provides a flattened device tree to
describe the hardware peripherals on its BARs. This allows U50 driver to
load the flattened device tree and generate the device tree node for
hardware peripherals underneath.
To generate device tree node for U50 card, added PCI quirks to call
of_pci_make_dev_node() for U50.
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Signed-off-by: Sonal Santan <sonal.santan@amd.com>
Signed-off-by: Max Zhen <max.zhen@amd.com>
Reviewed-by: Brian Xu <brian.xu@amd.com>
Signed-off-by: Clément Léger <clement.leger@bootlin.com>
---
drivers/pci/quirks.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 285acc4aaccc..f184cf51b800 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -5992,3 +5992,14 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a2d, dpc_log_size);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a2f, dpc_log_size);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a31, dpc_log_size);
#endif
+
+/*
+ * For PCI device which have multiple downstream devices, its driver may use
+ * a flattened device tree to describe the downstream devices.
+ * To overlay the flattened device tree, the PCI device and all its ancestor
+ * devices need to have device tree nodes on system base device tree. Thus,
+ * before driver probing, it might need to add a device tree node as the final
+ * fixup.
+ */
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_XILINX, 0x5020, of_pci_make_dev_node);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_XILINX, 0x5021, of_pci_make_dev_node);
--
2.34.1
next prev parent reply other threads:[~2023-01-20 3:03 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-20 3:02 [PATCH V7 0/3] Generate device tree node for pci devices Lizhi Hou
2023-01-20 3:02 ` [PATCH V7 1/3] of: dynamic: Add interfaces for creating device node dynamically Lizhi Hou
2023-03-23 22:40 ` Rob Herring
2023-03-24 2:11 ` Lizhi Hou
2023-03-24 14:14 ` Rob Herring
2023-03-24 21:26 ` Lizhi Hou
2023-04-05 1:45 ` Rob Herring
2023-01-20 3:02 ` [PATCH V7 2/3] PCI: Create device tree node for selected devices Lizhi Hou
2023-01-20 3:02 ` Lizhi Hou [this message]
2023-01-23 4:32 ` [PATCH V7 0/3] Generate device tree node for pci devices Frank Rowand
2023-01-23 23:40 ` Frank Rowand
2023-02-22 15:26 ` Frank Rowand
2023-02-23 0:37 ` Lizhi Hou
2023-02-10 9:37 ` Christian Gmeiner
2023-02-26 22:38 ` Frank Rowand
2023-02-27 10:22 ` Clément Léger
2023-02-27 6:51 ` Frank Rowand
2023-02-27 10:31 ` Clément Léger
2023-03-03 23:42 ` Frank Rowand
2023-03-06 8:35 ` clement.leger
2023-03-06 21:24 ` Frank Rowand
2023-03-07 0:52 ` Rob Herring
2023-03-07 7:54 ` Stefan Roese
2023-03-08 7:38 ` Frank Rowand
2023-03-07 8:47 ` Clément Léger
2023-03-08 7:29 ` Frank Rowand
2023-03-08 7:31 ` Frank Rowand
2023-03-09 8:45 ` Clément Léger
2023-03-21 8:44 ` Christian Gmeiner
2023-03-27 3:01 ` Frank Rowand
2023-03-29 16:50 ` Frank Rowand
2023-03-30 15:19 ` Rob Herring
2023-03-31 21:56 ` Frank Rowand
2023-03-09 5:52 ` Frank Rowand
2023-03-09 5:56 ` Frank Rowand
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=1674183732-5157-4-git-send-email-lizhi.hou@amd.com \
--to=lizhi.hou@amd.com \
--cc=brian.xu@amd.com \
--cc=clement.leger@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=helgaas@kernel.org \
--cc=larry.liu@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=max.zhen@amd.com \
--cc=robh@kernel.org \
--cc=sonal.santan@amd.com \
--cc=stefano.stabellini@xilinx.com \
--cc=trix@redhat.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).