lkml.org 
[lkml]   [2022]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RESEND PATCH RFC V4 3/3] PCI: Add PCI quirks to generate device tree node for Xilinx Alveo U50
    Date
    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>
    ---
    drivers/pci/quirks.c | 11 +++++++++++
    1 file changed, 11 insertions(+)

    diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
    index 4944798e75b5..5d76932f59ec 100644
    --- a/drivers/pci/quirks.c
    +++ b/drivers/pci/quirks.c
    @@ -5956,3 +5956,14 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x56b1, aspm_l1_acceptable_latency
    DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x56c0, aspm_l1_acceptable_latency);
    DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x56c1, aspm_l1_acceptable_latency);
    #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.17.1
    \
     
     \ /
      Last update: 2022-11-21 17:44    [W:3.077 / U:0.052 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site