This just adds recognition for the Atmel AT91 USB peripheral controller. (And a missing check for the Samsung S3C2410.) This PIO-only hardware is used in a variety of chips, including the at91rm9200. (That one has an MMU and runs "regular Linux".)
Please merge; the patch is against your current BK. - Dave p.s. In case anyone's curious: this is at least the sixth different ARM based System-On-Chip processor that works in this API framework. If many folk were working with the SA-1100 any more, there'd be seven ... ;)
Add declarations to recognize the AT91 USB peripheral controller, as used in various ARMv4T chips including the mmu-ful at91rm9200. Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- 1.43/drivers/usb/gadget/ether.c 2005-02-10 07:40:57 -08:00 +++ edited/drivers/usb/gadget/ether.c 2005-02-28 18:21:59 -08:00 @@ -243,6 +243,10 @@ #define DEV_CONFIG_CDC #endif +#ifdef CONFIG_USB_GADGET_AT91 +#define DEV_CONFIG_CDC +#endif + /* For CDC-incapable hardware, choose the simple cdc subset. * Anything that talks bulk (without notable bugs) can do this. @@ -2251,6 +2255,8 @@ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0211); } else if (gadget_is_s3c2410(gadget)) { device_desc.bcdDevice = __constant_cpu_to_le16 (0x0212); + } else if (gadget_is_at91(gadget)) { + device_desc.bcdDevice = __constant_cpu_to_le16 (0x0213); } else { /* can't assume CDC works. don't want to default to * anything less functional on CDC-capable hardware, --- 1.26/drivers/usb/gadget/file_storage.c 2005-01-25 13:50:18 -08:00 +++ edited/drivers/usb/gadget/file_storage.c 2005-02-28 18:21:59 -08:00 @@ -3740,6 +3740,10 @@ mod_data.release = 0x0310; else if (gadget_is_pxa27x(fsg->gadget)) mod_data.release = 0x0311; + else if (gadget_is_s3c2410(gadget)) + mod_data.release = 0x0312; + else if (gadget_is_at91(fsg->gadget)) + mod_data.release = 0x0313; else { WARN(fsg, "controller '%s' not recognized\n", fsg->gadget->name); --- 1.7/drivers/usb/gadget/gadget_chips.h 2005-02-10 07:40:57 -08:00 +++ edited/drivers/usb/gadget/gadget_chips.h 2005-02-28 18:21:59 -08:00 @@ -80,7 +80,12 @@ #define gadget_is_s3c2410(g) 0 #endif -// CONFIG_USB_GADGET_AT91RM9200 +#ifdef CONFIG_USB_GADGET_AT91 +#define gadget_is_at91(g) !strcmp("at91_udc", (g)->name) +#else +#define gadget_is_at91(g) 0 +#endif + // CONFIG_USB_GADGET_SX2 // CONFIG_USB_GADGET_AU1X00 // ... --- 1.18/drivers/usb/gadget/serial.c 2005-02-10 07:40:57 -08:00 +++ edited/drivers/usb/gadget/serial.c 2005-02-28 18:21:59 -08:00 @@ -1461,6 +1461,9 @@ } else if (gadget_is_s3c2410(gadget)) { gs_device_desc.bcdDevice = __constant_cpu_to_le16(GS_VERSION_NUM|0x0012); + } else if (gadget_is_at91(gadget)) { + gs_device_desc.bcdDevice = + __constant_cpu_to_le16(GS_VERSION_NUM|0x0013); } else { printk(KERN_WARNING "gs_bind: controller '%s' not recognized\n", gadget->name); --- 1.23/drivers/usb/gadget/zero.c 2005-02-10 07:40:57 -08:00 +++ edited/drivers/usb/gadget/zero.c 2005-02-28 18:21:59 -08:00 @@ -1193,6 +1193,8 @@ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0211); } else if (gadget_is_s3c2410(gadget)) { device_desc.bcdDevice = __constant_cpu_to_le16 (0x0212); + } else if (gadget_is_at91(gadget)) { + device_desc.bcdDevice = __constant_cpu_to_le16 (0x0213); } else { /* gadget zero is so simple (for now, no altsettings) that * it SHOULD NOT have problems with bulk-capable hardware.