From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Russell King <linux@arm.linux.org.uk>
Cc: "Antoine Tenart" <antoine.tenart@bootlin.com>,
linux-pci@vger.kernel.org,
"Gregory Clement" <gregory.clement@bootlin.com>,
"Maxime Chevallier" <maxime.chevallier@bootlin.com>,
"Nadav Haklai" <nadavh@marvell.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Miquèl Raynal" <miquel.raynal@bootlin.com>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 0/3] PCI: emulated PCI bridge config space
Date: Wed, 12 Sep 2018 17:48:28 +0200 [thread overview]
Message-ID: <20180912154831.2220-1-thomas.petazzoni@bootlin.com> (raw)
Hello,
The pci-mvebu driver already contains some logic to emulate a root
port PCI bridge configuration space. It turns out that we have a
similar need for the pci-aardvark driver. Instead of duplicating the
same logic in two drivers, this patch series starts by adding a small
common infrastructure that helps emulate a root port PCI bridge config
space, converts pci-mvebu to use it, and finally extends pci-aardvark
to use it as well.
Thanks to this, Marvell Armada 3720 based systems, which use the
Aarkvark PCI controller, will have better PCI support, by having a
root port PCI bridge exposed.
The emulated PCI bridge common logic is a proposal, I very much
welcome comments and suggestions. Also, if you feel that adding a
common logic for only two drivers is too early, I'm fine with
duplicating a bit of code betwen pci-mvebu and pci-aardvark.
In this version 2, I have (hopefully) taken into account the comments
from Bjorn Helgaas and Russell King. Here are the changes:
- Rebased to 4.19-rc1
- The functions implementing the config space read/write emulation
now have the knowledge of which registers/bits are read-only,
read-write, reserved and write-1-to-clear, and behave according to
this information.
- I have renamed the function to use conf_read() and conf_write()
suffixes, as suggested by Bjorn.
- The whole thing is now named pci-bridge-emul instead of
pci-sw-bridge (and of course all functions, types and macros were
changed accordingly), as Bjorn wasn't happy about pci-sw-bridge.
- The header file was moved into drivers/pci (instead of being in
include/linux).
Thanks a lot in advance for your review and feedback.
Best regards,
Thomas Petazzoni
Thomas Petazzoni (2):
PCI: Introduce PCI bridge emulated config space common logic
PCI: mvebu: Convert to PCI emulated bridge config space
Zachary Zhang (1):
PCI: aardvark: Implement emulated root PCI bridge config space
drivers/pci/Kconfig | 3 +
drivers/pci/Makefile | 1 +
drivers/pci/controller/Kconfig | 2 +
drivers/pci/controller/pci-aardvark.c | 129 ++++++++++-
drivers/pci/controller/pci-mvebu.c | 375 +++++++++----------------------
drivers/pci/pci-bridge-emul.c | 408 ++++++++++++++++++++++++++++++++++
drivers/pci/pci-bridge-emul.h | 124 +++++++++++
7 files changed, 770 insertions(+), 272 deletions(-)
create mode 100644 drivers/pci/pci-bridge-emul.c
create mode 100644 drivers/pci/pci-bridge-emul.h
--
2.14.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: thomas.petazzoni@bootlin.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 0/3] PCI: emulated PCI bridge config space
Date: Wed, 12 Sep 2018 17:48:28 +0200 [thread overview]
Message-ID: <20180912154831.2220-1-thomas.petazzoni@bootlin.com> (raw)
Hello,
The pci-mvebu driver already contains some logic to emulate a root
port PCI bridge configuration space. It turns out that we have a
similar need for the pci-aardvark driver. Instead of duplicating the
same logic in two drivers, this patch series starts by adding a small
common infrastructure that helps emulate a root port PCI bridge config
space, converts pci-mvebu to use it, and finally extends pci-aardvark
to use it as well.
Thanks to this, Marvell Armada 3720 based systems, which use the
Aarkvark PCI controller, will have better PCI support, by having a
root port PCI bridge exposed.
The emulated PCI bridge common logic is a proposal, I very much
welcome comments and suggestions. Also, if you feel that adding a
common logic for only two drivers is too early, I'm fine with
duplicating a bit of code betwen pci-mvebu and pci-aardvark.
In this version 2, I have (hopefully) taken into account the comments
from Bjorn Helgaas and Russell King. Here are the changes:
- Rebased to 4.19-rc1
- The functions implementing the config space read/write emulation
now have the knowledge of which registers/bits are read-only,
read-write, reserved and write-1-to-clear, and behave according to
this information.
- I have renamed the function to use conf_read() and conf_write()
suffixes, as suggested by Bjorn.
- The whole thing is now named pci-bridge-emul instead of
pci-sw-bridge (and of course all functions, types and macros were
changed accordingly), as Bjorn wasn't happy about pci-sw-bridge.
- The header file was moved into drivers/pci (instead of being in
include/linux).
Thanks a lot in advance for your review and feedback.
Best regards,
Thomas Petazzoni
Thomas Petazzoni (2):
PCI: Introduce PCI bridge emulated config space common logic
PCI: mvebu: Convert to PCI emulated bridge config space
Zachary Zhang (1):
PCI: aardvark: Implement emulated root PCI bridge config space
drivers/pci/Kconfig | 3 +
drivers/pci/Makefile | 1 +
drivers/pci/controller/Kconfig | 2 +
drivers/pci/controller/pci-aardvark.c | 129 ++++++++++-
drivers/pci/controller/pci-mvebu.c | 375 +++++++++----------------------
drivers/pci/pci-bridge-emul.c | 408 ++++++++++++++++++++++++++++++++++
drivers/pci/pci-bridge-emul.h | 124 +++++++++++
7 files changed, 770 insertions(+), 272 deletions(-)
create mode 100644 drivers/pci/pci-bridge-emul.c
create mode 100644 drivers/pci/pci-bridge-emul.h
--
2.14.4
next reply other threads:[~2018-09-12 15:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-12 15:48 Thomas Petazzoni [this message]
2018-09-12 15:48 ` [PATCHv2 0/3] PCI: emulated PCI bridge config space Thomas Petazzoni
2018-09-12 15:48 ` [PATCHv2 1/3] PCI: Introduce PCI bridge emulated config space common logic Thomas Petazzoni
2018-09-12 15:48 ` Thomas Petazzoni
2018-09-12 18:53 ` Bjorn Helgaas
2018-09-12 18:53 ` Bjorn Helgaas
2018-09-14 14:38 ` Russell King - ARM Linux
2018-09-14 14:38 ` Russell King - ARM Linux
2018-09-14 14:38 ` Russell King - ARM Linux
2018-09-12 15:48 ` [PATCHv2 2/3] PCI: mvebu: Convert to PCI emulated bridge config space Thomas Petazzoni
2018-09-12 15:48 ` Thomas Petazzoni
2018-09-14 14:44 ` Russell King - ARM Linux
2018-09-14 14:44 ` Russell King - ARM Linux
2018-09-18 16:17 ` Lorenzo Pieralisi
2018-09-18 16:17 ` Lorenzo Pieralisi
2018-09-18 16:17 ` Lorenzo Pieralisi
2018-10-04 10:48 ` Lorenzo Pieralisi
2018-10-04 10:48 ` Lorenzo Pieralisi
2018-10-04 11:13 ` Thomas Petazzoni
2018-10-04 11:13 ` Thomas Petazzoni
2018-10-04 11:26 ` Russell King - ARM Linux
2018-10-04 11:26 ` Russell King - ARM Linux
2018-09-12 15:48 ` [PATCHv2 3/3] PCI: aardvark: Implement emulated root PCI " Thomas Petazzoni
2018-09-12 15:48 ` Thomas Petazzoni
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=20180912154831.2220-1-thomas.petazzoni@bootlin.com \
--to=thomas.petazzoni@bootlin.com \
--cc=antoine.tenart@bootlin.com \
--cc=bhelgaas@google.com \
--cc=gregory.clement@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=lorenzo.pieralisi@arm.com \
--cc=maxime.chevallier@bootlin.com \
--cc=miquel.raynal@bootlin.com \
--cc=nadavh@marvell.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 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.