Skip to contentSkip to conversation

pci_ids: Added FPGA-related entries

PATCH In review Eli Billauer 2 participants 6 messages Nov 30, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 pci_ids: Added FPGA-related entries

These are Vendor IDs to FPGA manufacturers, and are necessary for the Xillybus driver. Even though no other driver uses them currently, I believe their place is in the general list for future use. The PCIe interface is popular among these FPGAs, and Linux is used often.

---
 include/linux/pci_ids.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
include/linux/pci_ids.h +4 -0
index 9d36b82..09fcb46 100644
@@ -1320,6 +1320,10 @@
 #define PCI_DEVICE_ID_REALTEK_8139	0x8139
 
 #define PCI_VENDOR_ID_XILINX		0x10ee
+#define PCI_VENDOR_ID_ALTERA		0x1172
+#define PCI_VENDOR_ID_ACTEL		0x11aa
+#define PCI_VENDOR_ID_LATTICE		0x1204
+
 #define PCI_DEVICE_ID_RME_DIGI96	0x3fc0
 #define PCI_DEVICE_ID_RME_DIGI96_8	0x3fc1
 #define PCI_DEVICE_ID_RME_DIGI96_8_PRO	0x3fc2
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH v2 2/2 New driver: Xillybus generic interface for FPGA (programmable logic)

Xillybus is a general-purpose framework for communication between programmable logic (FPGA) and a host. It provides a simple connection between hardware FIFOs in the FPGA and their respective device files on the host.

The user interface is device files that are used like pipe files, only there's FPGA logic on the other side rather than another process.

The underlying transport between the host and FPGA is either PCIe or AXI (AMBA bus by ARM).

The Xillybus logic (IP core) is configurable in the number of pipes it presents and their nature. The driver autodetects these pipes, making it essentially forward-compatible to future configurations. The benefit of having this driver enabled in the kernel is that hardware vendors may release a new card, knowing that it will work out of the box on any future Linux machine, with the specific configuration defined for the FPGA part.

Documentation: http://xillybus.com/doc/

This driver has been available for download for over a year, and has been actively used on a wide variety of kernels versions and configurations.

---
 drivers/misc/Kconfig         |   32 +
 drivers/misc/Makefile        |    3 +
 drivers/misc/xillybus.h      |  185 ++++
 drivers/misc/xillybus_core.c | 2347 ++++++++++++++++++++++++++++++++++++++++++
 drivers/misc/xillybus_of.c   |  210 ++++
 drivers/misc/xillybus_pcie.c |  256 +++++
 6 files changed, 3033 insertions(+), 0 deletions(-)
 create mode 100644 drivers/misc/xillybus.h
 create mode 100644 drivers/misc/xillybus_core.c
 create mode 100644 drivers/misc/xillybus_of.c
 create mode 100644 drivers/misc/xillybus_pcie.c
drivers/misc/Kconfig +32 -0
index b151b7c..b6029c6 100644
@@ -499,6 +499,38 @@ config USB_SWITCH_FSA9480
 	  stereo and mono audio, video, microphone and UART data to use
 	  a common connector port.
 
+config XILLYBUS
+	tristate "Xillybus Support"
+	depends on PCI || (OF_ADDRESS && OF_DEVICE && OF_IRQ)
+	default n
+	help
+	  Xillybus is a generic interface for peripherals designed on
+	  programmable logic (FPGA). The driver probes the hardware for
+	  its capabilities, and creates device files accordingly.
+
+	  If unsure, say N.
+
+config XILLYBUS_PCIE
+	tristate "Xillybus over PCIe"
+	depends on XILLYBUS && PCI
+	default n
+	help
+	  Set to M if you want Xillybus to use PCI Express for communicating
+	  with the FPGA. This option is harmless, but it requires PCI
+	  support on the kernel. Say M if the target processor supports
+	  PCI and/or PCIe.
+
+config XILLYBUS_OF
+	tristate "Xillybus over Device Tree"
+	depends on XILLYBUS && OF_ADDRESS && OF_DEVICE && OF_IRQ
+	default n
+	help
+	  Set to M if you want Xillybus to find its resources from the
+	  Open Firmware Flattened Device Tree. If the target is an embedded
+	  system, say M.  This option is harmless, but it requires Device
+	  Tree support on the kernel, which is usually not the case for
+	  kernels for fullblown computers.
+
 source "drivers/misc/c2port/Kconfig"
 source "drivers/misc/eeprom/Kconfig"
 source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +3 -0
index 2129377..e9cd54d 100644
@@ -49,3 +49,6 @@ obj-y				+= carma/
 obj-$(CONFIG_USB_SWITCH_FSA9480) += fsa9480.o
 obj-$(CONFIG_ALTERA_STAPL)	+=altera-stapl/
 obj-$(CONFIG_INTEL_MEI)		+= mei/
