Skip to contentSkip to conversation

iio: adc: xilinx: support all ARM platforms

PATCH In review Robert Hancock 5 participants 8 messages Jun 5, 2019 – Jun 10, 2019 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: adc: xilinx: support all ARM platforms

Since the XADC logic can be used with standalone Xilinx FPGAs, this driver can potentially be used with various ARM platforms, not just Zynq. Change the Zynq dependency to ARM in the list of supported platforms in the Kconfig dependencies for this driver.

---
 drivers/iio/adc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/Kconfig +1 -1
index f96a770..93863bb 100644
@@ -1085,7 +1085,7 @@ config VIPERBOARD_ADC
 
 config XILINX_XADC
 	tristate "Xilinx XADC driver"
-	depends on ARCH_ZYNQ || MICROBLAZE || COMPILE_TEST
+	depends on ARM || MICROBLAZE || COMPILE_TEST
 	depends on HAS_IOMEM
 	select IIO_BUFFER
 	select IIO_TRIGGERED_BUFFER
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 7 lines · Robert Hancock

[External]

Since the XADC logic can be used with standalone Xilinx FPGAs, this driver can potentially be used with various ARM platforms, not just Zynq. Change the Zynq dependency to ARM in the list of supported platforms in the Kconfig dependencies for this driver.

To my knowledge, there are 3 FPGA platforms with ARM supported in Linux.
And symbols are ARCH_ZYNQ, ARCH_ZYNQMP & ARCH_SOCFPGA.
For these ARM + FPGA SoCs, it is usually preferred to list the supported/tested ARM + FPGA platforms in Kconfig.

I am curious: are you using something that isn't in the above list?

Thanks
Alex

Quoted 22 lines
---
 drivers/iio/adc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/Kconfig +1 -2
index f96a770..93863bb 100644
@@ -1085,7 +1085,7 @@ config VIPERBOARD_ADC
 
 config XILINX_XADC
        tristate "Xilinx XADC driver"
-       depends on ARCH_ZYNQ || MICROBLAZE || COMPILE_TEST
+       depends on ARM || MICROBLAZE || COMPILE_TEST
        depends on HAS_IOMEM
        select IIO_BUFFER
        select IIO_TRIGGERED_BUFFER
--

1.8.3.1

#2 lore raw
Quoted 9 lines · Alexandru
Quoted 7 lines · Robert Hancock

[External]

Since the XADC logic can be used with standalone Xilinx FPGAs, this driver can potentially be used with various ARM platforms, not just Zynq. Change the Zynq dependency to ARM in the list of supported platforms in the Kconfig dependencies for this driver.

Quoted 5 lines

To my knowledge, there are 3 FPGA platforms with ARM supported in Linux.
And symbols are ARCH_ZYNQ, ARCH_ZYNQMP & ARCH_SOCFPGA.
For these ARM + FPGA SoCs, it is usually preferred to list the supported/tested ARM + FPGA platforms in Kconfig.

I am curious: are you using something that isn't in the above list?

Yes, we are using the XADC on a Kintex-7 FPGA through a PCIe to AXI bridge using an iMX6D platform - not an integrated ARM+FPGA.

Using such an approach this driver could potentially be used on just about any platform, but I didn't want to open it up too much for now in case of some compile issues.

Quoted 26 lines

Thanks
Alex

Quoted 22 lines
---
 drivers/iio/adc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/Kconfig +1 -2
index f96a770..93863bb 100644
@@ -1085,7 +1085,7 @@ config VIPERBOARD_ADC
 
 config XILINX_XADC
        tristate "Xilinx XADC driver"
-       depends on ARCH_ZYNQ || MICROBLAZE || COMPILE_TEST
+       depends on ARM || MICROBLAZE || COMPILE_TEST
        depends on HAS_IOMEM
        select IIO_BUFFER
        select IIO_TRIGGERED_BUFFER
--

1.8.3.1

Signature · 4 lines
Robert Hancock
Senior Software Developer
SED Systems, a division of Calian Ltd.
Email: [email protected]
#3 lore raw
Quoted 14 lines · Robert Hancock
Quoted 13 lines · Alexandru
Quoted 7 lines · Robert Hancock

[External]

Since the XADC logic can be used with standalone Xilinx FPGAs, this driver can potentially be used with various ARM platforms, not just Zynq. Change the Zynq dependency to ARM in the list of supported platforms in the Kconfig dependencies for this driver.

To my knowledge, there are 3 FPGA platforms with ARM supported in Linux.
And symbols are ARCH_ZYNQ, ARCH_ZYNQMP & ARCH_SOCFPGA.
For these ARM + FPGA SoCs, it is usually preferred to list the supported/tested ARM + FPGA platforms in Kconfig.

