All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: adc: xilinx: support all ARM platforms
@ 2019-06-05 21:07 Robert Hancock
  2019-06-06 10:09 ` Ardelean, Alexandru
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Hancock @ 2019-06-05 21:07 UTC (permalink / raw)
  To: linux-iio; +Cc: jic23, knaack.h, lars, pmeerw, michal.simek, Robert Hancock

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.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
---
 drivers/iio/adc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index f96a770..93863bb 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -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


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

* Re: [PATCH] iio: adc: xilinx: support all ARM platforms
  2019-06-05 21:07 [PATCH] iio: adc: xilinx: support all ARM platforms Robert Hancock
@ 2019-06-06 10:09 ` Ardelean, Alexandru
  2019-06-06 15:21   ` Robert Hancock
  0 siblings, 1 reply; 8+ messages in thread
From: Ardelean, Alexandru @ 2019-06-06 10:09 UTC (permalink / raw)
  To: hancock, linux-iio; +Cc: michal.simek, jic23, knaack.h, lars, pmeerw

On Wed, 2019-06-05 at 15:07 -0600, Robert Hancock wrote:
> [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

> 
> Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
> ---
>  drivers/iio/adc/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> index f96a770..93863bb 100644
> --- a/drivers/iio/adc/Kconfig
> +++ b/drivers/iio/adc/Kconfig
> @@ -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
> 

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

* Re: [PATCH] iio: adc: xilinx: support all ARM platforms
  2019-06-06 10:09 ` Ardelean, Alexandru
@ 2019-06-06 15:21   ` Robert Hancock
  2019-06-07  7:30     ` Michal Simek
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Hancock @ 2019-06-06 15:21 UTC (permalink / raw)
  To: Ardelean, Alexandru, linux-iio
  Cc: michal.simek, jic23, knaack.h, lars, pmeerw

