git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
drivers
/
usb
/
gadget
/
pxa2xx_udc.c
diff --git
a/drivers/usb/gadget/pxa2xx_udc.c
b/drivers/usb/gadget/pxa2xx_udc.c
index
4ad4d2f
..
710f7a4
100644
(file)
--- a/
drivers/usb/gadget/pxa2xx_udc.c
+++ b/
drivers/usb/gadget/pxa2xx_udc.c
@@
-54,6
+54,7
@@
#include <asm/mach-types.h>
#include <asm/unaligned.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/unaligned.h>
#include <asm/hardware.h>
+#include <asm/arch/pxa-regs.h>
#include <linux/usb_ch9.h>
#include <linux/usb_gadget.h>
#include <linux/usb_ch9.h>
#include <linux/usb_gadget.h>
@@
-91,10
+92,6
@@
static const char ep0name [] = "ep0";
// #define USE_OUT_DMA
// #define DISABLE_TEST_MODE
// #define USE_OUT_DMA
// #define DISABLE_TEST_MODE
-#ifdef CONFIG_PROC_FS
-#define UDC_PROC_FILE
-#endif
-
#ifdef CONFIG_ARCH_IXP4XX
#undef USE_DMA
#ifdef CONFIG_ARCH_IXP4XX
#undef USE_DMA
@@
-108,15
+105,9
@@
static const char ep0name [] = "ep0";
#include "pxa2xx_udc.h"
#include "pxa2xx_udc.h"
-#ifdef CONFIG_EMBEDDED
-/* few strings, and little code to use them */
-#undef DEBUG
-#undef UDC_PROC_FILE
-#endif
-
#ifdef USE_DMA
static int use_dma = 1;
#ifdef USE_DMA
static int use_dma = 1;
-
MODULE_PARM (use_dma, "i"
);
+
module_param(use_dma, bool, 0
);
MODULE_PARM_DESC (use_dma, "true to use dma");
static void dma_nodesc_handler (int dmach, void *_ep, struct pt_regs *r);
MODULE_PARM_DESC (use_dma, "true to use dma");
static void dma_nodesc_handler (int dmach, void *_ep, struct pt_regs *r);
@@
-146,7
+137,7
@@
static void kick_dma(struct pxa2xx_ep *ep, struct pxa2xx_request *req);
* ... so mode = 3 (or 7, 15, etc) does it for both
*/
static ushort fifo_mode = 0;
* ... so mode = 3 (or 7, 15, etc) does it for both
*/
static ushort fifo_mode = 0;
-
MODULE_PARM (fifo_mode, "h"
);
+
module_param(fifo_mode, ushort, 0
);
MODULE_PARM_DESC (fifo_mode, "pxa2xx udc fifo mode");
#endif
MODULE_PARM_DESC (fifo_mode, "pxa2xx udc fifo mode");
#endif
@@
-1211,7
+1202,7
@@
static const struct usb_gadget_ops pxa2xx_udc_ops = {
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
-#ifdef
UDC_PROC_FILE
+#ifdef
CONFIG_USB_GADGET_DEBUG_FILES
static const char proc_node_name [] = "driver/udc";
static const char proc_node_name [] = "driver/udc";
@@
-1367,11
+1358,12
@@
done:
#define remove_proc_files() \
remove_proc_entry(proc_node_name, NULL)
#define remove_proc_files() \
remove_proc_entry(proc_node_name, NULL)
-#else /* !UDC_PROC_FILE */
+#else /* !CONFIG_USB_GADGET_DEBUG_FILES */
+
#define create_proc_files() do {} while (0)
#define remove_proc_files() do {} while (0)
#define create_proc_files() do {} while (0)
#define remove_proc_files() do {} while (0)
-#endif /*
UDC_PROC_FILE
*/
+#endif /*
CONFIG_USB_GADGET_DEBUG_FILES
*/
/* "function" sysfs attribute */
static ssize_t
/* "function" sysfs attribute */
static ssize_t
@@
-1406,7
+1398,7
@@
static void udc_disable(struct pxa2xx_udc *dev)
#ifdef CONFIG_ARCH_PXA
/* Disable clock for USB device */
#ifdef CONFIG_ARCH_PXA
/* Disable clock for USB device */
-
CKEN &= ~CKEN11_USB
;
+
pxa_set_cken(CKEN11_USB, 0)
;
#endif
ep0_idle (dev);
#endif
ep0_idle (dev);
@@
-1452,7
+1444,7
@@
static void udc_enable (struct pxa2xx_udc *dev)
#ifdef CONFIG_ARCH_PXA
/* Enable clock for USB device */
#ifdef CONFIG_ARCH_PXA
/* Enable clock for USB device */
-
CKEN |= CKEN11_USB
;
+
pxa_set_cken(CKEN11_USB, 1)
;
#endif
/* try to clear these bits before we enable the udc */
#endif
/* try to clear these bits before we enable the udc */
@@
-1508,7
+1500,7
@@
static void udc_enable (struct pxa2xx_udc *dev)
/* caller must be able to sleep in order to cope
* with startup transients.
*/
/* caller must be able to sleep in order to cope
* with startup transients.
*/
-
schedule_timeout(HZ/1
0);
+
msleep(10
0);
/* enable suspend/resume and reset irqs */
udc_clear_mask_UDCCR(UDCCR_SRM | UDCCR_REM);
/* enable suspend/resume and reset irqs */
udc_clear_mask_UDCCR(UDCCR_SRM | UDCCR_REM);
@@
-2539,7
+2531,7
@@
static int __exit pxa2xx_udc_remove(struct device *_dev)
/*-------------------------------------------------------------------------*/
static struct device_driver udc_driver = {
/*-------------------------------------------------------------------------*/
static struct device_driver udc_driver = {
- .name =
(char *) driver_name
,
+ .name =
"pxa2xx-udc"
,
.bus = &platform_bus_type,
.probe = pxa2xx_udc_probe,
.remove = __exit_p(pxa2xx_udc_remove),
.bus = &platform_bus_type,
.probe = pxa2xx_udc_probe,
.remove = __exit_p(pxa2xx_udc_remove),