1 --- a/drivers/usb/gadget/Kconfig
2 +++ b/drivers/usb/gadget/Kconfig
3 @@ -56,6 +56,14 @@ config USB_GADGET_DEBUG_FILES
4 config USB_GADGET_SELECTED
7 +config USB_GADGET_GUMSTIX
9 + default m if USB_GADGET=m
10 + default y if USB_GADGET=y
11 + depends on USB_GADGET && ARCH_GUMSTIX
13 + USB Gadget support for the Gumstix platform
16 # USB Peripheral Controller Support
18 --- a/drivers/usb/gadget/Makefile
19 +++ b/drivers/usb/gadget/Makefile
20 @@ -8,6 +8,7 @@ obj-$(CONFIG_USB_GOKU) += goku_udc.o
21 obj-$(CONFIG_USB_OMAP) += omap_udc.o
22 obj-$(CONFIG_USB_LH7A40X) += lh7a40x_udc.o
23 obj-$(CONFIG_USB_AT91) += at91_udc.o
24 +obj-$(CONFIG_USB_GADGET_GUMSTIX) += gumstix_gadget.o
28 --- a/drivers/usb/gadget/pxa2xx_udc.c
29 +++ b/drivers/usb/gadget/pxa2xx_udc.c
30 @@ -2752,8 +2752,16 @@ static struct platform_driver udc_driver
34 +#ifdef CONFIG_ARCH_GUMSTIX
35 +extern void gumstix_usb_gadget_load(void);
38 static int __init udc_init(void)
40 +#ifdef CONFIG_ARCH_GUMSTIX
41 + gumstix_usb_gadget_load();
44 printk(KERN_INFO "%s: version %s\n", driver_name, DRIVER_VERSION);
45 return platform_driver_register(&udc_driver);
48 +++ b/drivers/usb/gadget/gumstix_gadget.c
51 + * Gumstix USB gadget intialization driver
53 + * Author: Craig Hughes
54 + * Created: December 9, 2004
55 + * Copyright: (C) 2004 Craig Hughes
57 + * This program is free software; you can redistribute it and/or modify
58 + * it under the terms of the GNU General Public License as published by
59 + * the Free Software Foundation; either version 2 of the License, or
60 + * (at your option) any later version.
64 +#include <linux/module.h>
66 +#include <asm/hardware.h>
67 +#include <asm/arch/pxa-regs.h>
68 +#include <asm/delay.h>
70 +#include <asm/mach/irq.h>
72 +#include <asm/arch/gumstix.h>
73 +#include <asm/arch/udc.h>
75 +int __init gumstix_usb_gadget_init(void)
77 + pxa_gpio_mode(GPIO_GUMSTIX_USB_GPIOx_DIS_MD);
78 + pxa_gpio_mode(GPIO_GUMSTIX_USB_GPIOn_MD);
80 + set_irq_type(GUMSTIX_USB_INTR_IRQ, IRQT_BOTHEDGE);
85 +void __exit gumstix_usb_gadget_exit(void)
89 +void gumstix_usb_gadget_load(void) {}
90 +EXPORT_SYMBOL(gumstix_usb_gadget_load);
92 +module_init(gumstix_usb_gadget_init);
93 +module_exit(gumstix_usb_gadget_exit);
95 +MODULE_LICENSE("GPL");
96 +MODULE_AUTHOR("Craig Hughes <craig@gumstix.com>");
97 +MODULE_DESCRIPTION("Gumstix board USB gadget initialization driver");
98 +MODULE_VERSION("1:0.1");