linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Ravikiran Gummaluri <ravikiran.gummaluri@xilinx.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Pratyush Anand <pratyush.anand@gmail.com>,
	Bharat Kumar Gogada <bharatku@xilinx.com>
Subject: Re: PCIe support for ARM64
Date: Fri, 17 Jul 2015 13:44:54 +0100	[thread overview]
Message-ID: <20150717124454.GA19824@red-moon> (raw)
In-Reply-To: <A12CBBFFEB35D84DABCB166110D762215E41B2C5@XAP-PVEXMBX01.xlnx.xilinx.com>

On Fri, Jul 17, 2015 at 12:43:42PM +0100, Ravikiran Gummaluri wrote:
> HI Bjorn/Pratyush,
> 	Thanks for your inputs. We were able to do modify our driver according to V4.2-rc1. We were only be able to bring up MSI related changes but not Legacy. Can you point us how to handle Legacy interrupts in new approach (previously in ARM32 handled by map_irq method in hw_pci structure).

Call pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);

in your now ARM/ARM64 common host controller driver.

Lorenzo

> 
> Thanks & Regards
> Ravi Kiran G 
> 
> -----Original Message-----
> From: Bjorn Helgaas [mailto:bhelgaas@google.com] 
> Sent: Sunday, July 12, 2015 1:47 AM
> To: Ravikiran Gummaluri
> Cc: linux-pci@vger.kernel.org; Pratyush Anand; Bharat Kumar Gogada
> Subject: Re: PCIe support for ARM64
> 
> [+cc Pratyush, Bharat]
> 
> On Fri, Jul 10, 2015 at 11:18:10AM +0000, ravikiran gummaluri wrote:
> > Bjorn Helgaas <bhelgaas <at> google.com> writes:
> > 
> > > 
> > > On Fri, Jun 19, 2015 at 12:43 AM, ravikiran gummaluri <rgummal <at> 
> > > xilinx.com> wrote:
> > > > HI
> > > >
> > > > I am developing PCIe root port driver for Xilinx device. We have 
> > > > used following patch for ARM64 bit support 
> > > > "https://lkml.org/lkml/2014/7/3/764". The link explains it as 
> > > > temporary patch and main line will be updated soon with those 
> > > > changes. We have not seen the changes till now. Can you let us 
> > > > know when we can expect the changes in mainline? We are planning to push our drivers to mainline.
> > > 
> > > There is PCI support for ARM64 in mainline:
> > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?
> > id=d1e6dc91b532
> > > 
> > > There is also a Xilinx driver already:
> > > 
> > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/dr
> > ivers/
> > pci/host/pcie-xilinx.c
> > > 
> > > I don't know if your device is similar to the AXI device, but it 
> > > would be good if you can share or modify that driver instead of 
> > > adding a new one.
> > > 
> > > As with several other drivers, the current pcie-xilinx.c uses 
> > > pci_common_init_dev(), so it only works on ARM (not ARM64).  This is 
> > > a known issue, and people are working on making these drivers less 
> > > arch-specific.
> > > 
> > > Bjorn
> > > 
> > 
> > Thanks Bjorn. pcie-xilinx.c is AXI device. Now we are developing for 
> > different device using pcie-xilinx.c as reference. When we trying to 
> > compile our new driver with latest kernel we are getting compilation 
> > problems for struct hw_pci and struct pci_sys_data for ARM64. These 
> > structures are not defined in ARM64. The following patch has the 
> > structure definitions "https://lkml.org/lkml/2014/7/3/764". We have 
> > used this patch and able complete our development. Now for up 
> > streaming it we need this patch in main line. From your discursion we 
> > understood that some work is going on ARCH independent API and 
> > structure. When can we expect them in mainline?
> 
> Pratyush already answered this:
> 
>     Please have a look to the latest kernel and try to see what is
>     available for ARM64 PCIe.
> 
>     You may see drivers/pci/host/pci-xgene.c as reference.
> 
>     I see that there is already a driver for xilinx PCIe controller with
>     ARM platform.
>     drivers/pci/host/pcie-xilinx.c
> 
>     If it is the same device on ARM64, then you need to take similar
>     approach what is being discussed
>     for designware on ARM64.
> 
>     http://marc.info/?l=devicetree&m=143394380815743&w=2
> 
> My advice is to adapt your driver so it works using the interfaces and structures in v4.2-rc1 and post that.  As Pratyush mentioned, the X-Gene driver should be a good place to start.
> 
> There will likely be changes to the way we handle arch- and platform- specific data, but you don't need to wait for those to be completed.  When people make changes like that, it is always their responsibility to update all the code in the tree to match.  So once your code is in the tree, you don't have to worry about updating your driver to follow those changes.
> 
> On the other hand, if you do wait for those changes to be completed, you never know when or if they ever will be done, and you'll have to do your own updates before posting your driver.
> 
> Bjorn
> --
> 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
> 

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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19  5:43 PCIe support for ARM64 ravikiran gummaluri
2015-06-19 13:45 ` Bjorn Helgaas
2015-07-10 11:18   ` ravikiran gummaluri
2015-07-11 20:16     ` Bjorn Helgaas
2015-07-17 11:43       ` Ravikiran Gummaluri
2015-07-17 12:44         ` Lorenzo Pieralisi [this message]
2015-07-17 13:27           ` Bharat Kumar Gogada
2015-07-17 14:55             ` Lorenzo Pieralisi

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=20150717124454.GA19824@red-moon \
    --to=lorenzo.pieralisi@arm.com \
    --cc=bharatku@xilinx.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=pratyush.anand@gmail.com \
    --cc=ravikiran.gummaluri@xilinx.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).