Quoted 8 lines
Quoted 1 line

I am curious: are you using something that isn't in the above list?

Yes, we are using the XADC on a Kintex-7 FPGA through a PCIe to AXI bridge using an iMX6D platform - not an integrated ARM+FPGA.

Using such an approach this driver could potentially be used on just about any platform, but I didn't want to open it up too much for now in case of some compile issues.

0day system should answer this for you.

M

#4 lore raw
Quoted 16 lines · Michal Simek
Quoted 14 lines · Robert Hancock
Quoted 13 lines · Alexandru
Quoted 7 lines · Robert Hancock

[External]

Since the XADC logic can be used with standalone Xilinx FPGAs, this driver can potentially be used with various ARM platforms, not just Zynq. Change the Zynq dependency to ARM in the list of supported platforms in the Kconfig dependencies for this driver.

To my knowledge, there are 3 FPGA platforms with ARM supported in Linux.
And symbols are ARCH_ZYNQ, ARCH_ZYNQMP & ARCH_SOCFPGA.
For these ARM + FPGA SoCs, it is usually preferred to list the supported/tested ARM + FPGA platforms in Kconfig.

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

I am curious: are you using something that isn't in the above list?

Yes, we are using the XADC on a Kintex-7 FPGA through a PCIe to AXI bridge using an iMX6D platform - not an integrated ARM+FPGA.

In that case, it would be a bit more interesting to do a depends on PCIE_XILINX, or whichever is the Kconfig symbol for the PCIe-to-AXI bridge.

And there are some benefits to that, the major being that you can also support other ARCHs as well (x86, ppc, mips, etc).

