Commit de0bee2f authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: fix gadget config

  - Fix kconfig botch (bk automerge can be rather flakey)
  - The gadgetfs patches going with the kconfig cleanups
parent 959ab1dc
......@@ -124,33 +124,6 @@ config USB_SA1100
depends on USB_GADGET_SA1100
default USB_GADGET
config USB_GADGET_DUMMY_HCD
boolean "Dummy HCD (DEVELOPMENT)"
depends on USB
help
This host controller driver emulates USB, looping all data transfer
requests back to a USB "gadget driver" in the same host. The host
side is the master; the gadget side is the slave. Gadget drivers
can be high, full, or low speed; and they have access to endpoints
like those from NET2280, PXA2xx, or SA1100 hardware.
This may help in some stages of creating a driver to embed in a
Linux device, since it lets you debug several parts of the gadget
driver without its hardware or drivers being involved.
Since such a gadget side driver needs to interoperate with a host
side Linux-USB device driver, this may help to debug both sides
of a USB protocol stack.
Say "y" to link the driver statically, or "m" to build a
dynamically linked module called "dummy_hcd" and force all
gadget drivers to also be dynamically linked.
config USB_DUMMY_HCD
tristate
depends on USB_GADGET_DUMMY_HCD
default USB_GADGET
endchoice
......@@ -268,27 +241,6 @@ config USB_G_SERIAL
# - none yet
config USB_G_SERIAL
tristate "serial Gadget"
depends on USB_GADGET && (USB_DUMMY_HCD || USB_NET2280 || USB_PXA2XX || USB_SA1100)
config USB_G_SERIAL_NET2280
bool
# for now, treat the "dummy" hcd as if it were a net2280
depends on USB_G_SERIAL && (USB_NET2280 || USB_DUMMY_HCD)
default y
config USB_G_SERIAL_PXA2XX
bool
depends on USB_G_SERIAL && USB_PXA2XX
default y
config USB_G_SERIAL_SA1100
bool
depends on USB_G_SERIAL && USB_SA1100
default y
endchoice
endmenu
......@@ -232,18 +232,27 @@ static void put_ep (struct ep_data *data)
* the usb controller exposes.
*/
#ifdef CONFIG_USB_GADGETFS_NET2280
#ifdef CONFIG_USB_GADGET_DUMMY_HCD
/* act (mostly) like a net2280 */
#define CONFIG_USB_GADGET_NET2280
#endif
#ifdef CONFIG_USB_GADGET_NET2280
#define CHIP "net2280"
#define HIGHSPEED
#endif
#ifdef CONFIG_USB_GADGETFS_PXA2XX
#ifdef CONFIG_USB_GADGET_PXA2XX
#define CHIP "pxa2xx_udc"
/* earlier hardware doesn't have UDCCFR, races set_{config,interface} */
#warning works best with pxa255 or newer
#endif
#ifdef CONFIG_USB_GADGETFS_SA1100
#ifdef CONFIG_USB_GADGET_GOKU
#define CHIP "goku_udc"
#endif
#ifdef CONFIG_USB_GADGET_SA1100
#define CHIP "sa1100"
#endif
......@@ -397,7 +406,7 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len)
/* handle a synchronous OUT bulk/intr/iso transfer */
static ssize_t
ep_read (struct file *fd, char *buf, size_t len, loff_t *ptr)
ep_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr)
{
struct ep_data *data = fd->private_data;
void *kbuf;
......@@ -441,7 +450,7 @@ ep_read (struct file *fd, char *buf, size_t len, loff_t *ptr)
/* handle a synchronous IN bulk/intr/iso transfer */
static ssize_t
ep_write (struct file *fd, const char *buf, size_t len, loff_t *ptr)
ep_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
{
struct ep_data *data = fd->private_data;
void *kbuf;
......
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