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
linux 2.6.16.38 w/ vs2.0.3-rc1
[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
fff027d
..
bb028c5
100644
(file)
--- a/
drivers/usb/gadget/pxa2xx_udc.c
+++ b/
drivers/usb/gadget/pxa2xx_udc.c
@@
-27,6
+27,7
@@
#undef DEBUG
// #define VERBOSE DBG_VERBOSE
#undef DEBUG
// #define VERBOSE DBG_VERBOSE
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ioport.h>
@@
-52,9
+53,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>
-#ifdef CONFIG_ARCH_PXA
#include <asm/arch/pxa-regs.h>
#include <asm/arch/pxa-regs.h>
-#endif
#include <linux/usb_ch9.h>
#include <linux/usb_gadget.h>
#include <linux/usb_ch9.h>
#include <linux/usb_gadget.h>
@@
-336,10
+335,11
@@
pxa2xx_ep_alloc_request (struct usb_ep *_ep, gfp_t gfp_flags)
{
struct pxa2xx_request *req;
{
struct pxa2xx_request *req;
- req = k
zalloc(sizeof(*req)
, gfp_flags);
+ req = k
malloc (sizeof *req
, gfp_flags);
if (!req)
return NULL;
if (!req)
return NULL;
+ memset (req, 0, sizeof *req);
INIT_LIST_HEAD (&req->queue);
return &req->req;
}
INIT_LIST_HEAD (&req->queue);
return &req->req;
}
@@
-546,7
+546,6
@@
write_ep0_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req)
count = req->req.length;
done (ep, req, 0);
ep0_idle(ep->dev);
count = req->req.length;
done (ep, req, 0);
ep0_idle(ep->dev);
-#ifndef CONFIG_ARCH_IXP4XX
#if 1
/* This seems to get rid of lost status irqs in some cases:
* host responds quickly, or next request involves config
#if 1
/* This seems to get rid of lost status irqs in some cases:
* host responds quickly, or next request involves config
@@
-566,7
+565,6
@@
write_ep0_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req)
udelay(1);
} while (count);
}
udelay(1);
} while (count);
}
-#endif
#endif
} else if (ep->dev->req_pending)
ep0start(ep->dev, 0, "IN");
#endif
} else if (ep->dev->req_pending)
ep0start(ep->dev, 0, "IN");
@@
-1588,7
+1586,7
@@
int usb_gadget_register_driver(struct usb_gadget_driver *driver)
int retval;
if (!driver
int retval;
if (!driver
- || driver->speed
<
USB_SPEED_FULL
+ || driver->speed
!=
USB_SPEED_FULL
|| !driver->bind
|| !driver->unbind
|| !driver->disconnect
|| !driver->bind
|| !driver->unbind
|| !driver->disconnect
@@
-2430,7
+2428,6
@@
static struct pxa2xx_udc memory = {
#define PXA210_B1 0x00000123
#define PXA210_B0 0x00000122
#define IXP425_A0 0x000001c1
#define PXA210_B1 0x00000123
#define PXA210_B0 0x00000122
#define IXP425_A0 0x000001c1
-#define IXP465_AD 0x00000200
/*
* probe - binds to the platform device
/*
* probe - binds to the platform device
@@
-2467,8
+2464,6
@@
static int __init pxa2xx_udc_probe(struct platform_device *pdev)
break;
#elif defined(CONFIG_ARCH_IXP4XX)
case IXP425_A0:
break;
#elif defined(CONFIG_ARCH_IXP4XX)
case IXP425_A0:
- case IXP465_AD:
- dev->has_cfr = 1;
out_dma = 0;
break;
#endif
out_dma = 0;
break;
#endif
@@
-2521,7
+2516,7
@@
static int __init pxa2xx_udc_probe(struct platform_device *pdev)
/* irq setup after old hardware state is cleaned up */
retval = request_irq(IRQ_USB, pxa2xx_udc_irq,
/* irq setup after old hardware state is cleaned up */
retval = request_irq(IRQ_USB, pxa2xx_udc_irq,
-
IRQF_DISABLED
, driver_name, dev);
+
SA_INTERRUPT
, driver_name, dev);
if (retval != 0) {
printk(KERN_ERR "%s: can't get irq %i, err %d\n",
driver_name, IRQ_USB, retval);
if (retval != 0) {
printk(KERN_ERR "%s: can't get irq %i, err %d\n",
driver_name, IRQ_USB, retval);
@@
-2533,7
+2528,7
@@
static int __init pxa2xx_udc_probe(struct platform_device *pdev)
if (machine_is_lubbock()) {
retval = request_irq(LUBBOCK_USB_DISC_IRQ,
lubbock_vbus_irq,
if (machine_is_lubbock()) {
retval = request_irq(LUBBOCK_USB_DISC_IRQ,
lubbock_vbus_irq,
-
IRQF_DISABLED | IRQF
_SAMPLE_RANDOM,
+
SA_INTERRUPT | SA
_SAMPLE_RANDOM,
driver_name, dev);
if (retval != 0) {
printk(KERN_ERR "%s: can't get irq %i, err %d\n",
driver_name, dev);
if (retval != 0) {
printk(KERN_ERR "%s: can't get irq %i, err %d\n",
@@
-2544,7
+2539,7
@@
lubbock_fail0:
}
retval = request_irq(LUBBOCK_USB_IRQ,
lubbock_vbus_irq,
}
retval = request_irq(LUBBOCK_USB_IRQ,
lubbock_vbus_irq,
-
IRQF_DISABLED | IRQF
_SAMPLE_RANDOM,
+
SA_INTERRUPT | SA
_SAMPLE_RANDOM,
driver_name, dev);
if (retval != 0) {
printk(KERN_ERR "%s: can't get irq %i, err %d\n",
driver_name, dev);
if (retval != 0) {
printk(KERN_ERR "%s: can't get irq %i, err %d\n",
@@
-2581,12
+2576,10
@@
static int __exit pxa2xx_udc_remove(struct platform_device *pdev)
free_irq(IRQ_USB, dev);
dev->got_irq = 0;
}
free_irq(IRQ_USB, dev);
dev->got_irq = 0;
}
-#ifdef CONFIG_ARCH_LUBBOCK
if (machine_is_lubbock()) {
free_irq(LUBBOCK_USB_DISC_IRQ, dev);
free_irq(LUBBOCK_USB_IRQ, dev);
}
if (machine_is_lubbock()) {
free_irq(LUBBOCK_USB_DISC_IRQ, dev);
free_irq(LUBBOCK_USB_IRQ, dev);
}
-#endif
platform_set_drvdata(pdev, NULL);
the_controller = NULL;
return 0;
platform_set_drvdata(pdev, NULL);
the_controller = NULL;
return 0;