diff options
Diffstat (limited to 'drivers/usb/gadget/pxa27x_udc.c')
-rw-r--r-- | drivers/usb/gadget/pxa27x_udc.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 75eba202f737..499b7a23f351 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c | |||
@@ -1546,7 +1546,6 @@ static __init void udc_init_data(struct pxa_udc *dev) | |||
1546 | INIT_LIST_HEAD(&dev->gadget.ep0->ep_list); | 1546 | INIT_LIST_HEAD(&dev->gadget.ep0->ep_list); |
1547 | dev->udc_usb_ep[0].pxa_ep = &dev->pxa_ep[0]; | 1547 | dev->udc_usb_ep[0].pxa_ep = &dev->pxa_ep[0]; |
1548 | ep0_idle(dev); | 1548 | ep0_idle(dev); |
1549 | strcpy(dev->dev->bus_id, ""); | ||
1550 | 1549 | ||
1551 | /* PXA endpoints init */ | 1550 | /* PXA endpoints init */ |
1552 | for (i = 0; i < NR_PXA_ENDPOINTS; i++) { | 1551 | for (i = 0; i < NR_PXA_ENDPOINTS; i++) { |
@@ -1746,13 +1745,10 @@ static void handle_ep0_ctrl_req(struct pxa_udc *udc, | |||
1746 | ep_err(ep, "wrong to have extra bytes for setup : 0x%08x\n", i); | 1745 | ep_err(ep, "wrong to have extra bytes for setup : 0x%08x\n", i); |
1747 | } | 1746 | } |
1748 | 1747 | ||
1749 | le16_to_cpus(&u.r.wValue); | ||
1750 | le16_to_cpus(&u.r.wIndex); | ||
1751 | le16_to_cpus(&u.r.wLength); | ||
1752 | |||
1753 | ep_dbg(ep, "SETUP %02x.%02x v%04x i%04x l%04x\n", | 1748 | ep_dbg(ep, "SETUP %02x.%02x v%04x i%04x l%04x\n", |
1754 | u.r.bRequestType, u.r.bRequest, | 1749 | u.r.bRequestType, u.r.bRequest, |
1755 | u.r.wValue, u.r.wIndex, u.r.wLength); | 1750 | le16_to_cpu(u.r.wValue), le16_to_cpu(u.r.wIndex), |
1751 | le16_to_cpu(u.r.wLength)); | ||
1756 | if (unlikely(have_extrabytes)) | 1752 | if (unlikely(have_extrabytes)) |
1757 | goto stall; | 1753 | goto stall; |
1758 | 1754 | ||
@@ -2296,7 +2292,8 @@ static void pxa_udc_shutdown(struct platform_device *_dev) | |||
2296 | { | 2292 | { |
2297 | struct pxa_udc *udc = platform_get_drvdata(_dev); | 2293 | struct pxa_udc *udc = platform_get_drvdata(_dev); |
2298 | 2294 | ||
2299 | udc_disable(udc); | 2295 | if (udc_readl(udc, UDCCR) & UDCCR_UDE) |
2296 | udc_disable(udc); | ||
2300 | } | 2297 | } |
2301 | 2298 | ||
2302 | #ifdef CONFIG_PM | 2299 | #ifdef CONFIG_PM |
@@ -2361,9 +2358,8 @@ static int pxa_udc_resume(struct platform_device *_dev) | |||
2361 | * Upon exit from sleep mode and before clearing OTGPH, | 2358 | * Upon exit from sleep mode and before clearing OTGPH, |
2362 | * Software must configure the USB OTG pad, UDC, and UHC | 2359 | * Software must configure the USB OTG pad, UDC, and UHC |
2363 | * to the state they were in before entering sleep mode. | 2360 | * to the state they were in before entering sleep mode. |
2364 | * | ||
2365 | * Should be : PSSR |= PSSR_OTGPH; | ||
2366 | */ | 2361 | */ |
2362 | PSSR |= PSSR_OTGPH; | ||
2367 | 2363 | ||
2368 | return 0; | 2364 | return 0; |
2369 | } | 2365 | } |
@@ -2387,6 +2383,9 @@ static struct platform_driver udc_driver = { | |||
2387 | 2383 | ||
2388 | static int __init udc_init(void) | 2384 | static int __init udc_init(void) |
2389 | { | 2385 | { |
2386 | if (!cpu_is_pxa27x()) | ||
2387 | return -ENODEV; | ||
2388 | |||
2390 | printk(KERN_INFO "%s: version %s\n", driver_name, DRIVER_VERSION); | 2389 | printk(KERN_INFO "%s: version %s\n", driver_name, DRIVER_VERSION); |
2391 | return platform_driver_probe(&udc_driver, pxa_udc_probe); | 2390 | return platform_driver_probe(&udc_driver, pxa_udc_probe); |
2392 | } | 2391 | } |