public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Lizhi Hou <lizhi.hou@amd.com>
To: Bjorn Helgaas <helgaas@kernel.org>, Rob Herring <robh@kernel.org>
Cc: <linux-pci@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <max.zhen@amd.com>,
	<sonal.santan@amd.com>, <stefano.stabellini@xilinx.com>
Subject: Re: [PATCH V10 2/5] PCI: Create device tree node for bridge
Date: Fri, 30 Jun 2023 12:59:47 -0700	[thread overview]
Message-ID: <1c41b8e1-5b13-463b-c522-6775954c0ee7@amd.com> (raw)
In-Reply-To: <20230630164821.GA483874@bhelgaas>


On 6/30/23 09:48, Bjorn Helgaas wrote:
> On Thu, Jun 29, 2023 at 05:52:26PM -0600, Rob Herring wrote:
>> On Thu, Jun 29, 2023 at 05:56:31PM -0500, Bjorn Helgaas wrote:
>>> On Thu, Jun 29, 2023 at 10:19:47AM -0700, Lizhi Hou wrote:
>>>> The PCI endpoint device such as Xilinx Alveo PCI card maps the register
>>>> spaces from multiple hardware peripherals to its PCI BAR. Normally,
>>>> the PCI core discovers devices and BARs using the PCI enumeration process.
>>>> There is no infrastructure to discover the hardware peripherals that are
>>>> present in a PCI device, and which can be accessed through the PCI BARs.
>>> IIUC this is basically a multi-function device except that instead of
>>> each device being a separate PCI Function, they all appear in a single
>>> Function.  That would mean all the devices share the same config space
>>> so a single PCI Command register controls all of them, they all share
>>> the same IRQs (either INTx or MSI/MSI-X), any MMIO registers are likely
>>> in a shared BAR, etc., right?
>> Could be multiple BARs, but yes.
> Where does the PCI glue live?  E.g., who ioremaps the BARs?  Who sets
> up PCI interrupts?  Who enables bus mastering?  The platform driver
> that claims the DT node wouldn't know that this is part of a PCI
> device, so I guess the PCI driver must do all that stuff?  I don't see
> it in the xmgmt-drv.c from
> https://lore.kernel.org/all/20220305052304.726050-4-lizhi.hou@xilinx.com/
>
Yes, the PCI driver will do all that stuff. This xmgmt-drv.c is created

to just populating the devices based on fdt input.  It is removed after

the unittest is created which can populate devices and verify the

address translation.


Thanks,

Lizhi


  reply	other threads:[~2023-06-30 20:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-29 17:19 [PATCH V10 0/5] Generate device tree node for pci devices Lizhi Hou
2023-06-29 17:19 ` [PATCH V10 1/5] of: dynamic: Add interfaces for creating device node dynamically Lizhi Hou
2023-06-29 17:19 ` [PATCH V10 2/5] PCI: Create device tree node for bridge Lizhi Hou
2023-06-29 22:56   ` Bjorn Helgaas
2023-06-29 23:52     ` Rob Herring
2023-06-30 16:48       ` Bjorn Helgaas
2023-06-30 19:59         ` Lizhi Hou [this message]
2023-06-30 18:24       ` Lizhi Hou
2023-07-18 15:50         ` Lizhi Hou
2023-07-18 18:15         ` Rob Herring
2023-07-24 18:18           ` Lizhi Hou
2023-06-29 23:55     ` Rob Herring
2023-06-30 14:42       ` Bjorn Helgaas
2023-06-29 17:19 ` [PATCH V10 3/5] PCI: Add quirks to generate device tree node for Xilinx Alveo U50 Lizhi Hou
2023-06-29 20:37   ` Bjorn Helgaas
2023-06-29 17:19 ` [PATCH V10 4/5] of: overlay: Extend of_overlay_fdt_apply() to specify the target node Lizhi Hou
2023-06-29 17:19 ` [PATCH V10 5/5] of: unittest: Add pci_dt_testdrv pci driver Lizhi Hou

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=1c41b8e1-5b13-463b-c522-6775954c0ee7@amd.com \
    --to=lizhi.hou@amd.com \
    --cc=devicetree@vger.kernel.org \
    --cc=helgaas@kernel.org \
    --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 \
    /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