linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PCIe support for ARM64
@ 2015-06-19  5:43 ravikiran gummaluri
  2015-06-19 13:45 ` Bjorn Helgaas
  0 siblings, 1 reply; 8+ messages in thread
From: ravikiran gummaluri @ 2015-06-19  5:43 UTC (permalink / raw)
  To: linux-pci

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.

Thanks & Regards
Ravikiran



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PCIe support for ARM64
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2015-06-19 13:45 UTC (permalink / raw)
  To: ravikiran gummaluri; +Cc: linux-pci

On Fri, Jun 19, 2015 at 12:43 AM, ravikiran gummaluri
<rgummal@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/drivers/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
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PCIe support for ARM64
  2015-06-19 13:45 ` Bjorn Helgaas
@ 2015-07-10 11:18   ` ravikiran gummaluri
  2015-07-11 20:16     ` Bjorn Helgaas
  0 siblings, 1 reply; 8+ messages in thread
From: ravikiran gummaluri @ 2015-07-10 11:18 UTC (permalink / raw)
  To: linux-pci

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/drivers/
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? 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PCIe support for ARM64
  2015-07-10 11:18   ` ravikiran gummaluri
@ 2015-07-11 20:16     ` Bjorn Helgaas
  2015-07-17 11:43       ` Ravikiran Gummaluri
  0 siblings, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2015-07-11 20:16 UTC (permalink / raw)
  To: ravikiran gummaluri; +Cc: linux-pci, Pratyush Anand, Bharat Kumar Gogada

[+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/drivers/
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: PCIe support for ARM64
  2015-07-11 20:16     ` Bjorn Helgaas
@ 2015-07-17 11:43       ` Ravikiran Gummaluri
  2015-07-17 12:44         ` Lorenzo Pieralisi
  0 siblings, 1 reply; 8+ messages in thread
From: Ravikiran Gummaluri @ 2015-07-17 11:43 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, Pratyush Anand, Bharat Kumar Gogada

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).

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PCIe support for ARM64
  2015-07-17 11:43       ` Ravikiran Gummaluri
@ 2015-07-17 12:44         ` Lorenzo Pieralisi
  2015-07-17 13:27           ` Bharat Kumar Gogada
  0 siblings, 1 reply; 8+ messages in thread
From: Lorenzo Pieralisi @ 2015-07-17 12:44 UTC (permalink / raw)
  To: Ravikiran Gummaluri
  Cc: Bjorn Helgaas, linux-pci, Pratyush Anand, Bharat Kumar Gogada

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
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: PCIe support for ARM64
  2015-07-17 12:44         ` Lorenzo Pieralisi
@ 2015-07-17 13:27           ` Bharat Kumar Gogada
  2015-07-17 14:55             ` Lorenzo Pieralisi
  0 siblings, 1 reply; 8+ messages in thread
From: Bharat Kumar Gogada @ 2015-07-17 13:27 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Bjorn Helgaas, linux-pci, Pratyush Anand, Ravikiran Gummaluri

Hi Lorenzo,

Thanks for the input. But pci_fixup_irqs is defined in drivers/pci/setup-irq.c and when I see its Makefile (drivers/pci/Makefile), it shows that this function is available for ARM and not for ARM64 in v4.2-rc1 kernel.

#
# Some architectures use the generic PCI setup functions
#
obj-$(CONFIG_ALPHA) += setup-irq.o
obj-$(CONFIG_ARM) += setup-irq.o
obj-$(CONFIG_UNICORE32) += setup-irq.o
obj-$(CONFIG_SUPERH) += setup-irq.o
obj-$(CONFIG_MIPS) += setup-irq.o
obj-$(CONFIG_TILE) += setup-irq.o
obj-$(CONFIG_SPARC_LEON) += setup-irq.o
obj-$(CONFIG_M68K) += setup-irq.o


Regards
Bharat Kumar Gogada


-----Original Message-----
From: Lorenzo Pieralisi [mailto:lorenzo.pieralisi@arm.com]
Sent: Friday, July 17, 2015 6:15 PM
To: Ravikiran Gummaluri
Cc: Bjorn Helgaas; linux-pci@vger.kernel.org; Pratyush Anand; Bharat Kumar Gogada
Subject: Re: PCIe support for ARM64

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
>


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: PCIe support for ARM64
  2015-07-17 13:27           ` Bharat Kumar Gogada
@ 2015-07-17 14:55             ` Lorenzo Pieralisi
  0 siblings, 0 replies; 8+ messages in thread
From: Lorenzo Pieralisi @ 2015-07-17 14:55 UTC (permalink / raw)
  To: Bharat Kumar Gogada
  Cc: Bjorn Helgaas, linux-pci, Pratyush Anand, Ravikiran Gummaluri

On Fri, Jul 17, 2015 at 02:27:38PM +0100, Bharat Kumar Gogada wrote:
> Hi Lorenzo,
> 
> Thanks for the input. But pci_fixup_irqs is defined in drivers/pci/setup-irq.c and when I see its Makefile (drivers/pci/Makefile), it shows that this function is available for ARM and not for ARM64 in v4.2-rc1 kernel.

I meant enable it (you can make a separate patch as part of the series)
and use it.

We still have a problem with pci_sys_data align_resource() pointer
to solve before.

Lorenzo

> # Some architectures use the generic PCI setup functions
> #
> obj-$(CONFIG_ALPHA) += setup-irq.o
> obj-$(CONFIG_ARM) += setup-irq.o
> obj-$(CONFIG_UNICORE32) += setup-irq.o
> obj-$(CONFIG_SUPERH) += setup-irq.o
> obj-$(CONFIG_MIPS) += setup-irq.o
> obj-$(CONFIG_TILE) += setup-irq.o
> obj-$(CONFIG_SPARC_LEON) += setup-irq.o
> obj-$(CONFIG_M68K) += setup-irq.o
> 
> 
> Regards
> Bharat Kumar Gogada
> 
> 
> -----Original Message-----
> From: Lorenzo Pieralisi [mailto:lorenzo.pieralisi@arm.com]
> Sent: Friday, July 17, 2015 6:15 PM
> To: Ravikiran Gummaluri
> Cc: Bjorn Helgaas; linux-pci@vger.kernel.org; Pratyush Anand; Bharat Kumar Gogada
> Subject: Re: PCIe support for ARM64
> 
> 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
> >
> 
> 
> This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-07-17 14:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-07-17 13:27           ` Bharat Kumar Gogada
2015-07-17 14:55             ` Lorenzo Pieralisi

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).