1 Index: linux-2.6.21.7/drivers/usb/gadget/Kconfig
2 ===================================================================
3 --- linux-2.6.21.7.orig/drivers/usb/gadget/Kconfig
4 +++ linux-2.6.21.7/drivers/usb/gadget/Kconfig
5 @@ -56,6 +56,14 @@ config USB_GADGET_DEBUG_FILES
6 config USB_GADGET_SELECTED
9 +config USB_GADGET_GUMSTIX
11 + default m if USB_GADGET=m
12 + default y if USB_GADGET=y
13 + depends on USB_GADGET && ARCH_GUMSTIX
15 + USB Gadget support for the Gumstix platform
18 # USB Peripheral Controller Support
20 Index: linux-2.6.21.7/drivers/usb/gadget/Makefile
21 ===================================================================
22 --- linux-2.6.21.7.orig/drivers/usb/gadget/Makefile
23 +++ linux-2.6.21.7/drivers/usb/gadget/Makefile
24 @@ -8,6 +8,7 @@ obj-$(CONFIG_USB_GOKU) += goku_udc.o
25 obj-$(CONFIG_USB_OMAP) += omap_udc.o
26 obj-$(CONFIG_USB_LH7A40X) += lh7a40x_udc.o
27 obj-$(CONFIG_USB_AT91) += at91_udc.o
28 +obj-$(CONFIG_USB_GADGET_GUMSTIX) += gumstix_gadget.o
32 Index: linux-2.6.21.7/drivers/usb/gadget/pxa2xx_udc.c
33 ===================================================================
34 --- linux-2.6.21.7.orig/drivers/usb/gadget/pxa2xx_udc.c
35 +++ linux-2.6.21.7/drivers/usb/gadget/pxa2xx_udc.c
36 @@ -2752,8 +2752,16 @@ static struct platform_driver udc_driver
40 +#ifdef CONFIG_ARCH_GUMSTIX
41 +extern void gumstix_usb_gadget_load(void);
44 static int __init udc_init(void)
46 +#ifdef CONFIG_ARCH_GUMSTIX
47 + gumstix_usb_gadget_load();
50 printk(KERN_INFO "%s: version %s\n", driver_name, DRIVER_VERSION);
51 return platform_driver_register(&udc_driver);
53 Index: linux-2.6.21.7/drivers/usb/gadget/gumstix_gadget.c
54 ===================================================================
56 +++ linux-2.6.21.7/drivers/usb/gadget/gumstix_gadget.c
59 + * Gumstix USB gadget intialization driver
61 + * Author: Craig Hughes
62 + * Created: December 9, 2004
63 + * Copyright: (C) 2004 Craig Hughes
65 + * This program is free software; you can redistribute it and/or modify
66 + * it under the terms of the GNU General Public License as published by
67 + * the Free Software Foundation; either version 2 of the License, or
68 + * (at your option) any later version.
72 +#include <linux/module.h>
74 +#include <asm/hardware.h>
75 +#include <asm/arch/pxa-regs.h>
76 +#include <asm/delay.h>
78 +#include <asm/mach/irq.h>
80 +#include <asm/arch/gumstix.h>
81 +#include <asm/arch/udc.h>
83 +int __init gumstix_usb_gadget_init(void)
85 + pxa_gpio_mode(GPIO_GUMSTIX_USB_GPIOx_DIS_MD);
86 + pxa_gpio_mode(GPIO_GUMSTIX_USB_GPIOn_MD);
88 + set_irq_type(GUMSTIX_USB_INTR_IRQ, IRQT_BOTHEDGE);
93 +void __exit gumstix_usb_gadget_exit(void)
97 +void gumstix_usb_gadget_load(void) {}
98 +EXPORT_SYMBOL(gumstix_usb_gadget_load);
100 +module_init(gumstix_usb_gadget_init);
101 +module_exit(gumstix_usb_gadget_exit);
103 +MODULE_LICENSE("GPL");
104 +MODULE_AUTHOR("Craig Hughes <craig@gumstix.com>");
105 +MODULE_DESCRIPTION("Gumstix board USB gadget initialization driver");
106 +MODULE_VERSION("1:0.1");