diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 12:00:42 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 12:00:42 -0500 |
commit | 468234984f7bce270484d833899cd8ed4d61e885 (patch) | |
tree | 9b2cf7806baa94aefe243be1b09e1c6aa328f2ff /drivers/usb/musb | |
parent | 6e2477777c8f1d4807437f7de11447319d426f8c (diff) | |
parent | b37457d80bc3e2a6bb86a6036c572574614a7631 (diff) |
Merge tag 'musb-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes:
usb: musb: patches for v3.9 merge window
Mostly fixes all over which weren't urgent enough for
the late -rc cycle.
There is a Double Buffering fix for Host Mode TX,
a dependency fix for the transceiver driver, some
fixes to the error path and a fix for the use of
omap_musb_maibox.
Other than these fixes, there a removal duplicate
headers from the dsps glue layer and removal of
redundant assignments in omap2430_probe().
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/am35x.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/blackfin.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/da8xx.c | 7 | ||||
-rw-r--r-- | drivers/usb/musb/davinci.c | 7 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.c | 1 | ||||
-rw-r--r-- | drivers/usb/musb/musb_dsps.c | 3 | ||||
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 22 | ||||
-rw-r--r-- | drivers/usb/musb/musb_host.c | 44 | ||||
-rw-r--r-- | drivers/usb/musb/omap2430.c | 16 | ||||
-rw-r--r-- | drivers/usb/musb/tusb6010.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/ux500.c | 12 |
11 files changed, 79 insertions, 39 deletions
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c index c107d7cdfa69..59eea219034a 100644 --- a/drivers/usb/musb/am35x.c +++ b/drivers/usb/musb/am35x.c | |||
@@ -365,7 +365,7 @@ static int am35x_musb_init(struct musb *musb) | |||
365 | usb_nop_xceiv_register(); | 365 | usb_nop_xceiv_register(); |
366 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); | 366 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
367 | if (IS_ERR_OR_NULL(musb->xceiv)) | 367 | if (IS_ERR_OR_NULL(musb->xceiv)) |
368 | return -ENODEV; | 368 | return -EPROBE_DEFER; |
369 | 369 | ||
370 | setup_timer(&otg_workaround, otg_timer, (unsigned long) musb); | 370 | setup_timer(&otg_workaround, otg_timer, (unsigned long) musb); |
371 | 371 | ||
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index 14dab9f9b3d0..dbb31b30c7fa 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c | |||
@@ -406,7 +406,7 @@ static int bfin_musb_init(struct musb *musb) | |||
406 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); | 406 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
407 | if (IS_ERR_OR_NULL(musb->xceiv)) { | 407 | if (IS_ERR_OR_NULL(musb->xceiv)) { |
408 | gpio_free(musb->config->gpio_vrsel); | 408 | gpio_free(musb->config->gpio_vrsel); |
409 | return -ENODEV; | 409 | return -EPROBE_DEFER; |
410 | } | 410 | } |
411 | 411 | ||
412 | bfin_musb_reg_init(musb); | 412 | bfin_musb_reg_init(musb); |
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index 97996af2646e..7c71769d71ff 100644 --- a/drivers/usb/musb/da8xx.c +++ b/drivers/usb/musb/da8xx.c | |||
@@ -410,6 +410,7 @@ static int da8xx_musb_init(struct musb *musb) | |||
410 | { | 410 | { |
411 | void __iomem *reg_base = musb->ctrl_base; | 411 | void __iomem *reg_base = musb->ctrl_base; |
412 | u32 rev; | 412 | u32 rev; |
413 | int ret = -ENODEV; | ||
413 | 414 | ||
414 | musb->mregs += DA8XX_MENTOR_CORE_OFFSET; | 415 | musb->mregs += DA8XX_MENTOR_CORE_OFFSET; |
415 | 416 | ||
@@ -420,8 +421,10 @@ static int da8xx_musb_init(struct musb *musb) | |||
420 | 421 | ||
421 | usb_nop_xceiv_register(); | 422 | usb_nop_xceiv_register(); |
422 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); | 423 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
423 | if (IS_ERR_OR_NULL(musb->xceiv)) | 424 | if (IS_ERR_OR_NULL(musb->xceiv)) { |
425 | ret = -EPROBE_DEFER; | ||
424 | goto fail; | 426 | goto fail; |
427 | } | ||
425 | 428 | ||
426 | setup_timer(&otg_workaround, otg_timer, (unsigned long)musb); | 429 | setup_timer(&otg_workaround, otg_timer, (unsigned long)musb); |
427 | 430 | ||
@@ -441,7 +444,7 @@ static int da8xx_musb_init(struct musb *musb) | |||
441 | musb->isr = da8xx_musb_interrupt; | 444 | musb->isr = da8xx_musb_interrupt; |
442 | return 0; | 445 | return 0; |
443 | fail: | 446 | fail: |
444 | return -ENODEV; | 447 | return ret; |
445 | } | 448 | } |
446 | 449 | ||
447 | static int da8xx_musb_exit(struct musb *musb) | 450 | static int da8xx_musb_exit(struct musb *musb) |
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index b1c01cad28b2..e040d9103735 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c | |||
@@ -380,11 +380,14 @@ static int davinci_musb_init(struct musb *musb) | |||
380 | { | 380 | { |
381 | void __iomem *tibase = musb->ctrl_base; | 381 | void __iomem *tibase = musb->ctrl_base; |
382 | u32 revision; | 382 | u32 revision; |
383 | int ret = -ENODEV; | ||
383 | 384 | ||
384 | usb_nop_xceiv_register(); | 385 | usb_nop_xceiv_register(); |
385 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); | 386 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
386 | if (IS_ERR_OR_NULL(musb->xceiv)) | 387 | if (IS_ERR_OR_NULL(musb->xceiv)) { |
388 | ret = -EPROBE_DEFER; | ||
387 | goto unregister; | 389 | goto unregister; |
390 | } | ||
388 | 391 | ||
389 | musb->mregs += DAVINCI_BASE_OFFSET; | 392 | musb->mregs += DAVINCI_BASE_OFFSET; |
390 | 393 | ||
@@ -438,7 +441,7 @@ fail: | |||
438 | usb_put_phy(musb->xceiv); | 441 | usb_put_phy(musb->xceiv); |
439 | unregister: | 442 | unregister: |
440 | usb_nop_xceiv_unregister(); | 443 | usb_nop_xceiv_unregister(); |
441 | return -ENODEV; | 444 | return ret; |
442 | } | 445 | } |
443 | 446 | ||
444 | static int davinci_musb_exit(struct musb *musb) | 447 | static int davinci_musb_exit(struct musb *musb) |
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index fd3486745e64..60b41cc28da4 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1993,6 +1993,7 @@ fail2: | |||
1993 | musb_platform_exit(musb); | 1993 | musb_platform_exit(musb); |
1994 | 1994 | ||
1995 | fail1: | 1995 | fail1: |
1996 | pm_runtime_disable(musb->controller); | ||
1996 | dev_err(musb->controller, | 1997 | dev_err(musb->controller, |
1997 | "musb_init_controller failed with status %d\n", status); | 1998 | "musb_init_controller failed with status %d\n", status); |
1998 | 1999 | ||
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index f7d764de6fda..7f5c215e560c 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c | |||
@@ -31,7 +31,6 @@ | |||
31 | 31 | ||
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/of.h> | ||
35 | #include <linux/err.h> | 34 | #include <linux/err.h> |
36 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
37 | #include <linux/dma-mapping.h> | 36 | #include <linux/dma-mapping.h> |
@@ -419,7 +418,7 @@ static int dsps_musb_init(struct musb *musb) | |||
419 | usb_nop_xceiv_register(); | 418 | usb_nop_xceiv_register(); |
420 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); | 419 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
421 | if (IS_ERR_OR_NULL(musb->xceiv)) | 420 | if (IS_ERR_OR_NULL(musb->xceiv)) |
422 | return -ENODEV; | 421 | return -EPROBE_DEFER; |
423 | 422 | ||
424 | /* Returns zero if e.g. not clocked */ | 423 | /* Returns zero if e.g. not clocked */ |
425 | rev = dsps_readl(reg_base, wrp->revision); | 424 | rev = dsps_readl(reg_base, wrp->revision); |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 876787438c2f..be18537c5f14 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -408,7 +408,19 @@ static void txstate(struct musb *musb, struct musb_request *req) | |||
408 | csr |= (MUSB_TXCSR_DMAENAB | 408 | csr |= (MUSB_TXCSR_DMAENAB |
409 | | MUSB_TXCSR_DMAMODE | 409 | | MUSB_TXCSR_DMAMODE |
410 | | MUSB_TXCSR_MODE); | 410 | | MUSB_TXCSR_MODE); |
411 | if (!musb_ep->hb_mult) | 411 | /* |
412 | * Enable Autoset according to table | ||
413 | * below | ||
414 | * bulk_split hb_mult Autoset_Enable | ||
415 | * 0 0 Yes(Normal) | ||
416 | * 0 >0 No(High BW ISO) | ||
417 | * 1 0 Yes(HS bulk) | ||
418 | * 1 >0 Yes(FS bulk) | ||
419 | */ | ||
420 | if (!musb_ep->hb_mult || | ||
421 | (musb_ep->hb_mult && | ||
422 | can_bulk_split(musb, | ||
423 | musb_ep->type))) | ||
412 | csr |= MUSB_TXCSR_AUTOSET; | 424 | csr |= MUSB_TXCSR_AUTOSET; |
413 | } | 425 | } |
414 | csr &= ~MUSB_TXCSR_P_UNDERRUN; | 426 | csr &= ~MUSB_TXCSR_P_UNDERRUN; |
@@ -1110,11 +1122,15 @@ static int musb_gadget_enable(struct usb_ep *ep, | |||
1110 | /* Set TXMAXP with the FIFO size of the endpoint | 1122 | /* Set TXMAXP with the FIFO size of the endpoint |
1111 | * to disable double buffering mode. | 1123 | * to disable double buffering mode. |
1112 | */ | 1124 | */ |
1113 | if (musb->double_buffer_not_ok) | 1125 | if (musb->double_buffer_not_ok) { |
1114 | musb_writew(regs, MUSB_TXMAXP, hw_ep->max_packet_sz_tx); | 1126 | musb_writew(regs, MUSB_TXMAXP, hw_ep->max_packet_sz_tx); |
1115 | else | 1127 | } else { |
1128 | if (can_bulk_split(musb, musb_ep->type)) | ||
1129 | musb_ep->hb_mult = (hw_ep->max_packet_sz_tx / | ||
1130 | musb_ep->packet_sz) - 1; | ||
1116 | musb_writew(regs, MUSB_TXMAXP, musb_ep->packet_sz | 1131 | musb_writew(regs, MUSB_TXMAXP, musb_ep->packet_sz |
1117 | | (musb_ep->hb_mult << 11)); | 1132 | | (musb_ep->hb_mult << 11)); |
1133 | } | ||
1118 | 1134 | ||
1119 | csr = MUSB_TXCSR_MODE | MUSB_TXCSR_CLRDATATOG; | 1135 | csr = MUSB_TXCSR_MODE | MUSB_TXCSR_CLRDATATOG; |
1120 | if (musb_readw(regs, MUSB_TXCSR) | 1136 | if (musb_readw(regs, MUSB_TXCSR) |
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index e9f0fd9ddd2d..1ce1fcf3f3e7 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c | |||
@@ -634,7 +634,17 @@ static bool musb_tx_dma_program(struct dma_controller *dma, | |||
634 | mode = 1; | 634 | mode = 1; |
635 | csr |= MUSB_TXCSR_DMAMODE | MUSB_TXCSR_DMAENAB; | 635 | csr |= MUSB_TXCSR_DMAMODE | MUSB_TXCSR_DMAENAB; |
636 | /* autoset shouldn't be set in high bandwidth */ | 636 | /* autoset shouldn't be set in high bandwidth */ |
637 | if (qh->hb_mult == 1) | 637 | /* |
638 | * Enable Autoset according to table | ||
639 | * below | ||
640 | * bulk_split hb_mult Autoset_Enable | ||
641 | * 0 1 Yes(Normal) | ||
642 | * 0 >1 No(High BW ISO) | ||
643 | * 1 1 Yes(HS bulk) | ||
644 | * 1 >1 Yes(FS bulk) | ||
645 | */ | ||
646 | if (qh->hb_mult == 1 || (qh->hb_mult > 1 && | ||
647 | can_bulk_split(hw_ep->musb, qh->type))) | ||
638 | csr |= MUSB_TXCSR_AUTOSET; | 648 | csr |= MUSB_TXCSR_AUTOSET; |
639 | } else { | 649 | } else { |
640 | mode = 0; | 650 | mode = 0; |
@@ -746,7 +756,13 @@ static void musb_ep_program(struct musb *musb, u8 epnum, | |||
746 | /* general endpoint setup */ | 756 | /* general endpoint setup */ |
747 | if (epnum) { | 757 | if (epnum) { |
748 | /* flush all old state, set default */ | 758 | /* flush all old state, set default */ |
749 | musb_h_tx_flush_fifo(hw_ep); | 759 | /* |
760 | * We could be flushing valid | ||
761 | * packets in double buffering | ||
762 | * case | ||
763 | */ | ||
764 | if (!hw_ep->tx_double_buffered) | ||
765 | musb_h_tx_flush_fifo(hw_ep); | ||
750 | 766 | ||
751 | /* | 767 | /* |
752 | * We must not clear the DMAMODE bit before or in | 768 | * We must not clear the DMAMODE bit before or in |
@@ -763,11 +779,13 @@ static void musb_ep_program(struct musb *musb, u8 epnum, | |||
763 | ); | 779 | ); |
764 | csr |= MUSB_TXCSR_MODE; | 780 | csr |= MUSB_TXCSR_MODE; |
765 | 781 | ||
766 | if (usb_gettoggle(urb->dev, qh->epnum, 1)) | 782 | if (!hw_ep->tx_double_buffered) { |
767 | csr |= MUSB_TXCSR_H_WR_DATATOGGLE | 783 | if (usb_gettoggle(urb->dev, qh->epnum, 1)) |
768 | | MUSB_TXCSR_H_DATATOGGLE; | 784 | csr |= MUSB_TXCSR_H_WR_DATATOGGLE |
769 | else | 785 | | MUSB_TXCSR_H_DATATOGGLE; |
770 | csr |= MUSB_TXCSR_CLRDATATOG; | 786 | else |
787 | csr |= MUSB_TXCSR_CLRDATATOG; | ||
788 | } | ||
771 | 789 | ||
772 | musb_writew(epio, MUSB_TXCSR, csr); | 790 | musb_writew(epio, MUSB_TXCSR, csr); |
773 | /* REVISIT may need to clear FLUSHFIFO ... */ | 791 | /* REVISIT may need to clear FLUSHFIFO ... */ |
@@ -791,17 +809,19 @@ static void musb_ep_program(struct musb *musb, u8 epnum, | |||
791 | /* protocol/endpoint/interval/NAKlimit */ | 809 | /* protocol/endpoint/interval/NAKlimit */ |
792 | if (epnum) { | 810 | if (epnum) { |
793 | musb_writeb(epio, MUSB_TXTYPE, qh->type_reg); | 811 | musb_writeb(epio, MUSB_TXTYPE, qh->type_reg); |
794 | if (musb->double_buffer_not_ok) | 812 | if (musb->double_buffer_not_ok) { |
795 | musb_writew(epio, MUSB_TXMAXP, | 813 | musb_writew(epio, MUSB_TXMAXP, |
796 | hw_ep->max_packet_sz_tx); | 814 | hw_ep->max_packet_sz_tx); |
797 | else if (can_bulk_split(musb, qh->type)) | 815 | } else if (can_bulk_split(musb, qh->type)) { |
816 | qh->hb_mult = hw_ep->max_packet_sz_tx | ||
817 | / packet_sz; | ||
798 | musb_writew(epio, MUSB_TXMAXP, packet_sz | 818 | musb_writew(epio, MUSB_TXMAXP, packet_sz |
799 | | ((hw_ep->max_packet_sz_tx / | 819 | | ((qh->hb_mult) - 1) << 11); |
800 | packet_sz) - 1) << 11); | 820 | } else { |
801 | else | ||
802 | musb_writew(epio, MUSB_TXMAXP, | 821 | musb_writew(epio, MUSB_TXMAXP, |
803 | qh->maxpacket | | 822 | qh->maxpacket | |
804 | ((qh->hb_mult - 1) << 11)); | 823 | ((qh->hb_mult - 1) << 11)); |
824 | } | ||
805 | musb_writeb(epio, MUSB_TXINTERVAL, qh->intv_reg); | 825 | musb_writeb(epio, MUSB_TXINTERVAL, qh->intv_reg); |
806 | } else { | 826 | } else { |
807 | musb_writeb(epio, MUSB_NAKLIMIT0, qh->intv_reg); | 827 | musb_writeb(epio, MUSB_NAKLIMIT0, qh->intv_reg); |
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index da00af460794..bb48796e5213 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -255,11 +255,11 @@ static inline void omap2430_low_level_init(struct musb *musb) | |||
255 | void omap_musb_mailbox(enum omap_musb_vbus_id_status status) | 255 | void omap_musb_mailbox(enum omap_musb_vbus_id_status status) |
256 | { | 256 | { |
257 | struct omap2430_glue *glue = _glue; | 257 | struct omap2430_glue *glue = _glue; |
258 | struct musb *musb = glue_to_musb(glue); | ||
259 | 258 | ||
260 | glue->status = status; | 259 | if (glue && glue_to_musb(glue)) { |
261 | if (!musb) { | 260 | glue->status = status; |
262 | dev_err(glue->dev, "musb core is not yet ready\n"); | 261 | } else { |
262 | pr_err("%s: musb core is not yet ready\n", __func__); | ||
263 | return; | 263 | return; |
264 | } | 264 | } |
265 | 265 | ||
@@ -369,7 +369,7 @@ static int omap2430_musb_init(struct musb *musb) | |||
369 | musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2); | 369 | musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2); |
370 | if (IS_ERR_OR_NULL(musb->xceiv)) { | 370 | if (IS_ERR_OR_NULL(musb->xceiv)) { |
371 | pr_err("HS USB OTG: no transceiver configured\n"); | 371 | pr_err("HS USB OTG: no transceiver configured\n"); |
372 | return -ENODEV; | 372 | return -EPROBE_DEFER; |
373 | } | 373 | } |
374 | 374 | ||
375 | musb->isr = omap2430_musb_interrupt; | 375 | musb->isr = omap2430_musb_interrupt; |
@@ -532,20 +532,18 @@ static int omap2430_probe(struct platform_device *pdev) | |||
532 | if (!pdata) { | 532 | if (!pdata) { |
533 | dev_err(&pdev->dev, | 533 | dev_err(&pdev->dev, |
534 | "failed to allocate musb platfrom data\n"); | 534 | "failed to allocate musb platfrom data\n"); |
535 | ret = -ENOMEM; | ||
536 | goto err2; | 535 | goto err2; |
537 | } | 536 | } |
538 | 537 | ||
539 | data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); | 538 | data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); |
540 | if (!data) { | 539 | if (!data) { |
541 | dev_err(&pdev->dev, | 540 | dev_err(&pdev->dev, |
542 | "failed to allocate musb board data\n"); | 541 | "failed to allocate musb board data\n"); |
543 | ret = -ENOMEM; | ||
544 | goto err2; | 542 | goto err2; |
545 | } | 543 | } |
546 | 544 | ||
547 | config = devm_kzalloc(&pdev->dev, sizeof(*config), GFP_KERNEL); | 545 | config = devm_kzalloc(&pdev->dev, sizeof(*config), GFP_KERNEL); |
548 | if (!data) { | 546 | if (!config) { |
549 | dev_err(&pdev->dev, | 547 | dev_err(&pdev->dev, |
550 | "failed to allocate musb hdrc config\n"); | 548 | "failed to allocate musb hdrc config\n"); |
551 | goto err2; | 549 | goto err2; |
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index 3969813c217d..464bd23cccda 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c | |||
@@ -1069,7 +1069,7 @@ static int tusb_musb_init(struct musb *musb) | |||
1069 | usb_nop_xceiv_register(); | 1069 | usb_nop_xceiv_register(); |
1070 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); | 1070 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
1071 | if (IS_ERR_OR_NULL(musb->xceiv)) | 1071 | if (IS_ERR_OR_NULL(musb->xceiv)) |
1072 | return -ENODEV; | 1072 | return -EPROBE_DEFER; |
1073 | 1073 | ||
1074 | pdev = to_platform_device(musb->controller); | 1074 | pdev = to_platform_device(musb->controller); |
1075 | 1075 | ||
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c index a27ca1a9c994..13a392913769 100644 --- a/drivers/usb/musb/ux500.c +++ b/drivers/usb/musb/ux500.c | |||
@@ -61,7 +61,7 @@ static int ux500_musb_init(struct musb *musb) | |||
61 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); | 61 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
62 | if (IS_ERR_OR_NULL(musb->xceiv)) { | 62 | if (IS_ERR_OR_NULL(musb->xceiv)) { |
63 | pr_err("HS USB OTG: no transceiver configured\n"); | 63 | pr_err("HS USB OTG: no transceiver configured\n"); |
64 | return -ENODEV; | 64 | return -EPROBE_DEFER; |
65 | } | 65 | } |
66 | 66 | ||
67 | musb->isr = ux500_musb_interrupt; | 67 | musb->isr = ux500_musb_interrupt; |
@@ -108,7 +108,7 @@ static int ux500_probe(struct platform_device *pdev) | |||
108 | goto err3; | 108 | goto err3; |
109 | } | 109 | } |
110 | 110 | ||
111 | ret = clk_enable(clk); | 111 | ret = clk_prepare_enable(clk); |
112 | if (ret) { | 112 | if (ret) { |
113 | dev_err(&pdev->dev, "failed to enable clock\n"); | 113 | dev_err(&pdev->dev, "failed to enable clock\n"); |
114 | goto err4; | 114 | goto err4; |
@@ -148,7 +148,7 @@ static int ux500_probe(struct platform_device *pdev) | |||
148 | return 0; | 148 | return 0; |
149 | 149 | ||
150 | err5: | 150 | err5: |
151 | clk_disable(clk); | 151 | clk_disable_unprepare(clk); |
152 | 152 | ||
153 | err4: | 153 | err4: |
154 | clk_put(clk); | 154 | clk_put(clk); |
@@ -168,7 +168,7 @@ static int ux500_remove(struct platform_device *pdev) | |||
168 | struct ux500_glue *glue = platform_get_drvdata(pdev); | 168 | struct ux500_glue *glue = platform_get_drvdata(pdev); |
169 | 169 | ||
170 | platform_device_unregister(glue->musb); | 170 | platform_device_unregister(glue->musb); |
171 | clk_disable(glue->clk); | 171 | clk_disable_unprepare(glue->clk); |
172 | clk_put(glue->clk); | 172 | clk_put(glue->clk); |
173 | kfree(glue); | 173 | kfree(glue); |
174 | 174 | ||
@@ -182,7 +182,7 @@ static int ux500_suspend(struct device *dev) | |||
182 | struct musb *musb = glue_to_musb(glue); | 182 | struct musb *musb = glue_to_musb(glue); |
183 | 183 | ||
184 | usb_phy_set_suspend(musb->xceiv, 1); | 184 | usb_phy_set_suspend(musb->xceiv, 1); |
185 | clk_disable(glue->clk); | 185 | clk_disable_unprepare(glue->clk); |
186 | 186 | ||
187 | return 0; | 187 | return 0; |
188 | } | 188 | } |
@@ -193,7 +193,7 @@ static int ux500_resume(struct device *dev) | |||
193 | struct musb *musb = glue_to_musb(glue); | 193 | struct musb *musb = glue_to_musb(glue); |
194 | int ret; | 194 | int ret; |
195 | 195 | ||
196 | ret = clk_enable(glue->clk); | 196 | ret = clk_prepare_enable(glue->clk); |
197 | if (ret) { | 197 | if (ret) { |
198 | dev_err(dev, "failed to enable clock\n"); | 198 | dev_err(dev, "failed to enable clock\n"); |
199 | return ret; | 199 | return ret; |