devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liviu Dudau <Liviu.Dudau@arm.com>
To: Sandeepa Prabhu <sandeepa.prabhu@linaro.org>
Cc: linux-pci <linux-pci@vger.kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	Will Deacon <Will.Deacon@arm.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linaro-kernel <linaro-kernel@lists.linaro.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Grant Likely <grant.likely@secretlab.ca>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	LAKML <linux-arm-kernel@lists.infradead.org>,
	Tanmay Inamdar <tinamdar@apm.com>
Subject: Re: [PATCH v7 0/3] Add support for PCI in AArch64
Date: Tue, 22 Apr 2014 13:34:05 +0100	[thread overview]
Message-ID: <20140422123405.GC865@e106497-lin.cambridge.arm.com> (raw)
In-Reply-To: <CA+b37P0XV81K4oBNnkXrVHYub=Bcuuw8nrFWUGVw-i8PJ8wGxQ@mail.gmail.com>

On Tue, Apr 22, 2014 at 12:50:40PM +0100, Sandeepa Prabhu wrote:
> On 22 April 2014 15:41, Liviu Dudau <Liviu.Dudau@arm.com> wrote:
> > On Tue, Apr 22, 2014 at 09:58:28AM +0100, Sandeepa Prabhu wrote:
> >> On 14 March 2014 21:04, Liviu Dudau <Liviu.Dudau@arm.com> wrote:
> >> > Hi,
> >> >
> >> > This patch adds support for PCI to AArch64. It is based on my v7 patch
> >> > that adds support for creating generic host bridge structure from
> >> > device tree. With that in place, I was able to boot a platform that
> >> > has PCIe host bridge support and use a PCIe network card.
> >> Hi Liviu,
> >>
> >> Are these patches (including your other patchset for device tree host
> >> bridge support ) available on a public git repo I can checkout from?
> >
> > Yes, I have pushed them into git://linux-arm.org/linux-ld.git
> Thanks Liviu,
> Just to understand, is the X-gene PCIe
> (https://lwn.net/Articles/589733/) verified using the same patchset?

Tanmay can confirm, but I belive so.

Best regards,
Liviu

> 
> ~Sandeepa
> >
> > Best regards,
> > Liviu
> >
> >>
> >> Thanks,
> >> ~Sandeepa
> >>
> >> >
> >> > I have dropped the RFC tag from the subject as I now have the ambitious goal
> >> > of trying to get it mainlined.
> >> >
> >> > Changes from v6:
> >> >   - Guard the pci_domain_nr() inline implementation with #ifdef CONFIG_PCI as
> >> >     to avoid conflict with default empty version present in include/linux/pci.h.
> >> >     Thanks to Jingoo Han for catching this.
> >> >
> >> > Changes from v5:
> >> >   - Removed pcibios_fixup_bridge_ranges() as the week default version is fine.
> >> >   - Removed the ALIGN() call in pcibios_align_resource()
> >> >   - Stopped exporting pcibios_align_resource()
> >> >
> >> > Changes from v4:
> >> >   - Fixed the pci_domain_nr() implementation for arm64. Now we use
> >> >     find_pci_host_bride() to find the host bridge before we retrieve
> >> >     the domain number.
> >> >
> >> > Changes from v3:
> >> >   - Added Acks accumulated so far ;)
> >> >   - Still carrying Catalin's patch for moving the PCI_IO_BASE until it
> >> >     lands in linux-next or mainline, in order to ease applying the series
> >> >
> >> > Changes from v2:
> >> >   - Implement an arch specific version of pci_register_io_range() and
> >> >     pci_address_to_pio().
> >> >   - Return 1 from pci_proc_domain().
> >> >
> >> > Changes from v1:
> >> >   - Added Catalin's patch for moving the PCI_IO_BASE location and extend
> >> >     its size to 16MB
> >> >   - Integrated Arnd's version of pci_ioremap_io that uses a bitmap for
> >> >     keeping track of assigned IO space and returns an io_offset. At the
> >> >     moment the code is added in arch/arm64 but it can be moved in drivers/pci.
> >> >   - Added a fix for the generic ioport_map() function when !CONFIG_GENERIC_IOMAP
> >> >     as suggested by Arnd.
> >> >
> >> > v6 thread here: https://lkml.org/lkml/2014/3/5/41
> >> > v5 thread here: https://lkml.org/lkml/2014/3/4/307
> >> > v4 thread here: https://lkml.org/lkml/2014/3/3/298
> >> > v3 thread here: https://lkml.org/lkml/2014/2/28/211
> >> > v2 thread here: https://lkml.org/lkml/2014/2/27/255
> >> > v1 thread here: https://lkml.org/lkml/2014/2/3/389
> >> >
> >> >
> >> > The API used is different from the one used by ARM architecture. There is
> >> > no pci_common_init_dev() function and no hw_pci structure, as that is no
> >> > longer needed. Once the last signature is added to the legal agreement, I
> >> > will post the host bridge driver code that I am using. Meanwhile, here
> >> > is an example of what the probe function looks like, posted as an example:
> >> >
> >> > static int myhostbridge_probe(struct platform_device *pdev)
> >> > {
> >> >         int err;
> >> >         struct device_node *dev;
> >> >         struct pci_host_bridge *bridge;
> >> >         struct myhostbridge_port *pp;
> >> >         resource_size_t lastbus;
> >> >
> >> >         dev = pdev->dev.of_node;
> >> >
> >> >         if (!of_device_is_available(dev)) {
> >> >                 pr_warn("%s: disabled\n", dev->full_name);
> >> >                 return -ENODEV;
> >> >         }
> >> >
> >> >         pp = kzalloc(sizeof(struct myhostbridge_port), GFP_KERNEL);
> >> >         if (!pp)
> >> >                 return -ENOMEM;
> >> >
> >> >         bridge = of_create_pci_host_bridge(&pdev->dev, &myhostbridge_ops, pp);
> >> >         if (IS_ERR(bridge)) {
> >> >                 err = PTR_ERR(bridge);
> >> >                 goto bridge_create_fail;
> >> >         }
> >> >
> >> >         err = myhostbridge_setup(bridge->bus);
> >> >         if (err)
> >> >                 goto bridge_setup_fail;
> >> >
> >> >         /* We always enable PCI domains and we keep domain 0 backward
> >> >          * compatible in /proc for video cards
> >> >          */
> >> >         pci_add_flags(PCI_ENABLE_PROC_DOMAINS);
> >> >         pci_add_flags(PCI_REASSIGN_ALL_BUS | PCI_REASSIGN_ALL_RSRC);
> >> >
> >> >         lastbus = pci_scan_child_bus(bridge->bus);
> >> >         pci_bus_update_busn_res_end(bridge->bus, lastbus);
> >> >
> >> >         pci_assign_unassigned_bus_resources(bridge->bus);
> >> >
> >> >         pci_bus_add_devices(bridge->bus);
> >> >
> >> >         return 0;
> >> >
> >> > bridge_setup_fail:
> >> >         put_device(&bridge->dev);
> >> >         device_unregister(&bridge->dev);
> >> > bridge_create_fail:
> >> >         kfree(pp);
> >> >         return err;
> >> > }
> >> >
> >> > Best regards,
> >> > Liviu
> >> >
> >> >
> >> > Catalin Marinas (1):
> >> >   arm64: Extend the PCI I/O space to 16MB
> >> >
> >> > Liviu Dudau (2):
> >> >   Fix ioport_map() for !CONFIG_GENERIC_IOMAP cases.
> >> >   arm64: Add architecture support for PCI
> >> >
> >> >  Documentation/arm64/memory.txt |  16 +--
> >> >  arch/arm64/Kconfig             |  19 +++-
> >> >  arch/arm64/include/asm/Kbuild  |   1 +
> >> >  arch/arm64/include/asm/io.h    |   5 +-
> >> >  arch/arm64/include/asm/pci.h   |  51 +++++++++
> >> >  arch/arm64/kernel/Makefile     |   1 +
> >> >  arch/arm64/kernel/pci.c        | 173 +++++++++++++++++++++++++++++++
> >> >  include/asm-generic/io.h       |   2 +-
> >> >  8 files changed, 258 insertions(+), 10 deletions(-)
> >> >  create mode 100644 arch/arm64/include/asm/pci.h
> >> >  create mode 100644 arch/arm64/kernel/pci.c
> >> >
> >> > --
> >> > 1.9.0
> >> >
> >> >
> >> > _______________________________________________
> >> > linux-arm-kernel mailing list
> >> > linux-arm-kernel@lists.infradead.org
> >> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >>
> >
> > --
> > ====================
> > | I would like to |
> > | fix the world,  |
> > | but they're not |
> > | giving me the   |
> >  \ source code!  /
> >   ---------------
> >     ¯\_(ツ)_/¯
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

  reply	other threads:[~2014-04-22 12:34 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-14 15:34 [PATCH v7 0/3] Add support for PCI in AArch64 Liviu Dudau
2014-03-14 15:34 ` [PATCH v7 1/3] Fix ioport_map() for !CONFIG_GENERIC_IOMAP cases Liviu Dudau
2014-03-14 15:34 ` [PATCH v7 2/3] arm64: Extend the PCI I/O space to 16MB Liviu Dudau
2014-03-14 15:34 ` [PATCH v7 3/3] arm64: Add architecture support for PCI Liviu Dudau
2014-03-14 17:14   ` Catalin Marinas
2014-03-14 17:38     ` Arnd Bergmann
2014-03-14 18:05       ` Liviu Dudau
2014-03-14 19:10         ` Arnd Bergmann
2014-03-16  6:22           ` Benjamin Herrenschmidt
2014-03-17 17:38         ` Catalin Marinas
2014-03-17 18:05           ` Liviu Dudau
2014-03-19 13:56             ` Catalin Marinas
2014-03-19 17:21               ` Liviu Dudau
     [not found]                 ` <20140319172140.GA16328-2JSQmVVBSi7ZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2014-03-19 17:53                   ` Rob Herring
2014-03-19 18:36                     ` Arnd Bergmann
2014-03-19 18:37                 ` Arnd Bergmann
2014-03-20  9:46                   ` Liviu Dudau
2014-03-20 11:17                     ` Arnd Bergmann
2014-03-20 11:38                       ` Liviu Dudau
2014-03-20 12:26                         ` Arnd Bergmann
2014-03-20 12:50                           ` Liviu Dudau
     [not found]   ` <1394811258-1500-4-git-send-email-Liviu.Dudau-5wv7dgnIgG8@public.gmane.org>
2014-03-17 16:05     ` Rob Herring
2014-03-17 16:22       ` Liviu Dudau
2014-04-07 23:58   ` Bjorn Helgaas
     [not found]     ` <20140407235830.GA9959-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2014-04-08  9:52       ` Liviu Dudau
2014-04-22  8:58 ` [PATCH v7 0/3] Add support for PCI in AArch64 Sandeepa Prabhu
     [not found]   ` <CA+b37P3HqMFU6kGA+GH3YpGM_Z=TwNXL6jKu+ConR3kCk-Tp4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-22 10:11     ` Liviu Dudau
2014-04-22 11:50       ` Sandeepa Prabhu
2014-04-22 12:34         ` Liviu Dudau [this message]
2014-04-23 20:32         ` Tanmay Inamdar
2014-04-24  3:08           ` Sandeepa Prabhu
2014-05-16 10:33 ` Sunil Kovvuri
     [not found]   ` <CA+sq2Ccok5wtKjCZUkBhhj3WsiqFAoMgHK7LY210aBtMku+8SA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-16 13:24     ` Liviu Dudau
2014-05-16 17:42       ` Sunil Kovvuri
2014-05-21 11:15         ` Sunil Kovvuri
     [not found]           ` <CA+sq2Ccp0_4hgbbWa27bkYcqiXY6Ckr8eckWnHwANvhWNo97fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-21 11:34             ` Liviu Dudau
     [not found]               ` <20140521113421.GB13511-hOhETlTuV5niMG9XS5x8Mg@public.gmane.org>
2014-05-21 17:06                 ` Jason Gunthorpe
2014-05-19 13:01   ` Arnd Bergmann
2014-05-20  4:22     ` Sunil Kovvuri
     [not found]       ` <CA+sq2Ce+8YB+02B7zhxTXwropZXv9spy-w=AJ8YXCP69kr-_1A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-20  8:44         ` Arnd Bergmann
2014-05-20  8:55           ` Sunil Kovvuri

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=20140422123405.GC865@e106497-lin.cambridge.arm.com \
    --to=liviu.dudau@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sandeepa.prabhu@linaro.org \
    --cc=tinamdar@apm.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;
as well as URLs for NNTP newsgroup(s).