Naturally, if using a different PCIe-to-AXI bridge controller (other than Xilinx's), it would be an idea to use that Kconfig symbol.

Quoted 7 lines
Quoted 3 lines

Using such an approach this driver could potentially be used on just about any platform, but I didn't want to open it up too much for now in case of some compile issues.

0day system should answer this for you.

M

#5 lore raw
Quoted 23 lines · Alexandru Ardelean
Quoted 16 lines · Michal Simek
Quoted 14 lines · Robert Hancock
Quoted 13 lines · Alexandru
Quoted 7 lines · Robert Hancock

[External]

Since the XADC logic can be used with standalone Xilinx FPGAs, this driver can potentially be used with various ARM platforms, not just Zynq. Change the Zynq dependency to ARM in the list of supported platforms in the Kconfig dependencies for this driver.

To my knowledge, there are 3 FPGA platforms with ARM supported in Linux.
And symbols are ARCH_ZYNQ, ARCH_ZYNQMP & ARCH_SOCFPGA.
For these ARM + FPGA SoCs, it is usually preferred to list the supported/tested ARM + FPGA platforms in Kconfig.

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

I am curious: are you using something that isn't in the above list?

Yes, we are using the XADC on a Kintex-7 FPGA through a PCIe to AXI bridge using an iMX6D platform - not an integrated ARM+FPGA.

Quoted 6 lines

In that case, it would be a bit more interesting to do a depends on PCIE_XILINX, or whichever is the Kconfig symbol for the PCIe-to-AXI bridge.

And there are some benefits to that, the major being that you can also support other ARCHs as well (x86, ppc, mips, etc).

There isn't a kernel driver for that PCIe-AXI bridge - it doesn't really do much very interesting on its own, it just acts as a regular PCIe endpoint and has build-time settings to map AXI memory to PCIe BARs and host memory into AXI memory space. You have to build your own logic to do things like map interrupts from the AXI side onto MSI interrupts from the bridge.

It kind of seems like the easiest solution would be to just delete the platform restriction entirely for this driver, as I really don't see anything platform specific in there. Would anyone object to that?

Quoted 11 lines

Naturally, if using a different PCIe-to-AXI bridge controller (other than Xilinx's), it would be an idea to use that Kconfig symbol.

Quoted 7 lines
Quoted 3 lines

Using such an approach this driver could potentially be used on just about any platform, but I didn't want to open it up too much for now in case of some compile issues.

0day system should answer this for you.

M

Signature · 4 lines
Robert Hancock
Senior Software Developer
SED Systems, a division of Calian Ltd.
Email: [email protected]
maintainer
#6 lore raw
Quoted 38 lines · On Fri, 7 Jun 2019 13:32:11 -0600 Robert Hancock <[email protected]> wrote:
Quoted 23 lines · Alexandru Ardelean
Quoted 16 lines · Michal Simek
Quoted 14 lines · Robert Hancock
Quoted 13 lines · Alexandru
Quoted 7 lines · Robert Hancock

[External]

Since the XADC logic can be used with standalone Xilinx FPGAs, this driver can potentially be used with various ARM platforms, not just Zynq. Change the Zynq dependency to ARM in the list of supported platforms in the Kconfig dependencies for this driver.

To my knowledge, there are 3 FPGA platforms with ARM supported in Linux.
And symbols are ARCH_ZYNQ, ARCH_ZYNQMP & ARCH_SOCFPGA.
For these ARM + FPGA SoCs, it is usually preferred to list the supported/tested ARM + FPGA platforms in Kconfig.

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

I am curious: are you using something that isn't in the above list?

Yes, we are using the XADC on a Kintex-7 FPGA through a PCIe to AXI bridge using an iMX6D platform - not an integrated ARM+FPGA.

Quoted 6 lines

In that case, it would be a bit more interesting to do a depends on PCIE_XILINX, or whichever is the Kconfig symbol for the PCIe-to-AXI bridge.

And there are some benefits to that, the major being that you can also support other ARCHs as well (x86, ppc, mips, etc).

There isn't a kernel driver for that PCIe-AXI bridge - it doesn't really do much very interesting on its own, it just acts as a regular PCIe endpoint and has build-time settings to map AXI memory to PCIe BARs and host memory into AXI memory space. You have to build your own logic to do things like map interrupts from the AXI side onto MSI interrupts from the bridge.

Quoted 3 lines

It kind of seems like the easiest solution would be to just delete the platform restriction entirely for this driver, as I really don't see anything platform specific in there. Would anyone object to that?

Sounds good to me.

Jonathan

Quoted 13 lines
Quoted 12 lines

Naturally, if using a different PCIe-to-AXI bridge controller (other than Xilinx's), it would be an idea to use that Kconfig symbol.

Quoted 7 lines
Quoted 3 lines

Using such an approach this driver could potentially be used on just about any platform, but I didn't want to open it up too much for now in case of some compile issues.

0day system should answer this for you.

M

#7 lore raw
Quoted 44 lines · Jonathan Cameron

[External]

Quoted 38 lines · On Fri, 7 Jun 2019 13:32:11 -0600 Robert Hancock <[email protected]> wrote:
Quoted 23 lines · Alexandru Ardelean
Quoted 16 lines · Michal Simek
Quoted 15 lines · Robert Hancock
Quoted 14 lines · Alexandru
Quoted 7 lines · Robert Hancock

[External]

Since the XADC logic can be used with standalone Xilinx FPGAs, this driver can potentially be used with various ARM platforms, not just Zynq. Change the Zynq dependency to ARM in the list of supported platforms in the Kconfig dependencies for this driver.

To my knowledge, there are 3 FPGA platforms with ARM supported in Linux.
And symbols are ARCH_ZYNQ, ARCH_ZYNQMP & ARCH_SOCFPGA.
For these ARM + FPGA SoCs, it is usually preferred to list the supported/tested ARM + FPGA platforms in Kconfig.

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

I am curious: are you using something that isn't in the above list?

Yes, we are using the XADC on a Kintex-7 FPGA through a PCIe to AXI bridge using an iMX6D platform - not an integrated ARM+FPGA.

Quoted 6 lines

In that case, it would be a bit more interesting to do a depends on PCIE_XILINX, or whichever is the Kconfig symbol for the PCIe-to-AXI bridge.

And there are some benefits to that, the major being that you can also support other ARCHs as well (x86, ppc, mips, etc).

There isn't a kernel driver for that PCIe-AXI bridge - it doesn't really do much very interesting on its own, it just acts as a regular PCIe endpoint and has build-time settings to map AXI memory to PCIe BARs and host memory into AXI memory space. You have to build your own logic to do things like map interrupts from the AXI side onto MSI interrupts from the bridge.

Quoted 5 lines
Quoted 3 lines

It kind of seems like the easiest solution would be to just delete the platform restriction entirely for this driver, as I really don't see anything platform specific in there. Would anyone object to that?

Sounds good to me.

Sounds fine to me as well.
I guess the initial intent (with ARCH_ depends) was to limit to what was tested, when the driver was written initially.

However, other users can try this on their own with different combinations (like the ones mentioned above). Thanks for the info btw: it was informative (I learned something).

Thanks
Alex

Quoted 13 lines

Jonathan

Quoted 10 lines
Quoted 10 lines

Naturally, if using a different PCIe-to-AXI bridge controller (other than Xilinx's), it would be an idea to use that Kconfig symbol.

Quoted 7 lines
Quoted 3 lines

Using such an approach this driver could potentially be used on just about any platform, but I didn't want to open it up too much for now in case of some compile issues.

0day system should answer this for you.

M