linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jchandra@broadcom.com (Jayachandran C)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2 0/4] Simple ACPI based PCI support for arm64
Date: Mon, 7 Dec 2015 22:50:25 +0530	[thread overview]
Message-ID: <1449508829-10797-1-git-send-email-jchandra@broadcom.com> (raw)

This is a very simple and generic implementation of a PCI host controller
based on ACPI. This approach does not pull in the MMCONFIG and ECAM code
from x86. The MCFG table is a simple ACPI table, and there is no need to
move the complex code from x86 (sorted linked list with a lot of global
vars) to acpi for parsing it.

The config space access is done with pci-host-generic style simple
mapping and generic PCI config read/write.

This is tested with arm64 QEMU and OVMF. Comments are very welcome.

I would also add that I am posting this as an option, if another
implementation is accepted upstream, I would happily drop this.

Thanks,
JC.

v1->v2:
 - use CONFIG_PCI_MMCONFIG on arm64, provide a weak implementation
   of pci_mmcfg_late_init for arm64.
 - The real implementation of pci_mmcfg_late_init is in pci-host-acpi.c
   and it will save the MCFG table entries to an array. Earlier this
   was done with an arch_init call
 - remove unneeded pci_bus_add_devices call and fix MCFG saving code
 - Added a patch to ACPI pci_root.c to handle arm64 PCI IO resources

Jayachandran C (4):
  arm64: pci: Add ACPI support
  PCI: Handle NULL parent in pci_bus_assign_domain_nr
  PCI: ACPI: Add a generic ACPI based host controller
  ACPI: PCI: Support platforms that need pci_remap_iospace

 arch/arm64/Kconfig               |   3 +
 arch/arm64/kernel/pci.c          |  50 +++++++++-
 drivers/acpi/pci_root.c          |  62 +++++++++++-
 drivers/acpi/resource.c          |   2 +
 drivers/pci/host/Kconfig         |   7 ++
 drivers/pci/host/Makefile        |   1 +
 drivers/pci/host/pci-host-acpi.c | 209 +++++++++++++++++++++++++++++++++++++++
 drivers/pci/pci.c                |   7 +-
 8 files changed, 335 insertions(+), 6 deletions(-)
 create mode 100644 drivers/pci/host/pci-host-acpi.c

-- 
1.9.1

             reply	other threads:[~2015-12-07 17:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-07 17:20 Jayachandran C [this message]
2015-12-07 17:20 ` [RFC PATCH v2 1/4] arm64: pci: Add ACPI support Jayachandran C
2015-12-07 17:20 ` [RFC PATCH v2 2/4] PCI: Handle NULL parent in pci_bus_assign_domain_nr Jayachandran C
2015-12-07 17:20 ` [RFC PATCH v2 3/4] PCI: ACPI: Add a generic ACPI based host controller Jayachandran C
2015-12-07 17:20 ` [RFC PATCH v2 4/4] ACPI: PCI: Support platforms that need pci_remap_iospace Jayachandran C

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=1449508829-10797-1-git-send-email-jchandra@broadcom.com \
    --to=jchandra@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.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).