As used in various boards including the iPaq h1940; please merge.

- Dave
This patch makes gadget drivers recognize the UDC controller in
the Samsung s3c2310 (ARMv4T).  This is used in the iPaq H1940,
partially supported by Linux, as well as various other devices.
A controller driver is available, though it's not yet submitted.

Signed-off-by: David Brownell <[EMAIL PROTECTED]>

--- 1.77/drivers/usb/gadget/ether.c	2005-02-09 21:06:01 -08:00
+++ edited/drivers/usb/gadget/ether.c	2005-02-10 07:40:57 -08:00
@@ -266,6 +266,9 @@
 #define	DEV_CONFIG_SUBSET
 #endif
 
+#ifdef CONFIG_USB_GADGET_S3C2410
+#define DEV_CONFIG_CDC
+#endif
 
 /*-------------------------------------------------------------------------*/
 
@@ -2300,6 +2303,8 @@
 		device_desc.bcdDevice = __constant_cpu_to_le16 (0x0210);
 	} else if (gadget_is_pxa27x(gadget)) {
 		device_desc.bcdDevice = __constant_cpu_to_le16 (0x0211);
+ 	} else if (gadget_is_s3c2410(gadget)) {
+ 		device_desc.bcdDevice = __constant_cpu_to_le16 (0x0212);
 	} else {
 		/* can't assume CDC works.  don't want to default to
 		 * anything less functional on CDC-capable hardware,
--- 1.11/drivers/usb/gadget/gadget_chips.h	2004-12-04 11:53:40 -08:00
+++ edited/drivers/usb/gadget/gadget_chips.h	2005-02-10 07:40:57 -08:00
@@ -74,6 +74,12 @@
 #define	gadget_is_pxa27x(g)	0
 #endif
 
+#ifdef CONFIG_USB_GADGET_S3C2410
+#define gadget_is_s3c2410(g)    !strcmp("s3c2410_udc", (g)->name)
+#else
+#define gadget_is_s3c2410(g)    0
+#endif
+
 // CONFIG_USB_GADGET_AT91RM9200
 // CONFIG_USB_GADGET_SX2
 // CONFIG_USB_GADGET_AU1X00
--- 1.22/drivers/usb/gadget/serial.c	2005-01-06 18:02:20 -08:00
+++ edited/drivers/usb/gadget/serial.c	2005-02-10 07:40:57 -08:00
@@ -1532,6 +1532,9 @@
 	} else if (gadget_is_pxa27x(gadget)) {
 		gs_device_desc.bcdDevice =
 			__constant_cpu_to_le16(GS_VERSION_NUM|0x0011);
+	} else if (gadget_is_s3c2410(gadget)) {
+		gs_device_desc.bcdDevice =
+			__constant_cpu_to_le16(GS_VERSION_NUM|0x0012);
 	} else {
 		printk(KERN_WARNING "gs_bind: controller '%s' not recognized\n",
 			gadget->name);
--- 1.47/drivers/usb/gadget/zero.c	2005-01-31 12:51:39 -08:00
+++ edited/drivers/usb/gadget/zero.c	2005-02-10 07:40:57 -08:00
@@ -1191,6 +1191,8 @@
 		device_desc.bcdDevice = __constant_cpu_to_le16 (0x0210);
 	} else if (gadget_is_pxa27x(gadget)) {
 		device_desc.bcdDevice = __constant_cpu_to_le16 (0x0211);
+	} else if (gadget_is_s3c2410(gadget)) {
+		device_desc.bcdDevice = __constant_cpu_to_le16 (0x0212);
 	} else {
 		/* gadget zero is so simple (for now, no altsettings) that
 		 * it SHOULD NOT have problems with bulk-capable hardware.

Reply via email to