PCIe support for ARM64
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
Bjorn Helgaas
maintainerQuoted 8 lines · ravikiran gummaluri
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
Quoted 12 lines · Bjorn Helgaas <bhelgaas <at> google.com> writes:
Quoted 8 lines · On Fri, Jun 19, 2015 at 12:43 AM, ravikiran gummaluri <rgummal <at>…
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.
Quoted 2 lines
There is PCI support for ARM64 in mainline:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?
id=d1e6dc91b532
Quoted 3 lines
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
Quoted 5 lines
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.
Quoted 7 lines
As with several other drivers, the current
pcie-xilinx.cusespci_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?
Bjorn Helgaas
maintainer[+cc Pratyush, Bharat]
Quoted 35 lines · ravikiran gummaluri
Quoted 12 lines · Bjorn Helgaas <bhelgaas <at> google.com> writes:
Quoted 8 lines · On Fri, Jun 19, 2015 at 12:43 AM, ravikiran gummaluri <rgummal <at>…
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.
Quoted 2 lines
There is PCI support for ARM64 in mainline:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d1e6dc91b532
Quoted 3 lines
There is also a Xilinx driver already:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/
pci/host/pcie-xilinx.cQuoted 5 lines
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.
Quoted 7 lines
As with several other drivers, the current
pcie-xilinx.cusespci_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
Quoted 10 lines
Thanks Bjorn.
pcie-xilinx.cis AXI device. Now we are developing for different device usingpcie-xilinx.cas reference. When we trying to compile our new driver with latest kernel we are getting compilation problems for structhw_pciand structpci_sys_datafor 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
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:[email protected]]
Sent: Sunday, July 12, 2015 1:47 AM
To: Ravikiran Gummaluri
Cc: [email protected]; Pratyush Anand; Bharat Kumar Gogada
Subject: Re: PCIe support for ARM64
[+cc Pratyush, Bharat]
Quoted 36 lines · ravikiran gummaluri
Quoted 12 lines · Bjorn Helgaas <bhelgaas <at> google.com> writes:
Quoted 8 lines · On Fri, Jun 19, 2015 at 12:43 AM, ravikiran gummaluri <rgummal <at>…
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.Quoted 2 lines
There is PCI support for ARM64 in mainline:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d1e6dc91b532
Quoted 3 lines
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.cQuoted 5 lines
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.
Quoted 7 lines
As with several other drivers, the current
pcie-xilinx.cusespci_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
Quoted 10 lines
Thanks Bjorn.
pcie-xilinx.cis AXI device. Now we are developing for different device usingpcie-xilinx.cas reference. When we trying to compile our new driver with latest kernel we are getting compilation problems for structhw_pciand structpci_sys_datafor 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
Quoted 2 lines · Ravikiran Gummaluri
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 bymap_irqmethod inhw_pcistructure).
Call pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
in your now ARM/ARM64 common host controller driver.
Lorenzo
Quoted 90 lines
Thanks & Regards
Ravi Kiran G-----Original Message-----
From: Bjorn Helgaas [mailto:[email protected]]
Sent: Sunday, July 12, 2015 1:47 AM
To: Ravikiran Gummaluri
Cc: [email protected]; Pratyush Anand; Bharat Kumar Gogada
Subject: Re: PCIe support for ARM64[+cc Pratyush, Bharat]
Quoted 36 lines · ravikiran gummaluri
Quoted 12 lines · Bjorn Helgaas <bhelgaas <at> google.com> writes:
Quoted 8 lines · On Fri, Jun 19, 2015 at 12:43 AM, ravikiran gummaluri <rgummal <at>…
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.Quoted 2 lines
There is PCI support for ARM64 in mainline:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d1e6dc91b532
Quoted 3 lines
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.cQuoted 5 lines
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.
Quoted 7 lines
As with several other drivers, the current
pcie-xilinx.cusespci_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
Quoted 10 lines
Thanks Bjorn.
pcie-xilinx.cis AXI device. Now we are developing for different device usingpcie-xilinx.cas reference. When we trying to compile our new driver with latest kernel we are getting compilation problems for structhw_pciand structpci_sys_datafor 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.cas reference.I see that there is already a driver for xilinx PCIe controller with ARM platform.
drivers/pci/host/pcie-xilinx.cIf 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
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:[email protected]]
Sent: Friday, July 17, 2015 6:15 PM
To: Ravikiran Gummaluri
Cc: Bjorn Helgaas; [email protected]; Pratyush Anand; Bharat Kumar Gogada
Subject: Re: PCIe support for ARM64
Quoted 2 lines · Ravikiran Gummaluri
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 bymap_irqmethod inhw_pcistructure).
Call pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
in your now ARM/ARM64 common host controller driver.
Lorenzo
Quoted 83 lines
Thanks & Regards
Ravi Kiran G-----Original Message-----
From: Bjorn Helgaas [mailto:[email protected]]
Sent: Sunday, July 12, 2015 1:47 AM
To: Ravikiran Gummaluri
Cc: [email protected]; Pratyush Anand; Bharat Kumar Gogada
Subject: Re: PCIe support for ARM64[+cc Pratyush, Bharat]
Quoted 37 lines · ravikiran gummaluri
Quoted 12 lines · Bjorn Helgaas <bhelgaas <at> google.com> writes:
Quoted 8 lines · On Fri, Jun 19, 2015 at 12:43 AM, ravikiran gummaluri <rgummal <at>…
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.Quoted 2 lines
There is PCI support for ARM64 in mainline:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d1e6dc91b532
Quoted 3 lines
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.cQuoted 5 lines
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.
Quoted 7 lines
As with several other drivers, the current
pcie-xilinx.cusespci_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
Quoted 10 lines
Thanks Bjorn.
pcie-xilinx.cis AXI device. Now we are developing for different device usingpcie-xilinx.cas reference. When we trying to compile our new driver with latest kernel we are getting compilation problems for structhw_pciand structpci_sys_datafor 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.cas reference.I see that there is already a driver for xilinx PCIe controller with ARM platform.
drivers/pci/host/pcie-xilinx.cIf 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.
Quoted 8 lines
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 [email protected] 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.
Quoted 3 lines · Bharat Kumar Gogada
Hi Lorenzo,
Thanks for the input. But
pci_fixup_irqsis defined indrivers/pci/setup-irq.cand when I see itsMakefile(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
Quoted 128 lines
# 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.oRegards
Bharat Kumar Gogada-----Original Message-----
From: Lorenzo Pieralisi [mailto:[email protected]]
Sent: Friday, July 17, 2015 6:15 PM
To: Ravikiran Gummaluri
Cc: Bjorn Helgaas; [email protected]; Pratyush Anand; Bharat Kumar Gogada
Subject: Re: PCIe support for ARM64Quoted 2 lines · Ravikiran Gummaluri
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 bymap_irqmethod inhw_pcistructure).Call
pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);in your now ARM/ARM64 common host controller driver.
Lorenzo
Quoted 83 lines
Thanks & Regards
Ravi Kiran G-----Original Message-----
From: Bjorn Helgaas [mailto:[email protected]]
Sent: Sunday, July 12, 2015 1:47 AM
To: Ravikiran Gummaluri
Cc: [email protected]; Pratyush Anand; Bharat Kumar Gogada
Subject: Re: PCIe support for ARM64[+cc Pratyush, Bharat]
Quoted 37 lines · ravikiran gummaluri
Quoted 12 lines · Bjorn Helgaas <bhelgaas <at> google.com> writes:
Quoted 8 lines · On Fri, Jun 19, 2015 at 12:43 AM, ravikiran gummaluri <rgummal <at>…
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.Quoted 2 lines
There is PCI support for ARM64 in mainline:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d1e6dc91b532
Quoted 3 lines
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.cQuoted 5 lines
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.
Quoted 7 lines
As with several other drivers, the current
pcie-xilinx.cusespci_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
Quoted 10 lines
Thanks Bjorn.
pcie-xilinx.cis AXI device. Now we are developing for different device usingpcie-xilinx.cas reference. When we trying to compile our new driver with latest kernel we are getting compilation problems for structhw_pciand structpci_sys_datafor 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.cas reference.I see that there is already a driver for xilinx PCIe controller with ARM platform.
drivers/pci/host/pcie-xilinx.cIf 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.
Quoted 8 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.htmlThis 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.