Skip to contentSkip to conversation

char: xillybus: Add driver for XillyUSB (Xillybus variant for USB)

PATCH RESEND In review [email protected] 2 participants 2 messages Feb 1, 2021

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH RESEND v2 1/1 char: xillybus: Add driver for XillyUSB (Xillybus variant for USB)

From: Eli Billauer <[email protected]>

The XillyUSB driver is the USB variant for the Xillybus FPGA IP core. Even though it presents a nearly identical API on the FPGA and host, it's almost a complete rewrite of the driver: The framework for exchanging data on a USB bus is fundamentally different from doing the same with a PCIe interface, which leaves very little in common between the existing driver and the new one for XillyUSB.

---

Notes:
Changelog:

v2:
- Add comment in Kconfig file, saying XILLYUSB really doesn't depend on XILLYBUS (following comment by Randy Dunlap)

- Use SEEK_* predefined constants instead of numbers

 drivers/char/xillybus/Kconfig    |   13 +
 drivers/char/xillybus/Makefile   |    1 +
 drivers/char/xillybus/xillyusb.c | 2363 ++++++++++++++++++++++++++++++
 3 files changed, 2377 insertions(+)
 create mode 100644 drivers/char/xillybus/xillyusb.c
drivers/char/xillybus/Kconfig +13 -0
index 130dbdce858f..2b5192fd22b9 100644
@@ -32,3 +32,16 @@ config XILLYBUS_OF
 	  system, say M.
 
 endif # if XILLYBUS
+
+# XILLYUSB doesn't depend on XILLYBUS
+
+config XILLYUSB
+	tristate "XillyUSB: Xillybus generic FPGA interface for USB"
+	depends on USB
+	select CRC32
+	help
+	  XillyUSB is the Xillybus variant which uses USB for communicating
+	  with the FPGA.
+
+	  Set to M if you want Xillybus to use USB for communicating with
+	  the FPGA.
drivers/char/xillybus/Makefile +1 -0
index 099e9a3585fc..57471fb61a12 100644
@@ -6,3 +6,4 @@
 obj-$(CONFIG_XILLYBUS)		+= xillybus_core.o
 obj-$(CONFIG_XILLYBUS_PCIE)	+= xillybus_pcie.o
 obj-$(CONFIG_XILLYBUS_OF)	+= xillybus_of.o
+obj-$(CONFIG_XILLYUSB)		+= xillyusb.o
drivers/char/xillybus/xillyusb.c new file +2363 -0

2,363 lines not on this page · raw message

Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 12 lines · On Mon, Feb 01, 2021 at 05:56:19PM +0200, [email protected] wrote:

From: Eli Billauer <[email protected]>

The XillyUSB driver is the USB variant for the Xillybus FPGA IP core. Even though it presents a nearly identical API on the FPGA and host, it's almost a complete rewrite of the driver: The framework for exchanging data on a USB bus is fundamentally different from doing the same with a PCIe interface, which leaves very little in common between the existing driver and the new one for XillyUSB.

---

Quoted 8 lines

Notes:
Changelog:

v2:
- Add comment in Kconfig file, saying XILLYUSB really doesn't depend on XILLYBUS (following comment by Randy Dunlap)

- Use SEEK_* predefined constants instead of numbers

As brought up on the other list, this should either:
- use the same device nodes as the existing xillybus drivers do, as you have the same api
- just do it all in userspace using libusb.

thanks,

greg k-h