Commit ceb80363 authored by Seth Levy's avatar Seth Levy Committed by Greg Kroah-Hartman

USB: net2272: driver for PLX NET2272 USB device controller

This is based on the last release from PLX:
	http://www.plxtech.com/files/products/net2000/software/selectiontool/RE061204-net2272-linux2.6.18.tgz

I've managed to contact them and they've confirmed that this driver was
wholly written by PLX (Seth Levy).  While they have no problem with it
being merged (and they've already licensed it as GPL), they don't have
any interest in doing so themselves as this is an old part for them.

ADI has long had an add-on card which has this part on it, so we've been
keeping it up-to-date out of tree.  But now that PLX has confirmed the
source of the driver, we can can take the next step of cleaning it up and
getting it merged.

So here we are!  I've done quite a large clean up of the driver and
attempted to address all the common issues.  Hopefully in the process,
I haven't broken anything.  While it seems to still work with the board
that I have access to, it is not a PCI variant.  So I have not tested
any of the PCI logic myself (beyond clean compile).  Perhaps someone who
actually has a card and cares can do so.

I'll try to address further feedback, but don't expect miracles.  I'm
not really familiar with the part itself, just the platform glue.
Signed-off-by: default avatarSeth Levy <seth.levy@plxtech.com>
Signed-off-by: default avatarAsh Aziz <ash.aziz@plxtech.com>
Signed-off-by: default avatarRoy Huang <roy.huang@analog.com>
Signed-off-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c4fc2342
...@@ -480,6 +480,35 @@ config USB_CI13XXX_PCI ...@@ -480,6 +480,35 @@ config USB_CI13XXX_PCI
default USB_GADGET default USB_GADGET
select USB_GADGET_SELECTED select USB_GADGET_SELECTED
config USB_GADGET_NET2272
boolean "PLX NET2272"
select USB_GADGET_DUALSPEED
help
PLX NET2272 is a USB peripheral controller which supports
both full and high speed USB 2.0 data transfers.
It has three configurable endpoints, as well as endpoint zero
(for control transfer).
Say "y" to link the driver statically, or "m" to build a
dynamically linked module called "net2272" and force all
gadget drivers to also be dynamically linked.
config USB_GADGET_NET2272_DMA
boolean "Support external DMA controller"
depends on USB_GADGET_NET2272
help
The NET2272 part can optionally support an external DMA
controller, but your board has to have support in the
driver itself.
If unsure, say "N" here. The driver works fine in PIO mode.
config USB_NET2272
tristate
depends on USB_GADGET_NET2272
default USB_GADGET
select USB_GADGET_SELECTED
config USB_GADGET_NET2280 config USB_GADGET_NET2280
boolean "NetChip 228x" boolean "NetChip 228x"
depends on PCI depends on PCI
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
ccflags-$(CONFIG_USB_GADGET_DEBUG) := -DDEBUG ccflags-$(CONFIG_USB_GADGET_DEBUG) := -DDEBUG
obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o
obj-$(CONFIG_USB_NET2272) += net2272.o
obj-$(CONFIG_USB_NET2280) += net2280.o obj-$(CONFIG_USB_NET2280) += net2280.o
obj-$(CONFIG_USB_AMD5536UDC) += amd5536udc.o obj-$(CONFIG_USB_AMD5536UDC) += amd5536udc.o
obj-$(CONFIG_USB_PXA25X) += pxa25x_udc.o obj-$(CONFIG_USB_PXA25X) += pxa25x_udc.o
......
...@@ -15,6 +15,12 @@ ...@@ -15,6 +15,12 @@
#ifndef __GADGET_CHIPS_H #ifndef __GADGET_CHIPS_H
#define __GADGET_CHIPS_H #define __GADGET_CHIPS_H
#ifdef CONFIG_USB_GADGET_NET2272
#define gadget_is_net2272(g) !strcmp("net2272", (g)->name)
#else
#define gadget_is_net2272(g) 0
#endif
#ifdef CONFIG_USB_GADGET_NET2280 #ifdef CONFIG_USB_GADGET_NET2280
#define gadget_is_net2280(g) !strcmp("net2280", (g)->name) #define gadget_is_net2280(g) !strcmp("net2280", (g)->name)
#else #else
...@@ -223,6 +229,8 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget) ...@@ -223,6 +229,8 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
return 0x29; return 0x29;
else if (gadget_is_s3c_hsudc(gadget)) else if (gadget_is_s3c_hsudc(gadget))
return 0x30; return 0x30;
else if (gadget_is_net2272(gadget))
return 0x31;
return -ENOENT; return -ENOENT;
} }
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment