All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mason <slash.tmp@free.fr>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci <linux-pci@vger.kernel.org>
Subject: Re: Pointers for writing a good PCIe driver
Date: Tue, 7 Feb 2017 16:55:28 +0100	[thread overview]
Message-ID: <05046a8a-ba9f-26f9-4c93-f657f9da6294@free.fr> (raw)
In-Reply-To: <ff099b5f-efc8-bb5f-41e3-493398844cc0@free.fr>

On 06/02/2017 16:54, Mason wrote:

> My platform ( arch/arm/mach-tango ) provides a PCIe controller from PLDA.
> 
> I do have access to a driver that works for a few PCIe boards, but it's
> an ancient out-of-tree driver (targeting v3.4). Also, I'm not sure it
> follows the best-practice guidelines (e.g. it hard-codes a few
> work-arounds directly in drivers/pci/probe.c)
> 
> If I understand correctly, while PCIe is a standard, it is not codified
> as much as USB (XHCI) or SATA (AHCI), which means the register layout
> (and possibly other things) are left up to the integrator? Which means
> there cannot be some kind of "generic" driver that works for a random
> PCIe controller?
> 
> I guess my main question is: do you have pointers on getting started
> writing a PCIe driver good enough for upstream?
> 
> Is Documentation/PCI/PCIEBUS-HOWTO.txt still a relevant resource?
> 
> Are there good resources to get up to speed on the PCIe terminology?

I'm also wondering: in many Linux subsystems, there are often
several drivers of different quality; some are obsolescent and
have not been updated in a while, while some are recent and
follow all the latest best-practice guidelines (and the rest
is somewhere in the middle).

Are there 1 or 2 very good PCIe drivers to take as examples
as good starting points? (Perhaps a simple driver, and a
more complex driver.)

Does anyone know if any SoC with a driver upstream is using
a PLDA controller?

Regards.

  reply	other threads:[~2017-02-07 15:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-06 15:54 Pointers for writing a good PCIe driver Mason
2017-02-07 15:55 ` Mason [this message]
2017-02-07 20:06   ` Bjorn Helgaas
2017-02-07 21:47     ` Bjorn Helgaas
2017-02-07 22:56       ` Mason
2017-02-12 16:50         ` Greg KH
2017-02-17  9:20           ` Mason
2017-02-17 14:38             ` Bjorn Helgaas
2017-02-17 17:00               ` Mason
2017-02-17 17:00                 ` Mason
2017-02-17 17:50                 ` Bjorn Helgaas
2017-02-17 17:50                   ` Bjorn Helgaas
2017-02-20 16:12                   ` Mason
2017-02-20 16:12                     ` Mason

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=05046a8a-ba9f-26f9-4c93-f657f9da6294@free.fr \
    --to=slash.tmp@free.fr \
    --cc=bhelgaas@google.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.