linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Jagan Teki <jagannadh.teki@gmail.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Need help on Linux PCIe
Date: Tue, 3 Dec 2013 10:39:06 -0700	[thread overview]
Message-ID: <CAErSpo4DNqUpA6Cb_tanW3uRJ3J-4utCQwtRz3eYZETCMtniUQ@mail.gmail.com> (raw)
In-Reply-To: <CAD6G_RT0S43BrOeXxJ6d3p1ALbXkGumZCSPBaK1Bz=2pX3hHYQ@mail.gmail.com>

On Tue, Dec 3, 2013 at 4:24 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> Hi,
>
> I have few question on Linux PCIe subsystem, I am trying to understand
> the PCIe on ARM platform.
> 1. Compared to PCI, PCIe have an extra port functionalists/services
> which is implemented drivers/pci/pcie/* is it true?

Yes.

> 2. PCIe root complex is same as Host controller drivers in linux drivers/host/*

Yes.

> 3. As individual endpoint drivers are registered to pci_core as
> pci_driver_register, then what is the common call for registering
> individual HC driver to pci-core?

The host controller-PCI core interface is not as mature as the
pci_register_driver() interface.  The basic interface is
pci_scan_root_bus().  If you skim through the drivers in
drivers/pci/host/* and drivers/acpi/pci_root.c, the interface to the
PCI core will be fairly obvious.  And you'll learn what the existing
practices are in case you need to add or modify something.

> 4. Can you list-down the basic and advanced functionalists supported
> by HC driver in PCIe?

The HC driver supplies struct pci_ops (functions to access config
space), and the resources (bus numbers, MMIO aperture, I/O aperture)
routed to the PCI/PCIe hierarchy below the host bridge.  These are all
supplied to pci_scan_root_bus().  There might also be chipset
initialization and error handling logic in the HC driver.

Pretty much everything else is generic and is supported by PCI core code.

> 5. The PCIe port bus driver is common core? means no need to change w.r.t SOC?

Yes.

Bjorn

  reply	other threads:[~2013-12-03 17:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 11:24 Need help on Linux PCIe Jagan Teki
2013-12-03 17:39 ` Bjorn Helgaas [this message]
2013-12-04  6:20   ` Jagan Teki
2013-12-04 15:11     ` Bjorn Helgaas
2013-12-04 17:00       ` Jagan Teki
2013-12-04 18:05         ` Bjorn Helgaas
2013-12-05  6:30           ` Jagan Teki
2013-12-05 18:15             ` Bjorn Helgaas
2013-12-05 18:36               ` Jagan Teki
2013-12-05 20:03                 ` 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=CAErSpo4DNqUpA6Cb_tanW3uRJ3J-4utCQwtRz3eYZETCMtniUQ@mail.gmail.com \
    --to=bhelgaas@google.com \
    --cc=jagannadh.teki@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /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).