+obj-$(CONFIG_XILLYBUS)		+= xillybus_core.o
+obj-$(CONFIG_XILLYBUS_PCIE)	+= xillybus_pcie.o
+obj-$(CONFIG_XILLYBUS_OF)	+= xillybus_of.o
drivers/misc/xillybus.h new file +185 -0

185 lines not on this page · raw message

drivers/misc/xillybus_core.c new file +2347 -0

2,347 lines not on this page · raw message

drivers/misc/xillybus_of.c new file +210 -0

210 lines not on this page · raw message

drivers/misc/xillybus_pcie.c new file +256 -0

214 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.2.3

Part of the diff is not shown here. View the raw message.

maintainer
#2 lore raw

Re: [PATCH v2 2/2] New driver: Xillybus generic interface for FPGA (programmable logic)

Quoted 17 lines · Eli Billauer

Xillybus is a general-purpose framework for communication between programmable logic (FPGA) and a host. It provides a simple connection between hardware FIFOs in the FPGA and their respective device files on the host.

The user interface is device files that are used like pipe files, only there's FPGA logic on the other side rather than another process.

The underlying transport between the host and FPGA is either PCIe or AXI (AMBA bus by ARM).

The Xillybus logic (IP core) is configurable in the number of pipes it presents and their nature. The driver autodetects these pipes, making it essentially forward-compatible to future configurations. The benefit of having this driver enabled in the kernel is that hardware vendors may release a new card, knowing that it will work out of the box on any future Linux machine, with the specific configuration defined for the FPGA part.

Quoted 4 lines

Documentation: http://xillybus.com/doc/

This driver has been available for download for over a year, and has been actively used on a wide variety of kernels versions and configurations.

You didn't answer my previous comments about the kernel/user interface here, why not?

And you ignored my other review comments, which is a sure way for me to want to reject this and not look at any future submissions from you for at least a month...

greg k-h

#3 lore raw

Re: [PATCH v2 2/2] New driver: Xillybus generic interface for FPGA (programmable logic)

I made changes in the code as a response to almost all your comments to my best understanding.

I also sent a separate mail responding to a couple of issues, which seems not have reached you.

But to put it short:

* The pci_ids: I wasn't sure if I should remove only my own product ID or all the vendor IDs, and this is clear now.

* As for the documentation, I don't quite understand what I should add. There's a rather extensive documentation for download at the site. The docs for the host side mostly instruct common UNIX programming techniques: The device files are just data pipes to FIFOs in the FPGA, behaving like one would expect.

* As for the special class issue: When Xillybus is used, the whole system's mission is usually around it (e.g. it's a computer doing data acquisition through the Xillybus pipes). So giving it a high profile makes sense, I believe. Besides, a dozen of device files are not rare. Needless to say, I'm not going to insist on this.

Other than that, it's all changes in the code. It's a major change there.

Sorry for this miscommunication.

Eli

Quoted 8 lines · Greg KH

You didn't answer my previous comments about the kernel/user interface here, why not?

And you ignored my other review comments, which is a sure way for me to want to reject this and not look at any future submissions from you for at least a month...

maintainer
#4 lore raw

Re: [PATCH v2 2/2] New driver: Xillybus generic interface for FPGA (programmable logic)

Quoted 5 lines · Eli Billauer

I made changes in the code as a response to almost all your comments to my best understanding.

I also sent a separate mail responding to a couple of issues, which seems not have reached you.

I now see it, sorry for the grumpy pre-coffee response I made earlier.

Quoted 4 lines

But to put it short:

* The pci_ids: I wasn't sure if I should remove only my own product ID or all the vendor IDs, and this is clear now.

Good.

Quoted 5 lines

* As for the documentation, I don't quite understand what I should add. There's a rather extensive documentation for download at the site. The docs for the host side mostly instruct common UNIX programming techniques: The device files are just data pipes to FIFOs in the FPGA, behaving like one would expect.

You need to document the user/kernel API that you have now created for this driver, either in the Documentation directory, or in the very least, the driver submission changelog entry. Otherwise we don't know where to look, nor if those docs are even correct anymore.

Quoted 5 lines

* As for the special class issue: When Xillybus is used, the whole system's mission is usually around it (e.g. it's a computer doing data acquisition through the Xillybus pipes). So giving it a high profile makes sense, I believe. Besides, a dozen of device files are not rare. Needless to say, I'm not going to insist on this.

Good, please use misc device, for the reasons I suggested in my other email.

Quoted 2 lines

Other than that, it's all changes in the code. It's a major change there.

I don't understand what these sentances mean.

greg k-h

maintainer
#5 lore raw
In reply to Eli Billauer
Quoted 4 lines · Eli Billauer

These are Vendor IDs to FPGA manufacturers, and are necessary for the Xillybus driver. Even though no other driver uses them currently, I believe their place is in the general list for future use. The PCIe interface is popular among these FPGAs, and Linux is used often.

Again, only add these entries if they are being used in more than one place. If, in the future, another driver needs it, then it can be added to this file, but not now.

thanks,

greg k-h