On 2019-06-06 4:09 a.m., Ardelean, Alexandru wrote:
> On Wed, 2019-06-05 at 15:07 -0600, Robert Hancock wrote:
>> [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?

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.

> 
> Thanks
> Alex
> 
>>
>> Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
>> ---
>>  drivers/iio/adc/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
>> index f96a770..93863bb 100644
>> --- a/drivers/iio/adc/Kconfig
>> +++ b/drivers/iio/adc/Kconfig
>> @@ -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
>>

-- 
Robert Hancock
Senior Software Developer
SED Systems, a division of Calian Ltd.
Email: hancock@sedsystems.ca

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

* Re: [PATCH] iio: adc: xilinx: support all ARM platforms
  2019-06-06 15:21   ` Robert Hancock
@ 2019-06-07  7:30     ` Michal Simek
  2019-06-07 19:17       ` Alexandru Ardelean
  0 siblings, 1 reply; 8+ messages in thread
From: Michal Simek @ 2019-06-07  7:30 UTC (permalink / raw)
  To: Robert Hancock, Ardelean, Alexandru, linux-iio
  Cc: michal.simek, jic23, knaack.h, lars, pmeerw

On 06. 06. 19 17:21, Robert Hancock wrote:
> On 2019-06-06 4:09 a.m., Ardelean, Alexandru wrote:
>> On Wed, 2019-06-05 at 15:07 -0600, Robert Hancock wrote:
>>> [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?
> 
> 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

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

* Re: [PATCH] iio: adc: xilinx: support all ARM platforms
  2019-06-07  7:30     ` Michal Simek
@ 2019-06-07 19:17       ` Alexandru Ardelean
  2019-06-07 19:32         ` Robert Hancock
  0 siblings, 1 reply; 8+ messages in thread
From: Alexandru Ardelean @ 2019-06-07 19:17 UTC (permalink / raw)
  To: Michal Simek
  Cc: Robert Hancock, Ardelean, Alexandru, linux-iio, jic23, knaack.h,
	lars, pmeerw

On Fri, Jun 7, 2019 at 10:33 AM Michal Simek <michal.simek@xilinx.com> wrote:
>
> On 06. 06. 19 17:21, Robert Hancock wrote:
> > On 2019-06-06 4:09 a.m., Ardelean, Alexandru wrote:
> >> On Wed, 2019-06-05 at 15:07 -0600, Robert Hancock wrote:
> >>> [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?
> >
> > 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.

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

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

* Re: [PATCH] iio: adc: xilinx: support all ARM platforms
  2019-06-07 19:17       ` Alexandru Ardelean
@ 2019-06-07 19:32         ` Robert Hancock
  2019-06-08 12:00           ` Jonathan Cameron
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Hancock @ 2019-06-07 19:32 UTC (permalink / raw)
  To: Alexandru Ardelean, Michal Simek
  Cc: Ardelean, Alexandru, linux-iio, jic23, knaack.h, lars, pmeerw

On 2019-06-07 1:17 p.m., Alexandru Ardelean wrote:
> On Fri, Jun 7, 2019 at 10:33 AM Michal Simek <michal.simek@xilinx.com> wrote:
>>
>> On 06. 06. 19 17:21, Robert Hancock wrote:
>>> On 2019-06-06 4:09 a.m., Ardelean, Alexandru wrote:
>>>> On Wed, 2019-06-05 at 15:07 -0600, Robert Hancock wrote:
>>>>> [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?
>>>
>>> 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).

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?

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

-- 
Robert Hancock
Senior Software Developer
SED Systems, a division of Calian Ltd.
Email: hancock@sedsystems.ca

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

* Re: [PATCH] iio: adc: xilinx: support all ARM platforms
  2019-06-07 19:32         ` Robert Hancock
@ 2019-06-08 12:00           ` Jonathan Cameron
  2019-06-10  7:34             ` Ardelean, Alexandru
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Cameron @ 2019-06-08 12:00 UTC (permalink / raw)
  To: Robert Hancock
  Cc: Alexandru Ardelean, Michal Simek, Ardelean, Alexandru, linux-iio,
	knaack.h, lars, pmeerw

On Fri, 7 Jun 2019 13:32:11 -0600
Robert Hancock <hancock@sedsystems.ca> wrote:

> On 2019-06-07 1:17 p.m., Alexandru Ardelean wrote:
> > On Fri, Jun 7, 2019 at 10:33 AM Michal Simek <michal.simek@xilinx.com> wrote:  
> >>
> >> On 06. 06. 19 17:21, Robert Hancock wrote:  
> >>> On 2019-06-06 4:09 a.m., Ardelean, Alexandru wrote:  
> >>>> On Wed, 2019-06-05 at 15:07 -0600, Robert Hancock wrote:  
> >>>>> [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?  
> >>>
> >>> 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).  
> 
> 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?

Sounds good to me.

Jonathan

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


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

* Re: [PATCH] iio: adc: xilinx: support all ARM platforms
  2019-06-08 12:00           ` Jonathan Cameron
@ 2019-06-10  7:34             ` Ardelean, Alexandru
  0 siblings, 0 replies; 8+ messages in thread
From: Ardelean, Alexandru @ 2019-06-10  7:34 UTC (permalink / raw)
  To: jic23, hancock
  Cc: ardeleanalex, michal.simek, knaack.h, linux-iio, pmeerw, lars

On Sat, 2019-06-08 at 13:00 +0100, Jonathan Cameron wrote:
> [External]
> 
> 
> On Fri, 7 Jun 2019 13:32:11 -0600
> Robert Hancock <hancock@sedsystems.ca> wrote:
> 
> > On 2019-06-07 1:17 p.m., Alexandru Ardelean wrote:
> > > On Fri, Jun 7, 2019 at 10:33 AM Michal Simek <michal.simek@xilinx.com> wrote:
> > > > On 06. 06. 19 17:21, Robert Hancock wrote:
> > > > > On 2019-06-06 4:09 a.m., Ardelean, Alexandru wrote:
> > > > > > On Wed, 2019-06-05 at 15:07 -0600, Robert Hancock wrote:
> > > > > > > [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?
> > > > > 
> > > > > 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).
> > 
> > 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?
> 
> 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


> 
> Jonathan
> 
> > > Naturally, if using a different PCIe-to-AXI bridge controller (other
> > > than Xilinx's), it would be an idea to use that Kconfig symbol.
> > > 
> > > > > 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

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

end of thread, other threads:[~2019-06-10  7:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-05 21:07 [PATCH] iio: adc: xilinx: support all ARM platforms Robert Hancock
2019-06-06 10:09 ` Ardelean, Alexandru
2019-06-06 15:21   ` Robert Hancock
2019-06-07  7:30     ` Michal Simek
2019-06-07 19:17       ` Alexandru Ardelean
2019-06-07 19:32         ` Robert Hancock
2019-06-08 12:00           ` Jonathan Cameron
2019-06-10  7:34             ` Ardelean, Alexandru

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.