diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-24 11:31:15 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-24 11:31:15 -0500 |
commit | 17495bda6ab42613206ba3223c09dd66c2074c98 (patch) | |
tree | 787a0ea31a97dda853d6213dfedb77612a371c7f | |
parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) | |
parent | a0456399fb07155637a2b597b91cc1c63bc25141 (diff) |
Merge tag 'fixes-for-v4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
Felipe writes:
usb: fixes for v4.0-rc2
Not that many fixes this time. They have all been tested on
platforms I have around and also passed my randconfig builds.
Here's a quick summary of the changes:
Phonet function learned to not disable a disabled endpoint.
musb received a pm_runtime_irq_safe() call to fix a bug when
calling musb_pullup() (via usb_gadget_{connect,disconnect}())
with irqs disabled.
musb also got a really old fix for throughput with isochronous
endpoints by pushing URB completion to a tasklet (by means of
HCD_BH flag).
musb now can properly get its phys on musb-dsps platforms (am335x
as of now).
musb learned how to read boolean OF properties.
Old bug on how to disable dwc3-omap's IRQs got fixed finally.
A few sparse warnings here and there.
Renesas got a linkage fix.
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/dwc3/dwc3-omap.c | 30 | ||||
-rw-r--r-- | drivers/usb/gadget/configfs.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/function/f_hid.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/function/f_phonet.c | 5 | ||||
-rw-r--r-- | drivers/usb/gadget/function/f_sourcesink.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/function/f_uac2.c | 34 | ||||
-rw-r--r-- | drivers/usb/gadget/function/uvc_v4l2.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/function/uvc_video.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/legacy/g_ffs.c | 6 | ||||
-rw-r--r-- | drivers/usb/isp1760/isp1760-hcd.c | 6 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.c | 10 | ||||
-rw-r--r-- | drivers/usb/musb/musb_dsps.c | 32 | ||||
-rw-r--r-- | drivers/usb/musb/musb_host.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/omap2430.c | 7 | ||||
-rw-r--r-- | drivers/usb/renesas_usbhs/Kconfig | 1 |
15 files changed, 103 insertions, 40 deletions
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 172d64e585b6..52e0c4e5e48e 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c | |||
@@ -205,6 +205,18 @@ static void dwc3_omap_write_irq0_set(struct dwc3_omap *omap, u32 value) | |||
205 | omap->irq0_offset, value); | 205 | omap->irq0_offset, value); |
206 | } | 206 | } |
207 | 207 | ||
208 | static void dwc3_omap_write_irqmisc_clr(struct dwc3_omap *omap, u32 value) | ||
209 | { | ||
210 | dwc3_omap_writel(omap->base, USBOTGSS_IRQENABLE_CLR_MISC + | ||
211 | omap->irqmisc_offset, value); | ||
212 | } | ||
213 | |||
214 | static void dwc3_omap_write_irq0_clr(struct dwc3_omap *omap, u32 value) | ||
215 | { | ||
216 | dwc3_omap_writel(omap->base, USBOTGSS_IRQENABLE_CLR_0 - | ||
217 | omap->irq0_offset, value); | ||
218 | } | ||
219 | |||
208 | static void dwc3_omap_set_mailbox(struct dwc3_omap *omap, | 220 | static void dwc3_omap_set_mailbox(struct dwc3_omap *omap, |
209 | enum omap_dwc3_vbus_id_status status) | 221 | enum omap_dwc3_vbus_id_status status) |
210 | { | 222 | { |
@@ -345,9 +357,23 @@ static void dwc3_omap_enable_irqs(struct dwc3_omap *omap) | |||
345 | 357 | ||
346 | static void dwc3_omap_disable_irqs(struct dwc3_omap *omap) | 358 | static void dwc3_omap_disable_irqs(struct dwc3_omap *omap) |
347 | { | 359 | { |
360 | u32 reg; | ||
361 | |||
348 | /* disable all IRQs */ | 362 | /* disable all IRQs */ |
349 | dwc3_omap_write_irqmisc_set(omap, 0x00); | 363 | reg = USBOTGSS_IRQO_COREIRQ_ST; |
350 | dwc3_omap_write_irq0_set(omap, 0x00); | 364 | dwc3_omap_write_irq0_clr(omap, reg); |
365 | |||
366 | reg = (USBOTGSS_IRQMISC_OEVT | | ||
367 | USBOTGSS_IRQMISC_DRVVBUS_RISE | | ||
368 | USBOTGSS_IRQMISC_CHRGVBUS_RISE | | ||
369 | USBOTGSS_IRQMISC_DISCHRGVBUS_RISE | | ||
370 | USBOTGSS_IRQMISC_IDPULLUP_RISE | | ||
371 | USBOTGSS_IRQMISC_DRVVBUS_FALL | | ||
372 | USBOTGSS_IRQMISC_CHRGVBUS_FALL | | ||
373 | USBOTGSS_IRQMISC_DISCHRGVBUS_FALL | | ||
374 | USBOTGSS_IRQMISC_IDPULLUP_FALL); | ||
375 | |||
376 | dwc3_omap_write_irqmisc_clr(omap, reg); | ||
351 | } | 377 | } |
352 | 378 | ||
353 | static u64 dwc3_omap_dma_mask = DMA_BIT_MASK(32); | 379 | static u64 dwc3_omap_dma_mask = DMA_BIT_MASK(32); |
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index 75648145dc1b..c42765b3a060 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c | |||
@@ -1161,7 +1161,6 @@ static ssize_t interf_grp_compatible_id_store(struct usb_os_desc *desc, | |||
1161 | if (desc->opts_mutex) | 1161 | if (desc->opts_mutex) |
1162 | mutex_lock(desc->opts_mutex); | 1162 | mutex_lock(desc->opts_mutex); |
1163 | memcpy(desc->ext_compat_id, page, l); | 1163 | memcpy(desc->ext_compat_id, page, l); |
1164 | desc->ext_compat_id[l] = '\0'; | ||
1165 | 1164 | ||
1166 | if (desc->opts_mutex) | 1165 | if (desc->opts_mutex) |
1167 | mutex_unlock(desc->opts_mutex); | 1166 | mutex_unlock(desc->opts_mutex); |
@@ -1192,7 +1191,6 @@ static ssize_t interf_grp_sub_compatible_id_store(struct usb_os_desc *desc, | |||
1192 | if (desc->opts_mutex) | 1191 | if (desc->opts_mutex) |
1193 | mutex_lock(desc->opts_mutex); | 1192 | mutex_lock(desc->opts_mutex); |
1194 | memcpy(desc->ext_compat_id + 8, page, l); | 1193 | memcpy(desc->ext_compat_id + 8, page, l); |
1195 | desc->ext_compat_id[l + 8] = '\0'; | ||
1196 | 1194 | ||
1197 | if (desc->opts_mutex) | 1195 | if (desc->opts_mutex) |
1198 | mutex_unlock(desc->opts_mutex); | 1196 | mutex_unlock(desc->opts_mutex); |
diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c index 426d69a9c018..a2612fb79eff 100644 --- a/drivers/usb/gadget/function/f_hid.c +++ b/drivers/usb/gadget/function/f_hid.c | |||
@@ -569,7 +569,7 @@ fail: | |||
569 | return status; | 569 | return status; |
570 | } | 570 | } |
571 | 571 | ||
572 | const struct file_operations f_hidg_fops = { | 572 | static const struct file_operations f_hidg_fops = { |
573 | .owner = THIS_MODULE, | 573 | .owner = THIS_MODULE, |
574 | .open = f_hidg_open, | 574 | .open = f_hidg_open, |
575 | .release = f_hidg_release, | 575 | .release = f_hidg_release, |
diff --git a/drivers/usb/gadget/function/f_phonet.c b/drivers/usb/gadget/function/f_phonet.c index c89e96cfa3e4..c0c3ef272714 100644 --- a/drivers/usb/gadget/function/f_phonet.c +++ b/drivers/usb/gadget/function/f_phonet.c | |||
@@ -417,7 +417,10 @@ static int pn_set_alt(struct usb_function *f, unsigned intf, unsigned alt) | |||
417 | return -EINVAL; | 417 | return -EINVAL; |
418 | 418 | ||
419 | spin_lock(&port->lock); | 419 | spin_lock(&port->lock); |
420 | __pn_reset(f); | 420 | |
421 | if (fp->in_ep->driver_data) | ||
422 | __pn_reset(f); | ||
423 | |||
421 | if (alt == 1) { | 424 | if (alt == 1) { |
422 | int i; | 425 | int i; |
423 | 426 | ||
diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c index e07c50ced64d..e3dae47baef3 100644 --- a/drivers/usb/gadget/function/f_sourcesink.c +++ b/drivers/usb/gadget/function/f_sourcesink.c | |||
@@ -344,7 +344,7 @@ static struct usb_endpoint_descriptor ss_int_source_desc = { | |||
344 | .bInterval = USB_MS_TO_SS_INTERVAL(GZERO_INT_INTERVAL), | 344 | .bInterval = USB_MS_TO_SS_INTERVAL(GZERO_INT_INTERVAL), |
345 | }; | 345 | }; |
346 | 346 | ||
347 | struct usb_ss_ep_comp_descriptor ss_int_source_comp_desc = { | 347 | static struct usb_ss_ep_comp_descriptor ss_int_source_comp_desc = { |
348 | .bLength = USB_DT_SS_EP_COMP_SIZE, | 348 | .bLength = USB_DT_SS_EP_COMP_SIZE, |
349 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, | 349 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, |
350 | 350 | ||
@@ -362,7 +362,7 @@ static struct usb_endpoint_descriptor ss_int_sink_desc = { | |||
362 | .bInterval = USB_MS_TO_SS_INTERVAL(GZERO_INT_INTERVAL), | 362 | .bInterval = USB_MS_TO_SS_INTERVAL(GZERO_INT_INTERVAL), |
363 | }; | 363 | }; |
364 | 364 | ||
365 | struct usb_ss_ep_comp_descriptor ss_int_sink_comp_desc = { | 365 | static struct usb_ss_ep_comp_descriptor ss_int_sink_comp_desc = { |
366 | .bLength = USB_DT_SS_EP_COMP_SIZE, | 366 | .bLength = USB_DT_SS_EP_COMP_SIZE, |
367 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, | 367 | .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, |
368 | 368 | ||
diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c index 33e16658e5cf..6d3eb8b00a48 100644 --- a/drivers/usb/gadget/function/f_uac2.c +++ b/drivers/usb/gadget/function/f_uac2.c | |||
@@ -54,7 +54,7 @@ | |||
54 | #define UNFLW_CTRL 8 | 54 | #define UNFLW_CTRL 8 |
55 | #define OVFLW_CTRL 10 | 55 | #define OVFLW_CTRL 10 |
56 | 56 | ||
57 | const char *uac2_name = "snd_uac2"; | 57 | static const char *uac2_name = "snd_uac2"; |
58 | 58 | ||
59 | struct uac2_req { | 59 | struct uac2_req { |
60 | struct uac2_rtd_params *pp; /* parent param */ | 60 | struct uac2_rtd_params *pp; /* parent param */ |
@@ -634,7 +634,7 @@ static struct usb_interface_descriptor std_ac_if_desc = { | |||
634 | }; | 634 | }; |
635 | 635 | ||
636 | /* Clock source for IN traffic */ | 636 | /* Clock source for IN traffic */ |
637 | struct uac_clock_source_descriptor in_clk_src_desc = { | 637 | static struct uac_clock_source_descriptor in_clk_src_desc = { |
638 | .bLength = sizeof in_clk_src_desc, | 638 | .bLength = sizeof in_clk_src_desc, |
639 | .bDescriptorType = USB_DT_CS_INTERFACE, | 639 | .bDescriptorType = USB_DT_CS_INTERFACE, |
640 | 640 | ||
@@ -646,7 +646,7 @@ struct uac_clock_source_descriptor in_clk_src_desc = { | |||
646 | }; | 646 | }; |
647 | 647 | ||
648 | /* Clock source for OUT traffic */ | 648 | /* Clock source for OUT traffic */ |
649 | struct uac_clock_source_descriptor out_clk_src_desc = { | 649 | static struct uac_clock_source_descriptor out_clk_src_desc = { |
650 | .bLength = sizeof out_clk_src_desc, | 650 | .bLength = sizeof out_clk_src_desc, |
651 | .bDescriptorType = USB_DT_CS_INTERFACE, | 651 | .bDescriptorType = USB_DT_CS_INTERFACE, |
652 | 652 | ||
@@ -658,7 +658,7 @@ struct uac_clock_source_descriptor out_clk_src_desc = { | |||
658 | }; | 658 | }; |
659 | 659 | ||
660 | /* Input Terminal for USB_OUT */ | 660 | /* Input Terminal for USB_OUT */ |
661 | struct uac2_input_terminal_descriptor usb_out_it_desc = { | 661 | static struct uac2_input_terminal_descriptor usb_out_it_desc = { |
662 | .bLength = sizeof usb_out_it_desc, | 662 | .bLength = sizeof usb_out_it_desc, |
663 | .bDescriptorType = USB_DT_CS_INTERFACE, | 663 | .bDescriptorType = USB_DT_CS_INTERFACE, |
664 | 664 | ||
@@ -672,7 +672,7 @@ struct uac2_input_terminal_descriptor usb_out_it_desc = { | |||
672 | }; | 672 | }; |
673 | 673 | ||
674 | /* Input Terminal for I/O-In */ | 674 | /* Input Terminal for I/O-In */ |
675 | struct uac2_input_terminal_descriptor io_in_it_desc = { | 675 | static struct uac2_input_terminal_descriptor io_in_it_desc = { |
676 | .bLength = sizeof io_in_it_desc, | 676 | .bLength = sizeof io_in_it_desc, |
677 | .bDescriptorType = USB_DT_CS_INTERFACE, | 677 | .bDescriptorType = USB_DT_CS_INTERFACE, |
678 | 678 | ||
@@ -686,7 +686,7 @@ struct uac2_input_terminal_descriptor io_in_it_desc = { | |||
686 | }; | 686 | }; |
687 | 687 | ||
688 | /* Ouput Terminal for USB_IN */ | 688 | /* Ouput Terminal for USB_IN */ |
689 | struct uac2_output_terminal_descriptor usb_in_ot_desc = { | 689 | static struct uac2_output_terminal_descriptor usb_in_ot_desc = { |
690 | .bLength = sizeof usb_in_ot_desc, | 690 | .bLength = sizeof usb_in_ot_desc, |
691 | .bDescriptorType = USB_DT_CS_INTERFACE, | 691 | .bDescriptorType = USB_DT_CS_INTERFACE, |
692 | 692 | ||
@@ -700,7 +700,7 @@ struct uac2_output_terminal_descriptor usb_in_ot_desc = { | |||
700 | }; | 700 | }; |
701 | 701 | ||
702 | /* Ouput Terminal for I/O-Out */ | 702 | /* Ouput Terminal for I/O-Out */ |
703 | struct uac2_output_terminal_descriptor io_out_ot_desc = { | 703 | static struct uac2_output_terminal_descriptor io_out_ot_desc = { |
704 | .bLength = sizeof io_out_ot_desc, | 704 | .bLength = sizeof io_out_ot_desc, |
705 | .bDescriptorType = USB_DT_CS_INTERFACE, | 705 | .bDescriptorType = USB_DT_CS_INTERFACE, |
706 | 706 | ||
@@ -713,7 +713,7 @@ struct uac2_output_terminal_descriptor io_out_ot_desc = { | |||
713 | .bmControls = (CONTROL_RDWR << COPY_CTRL), | 713 | .bmControls = (CONTROL_RDWR << COPY_CTRL), |
714 | }; | 714 | }; |
715 | 715 | ||
716 | struct uac2_ac_header_descriptor ac_hdr_desc = { | 716 | static struct uac2_ac_header_descriptor ac_hdr_desc = { |
717 | .bLength = sizeof ac_hdr_desc, | 717 | .bLength = sizeof ac_hdr_desc, |
718 | .bDescriptorType = USB_DT_CS_INTERFACE, | 718 | .bDescriptorType = USB_DT_CS_INTERFACE, |
719 | 719 | ||
@@ -751,7 +751,7 @@ static struct usb_interface_descriptor std_as_out_if1_desc = { | |||
751 | }; | 751 | }; |
752 | 752 | ||
753 | /* Audio Stream OUT Intface Desc */ | 753 | /* Audio Stream OUT Intface Desc */ |
754 | struct uac2_as_header_descriptor as_out_hdr_desc = { | 754 | static struct uac2_as_header_descriptor as_out_hdr_desc = { |
755 | .bLength = sizeof as_out_hdr_desc, | 755 | .bLength = sizeof as_out_hdr_desc, |
756 | .bDescriptorType = USB_DT_CS_INTERFACE, | 756 | .bDescriptorType = USB_DT_CS_INTERFACE, |
757 | 757 | ||
@@ -764,7 +764,7 @@ struct uac2_as_header_descriptor as_out_hdr_desc = { | |||
764 | }; | 764 | }; |
765 | 765 | ||
766 | /* Audio USB_OUT Format */ | 766 | /* Audio USB_OUT Format */ |
767 | struct uac2_format_type_i_descriptor as_out_fmt1_desc = { | 767 | static struct uac2_format_type_i_descriptor as_out_fmt1_desc = { |
768 | .bLength = sizeof as_out_fmt1_desc, | 768 | .bLength = sizeof as_out_fmt1_desc, |
769 | .bDescriptorType = USB_DT_CS_INTERFACE, | 769 | .bDescriptorType = USB_DT_CS_INTERFACE, |
770 | .bDescriptorSubtype = UAC_FORMAT_TYPE, | 770 | .bDescriptorSubtype = UAC_FORMAT_TYPE, |
@@ -772,7 +772,7 @@ struct uac2_format_type_i_descriptor as_out_fmt1_desc = { | |||
772 | }; | 772 | }; |
773 | 773 | ||
774 | /* STD AS ISO OUT Endpoint */ | 774 | /* STD AS ISO OUT Endpoint */ |
775 | struct usb_endpoint_descriptor fs_epout_desc = { | 775 | static struct usb_endpoint_descriptor fs_epout_desc = { |
776 | .bLength = USB_DT_ENDPOINT_SIZE, | 776 | .bLength = USB_DT_ENDPOINT_SIZE, |
777 | .bDescriptorType = USB_DT_ENDPOINT, | 777 | .bDescriptorType = USB_DT_ENDPOINT, |
778 | 778 | ||
@@ -782,7 +782,7 @@ struct usb_endpoint_descriptor fs_epout_desc = { | |||
782 | .bInterval = 1, | 782 | .bInterval = 1, |
783 | }; | 783 | }; |
784 | 784 | ||
785 | struct usb_endpoint_descriptor hs_epout_desc = { | 785 | static struct usb_endpoint_descriptor hs_epout_desc = { |
786 | .bLength = USB_DT_ENDPOINT_SIZE, | 786 | .bLength = USB_DT_ENDPOINT_SIZE, |
787 | .bDescriptorType = USB_DT_ENDPOINT, | 787 | .bDescriptorType = USB_DT_ENDPOINT, |
788 | 788 | ||
@@ -828,7 +828,7 @@ static struct usb_interface_descriptor std_as_in_if1_desc = { | |||
828 | }; | 828 | }; |
829 | 829 | ||
830 | /* Audio Stream IN Intface Desc */ | 830 | /* Audio Stream IN Intface Desc */ |
831 | struct uac2_as_header_descriptor as_in_hdr_desc = { | 831 | static struct uac2_as_header_descriptor as_in_hdr_desc = { |
832 | .bLength = sizeof as_in_hdr_desc, | 832 | .bLength = sizeof as_in_hdr_desc, |
833 | .bDescriptorType = USB_DT_CS_INTERFACE, | 833 | .bDescriptorType = USB_DT_CS_INTERFACE, |
834 | 834 | ||
@@ -841,7 +841,7 @@ struct uac2_as_header_descriptor as_in_hdr_desc = { | |||
841 | }; | 841 | }; |
842 | 842 | ||
843 | /* Audio USB_IN Format */ | 843 | /* Audio USB_IN Format */ |
844 | struct uac2_format_type_i_descriptor as_in_fmt1_desc = { | 844 | static struct uac2_format_type_i_descriptor as_in_fmt1_desc = { |
845 | .bLength = sizeof as_in_fmt1_desc, | 845 | .bLength = sizeof as_in_fmt1_desc, |
846 | .bDescriptorType = USB_DT_CS_INTERFACE, | 846 | .bDescriptorType = USB_DT_CS_INTERFACE, |
847 | .bDescriptorSubtype = UAC_FORMAT_TYPE, | 847 | .bDescriptorSubtype = UAC_FORMAT_TYPE, |
@@ -849,7 +849,7 @@ struct uac2_format_type_i_descriptor as_in_fmt1_desc = { | |||
849 | }; | 849 | }; |
850 | 850 | ||
851 | /* STD AS ISO IN Endpoint */ | 851 | /* STD AS ISO IN Endpoint */ |
852 | struct usb_endpoint_descriptor fs_epin_desc = { | 852 | static struct usb_endpoint_descriptor fs_epin_desc = { |
853 | .bLength = USB_DT_ENDPOINT_SIZE, | 853 | .bLength = USB_DT_ENDPOINT_SIZE, |
854 | .bDescriptorType = USB_DT_ENDPOINT, | 854 | .bDescriptorType = USB_DT_ENDPOINT, |
855 | 855 | ||
@@ -859,7 +859,7 @@ struct usb_endpoint_descriptor fs_epin_desc = { | |||
859 | .bInterval = 1, | 859 | .bInterval = 1, |
860 | }; | 860 | }; |
861 | 861 | ||
862 | struct usb_endpoint_descriptor hs_epin_desc = { | 862 | static struct usb_endpoint_descriptor hs_epin_desc = { |
863 | .bLength = USB_DT_ENDPOINT_SIZE, | 863 | .bLength = USB_DT_ENDPOINT_SIZE, |
864 | .bDescriptorType = USB_DT_ENDPOINT, | 864 | .bDescriptorType = USB_DT_ENDPOINT, |
865 | 865 | ||
@@ -1563,7 +1563,7 @@ static void afunc_unbind(struct usb_configuration *c, struct usb_function *f) | |||
1563 | agdev->out_ep->driver_data = NULL; | 1563 | agdev->out_ep->driver_data = NULL; |
1564 | } | 1564 | } |
1565 | 1565 | ||
1566 | struct usb_function *afunc_alloc(struct usb_function_instance *fi) | 1566 | static struct usb_function *afunc_alloc(struct usb_function_instance *fi) |
1567 | { | 1567 | { |
1568 | struct audio_dev *agdev; | 1568 | struct audio_dev *agdev; |
1569 | struct f_uac2_opts *opts; | 1569 | struct f_uac2_opts *opts; |
diff --git a/drivers/usb/gadget/function/uvc_v4l2.c b/drivers/usb/gadget/function/uvc_v4l2.c index 5aad7fededa5..8b818fd027b3 100644 --- a/drivers/usb/gadget/function/uvc_v4l2.c +++ b/drivers/usb/gadget/function/uvc_v4l2.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "uvc.h" | 27 | #include "uvc.h" |
28 | #include "uvc_queue.h" | 28 | #include "uvc_queue.h" |
29 | #include "uvc_video.h" | 29 | #include "uvc_video.h" |
30 | #include "uvc_v4l2.h" | ||
30 | 31 | ||
31 | /* -------------------------------------------------------------------------- | 32 | /* -------------------------------------------------------------------------- |
32 | * Requests handling | 33 | * Requests handling |
diff --git a/drivers/usb/gadget/function/uvc_video.c b/drivers/usb/gadget/function/uvc_video.c index 9cb86bc1a9a5..50a5e637ca35 100644 --- a/drivers/usb/gadget/function/uvc_video.c +++ b/drivers/usb/gadget/function/uvc_video.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include "uvc.h" | 22 | #include "uvc.h" |
23 | #include "uvc_queue.h" | 23 | #include "uvc_queue.h" |
24 | #include "uvc_video.h" | ||
24 | 25 | ||
25 | /* -------------------------------------------------------------------------- | 26 | /* -------------------------------------------------------------------------- |
26 | * Video codecs | 27 | * Video codecs |
diff --git a/drivers/usb/gadget/legacy/g_ffs.c b/drivers/usb/gadget/legacy/g_ffs.c index 06acfa55864a..b01b88e1b716 100644 --- a/drivers/usb/gadget/legacy/g_ffs.c +++ b/drivers/usb/gadget/legacy/g_ffs.c | |||
@@ -133,7 +133,9 @@ struct gfs_configuration { | |||
133 | struct usb_configuration c; | 133 | struct usb_configuration c; |
134 | int (*eth)(struct usb_configuration *c); | 134 | int (*eth)(struct usb_configuration *c); |
135 | int num; | 135 | int num; |
136 | } gfs_configurations[] = { | 136 | }; |
137 | |||
138 | static struct gfs_configuration gfs_configurations[] = { | ||
137 | #ifdef CONFIG_USB_FUNCTIONFS_RNDIS | 139 | #ifdef CONFIG_USB_FUNCTIONFS_RNDIS |
138 | { | 140 | { |
139 | .eth = bind_rndis_config, | 141 | .eth = bind_rndis_config, |
@@ -278,7 +280,7 @@ static void *functionfs_acquire_dev(struct ffs_dev *dev) | |||
278 | if (!try_module_get(THIS_MODULE)) | 280 | if (!try_module_get(THIS_MODULE)) |
279 | return ERR_PTR(-ENOENT); | 281 | return ERR_PTR(-ENOENT); |
280 | 282 | ||
281 | return 0; | 283 | return NULL; |
282 | } | 284 | } |
283 | 285 | ||
284 | static void functionfs_release_dev(struct ffs_dev *dev) | 286 | static void functionfs_release_dev(struct ffs_dev *dev) |
diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp1760-hcd.c index eba9b82e2d70..3cb98b1d5d29 100644 --- a/drivers/usb/isp1760/isp1760-hcd.c +++ b/drivers/usb/isp1760/isp1760-hcd.c | |||
@@ -1274,7 +1274,7 @@ static void errata2_function(unsigned long data) | |||
1274 | for (slot = 0; slot < 32; slot++) | 1274 | for (slot = 0; slot < 32; slot++) |
1275 | if (priv->atl_slots[slot].qh && time_after(jiffies, | 1275 | if (priv->atl_slots[slot].qh && time_after(jiffies, |
1276 | priv->atl_slots[slot].timestamp + | 1276 | priv->atl_slots[slot].timestamp + |
1277 | SLOT_TIMEOUT * HZ / 1000)) { | 1277 | msecs_to_jiffies(SLOT_TIMEOUT))) { |
1278 | ptd_read(hcd->regs, ATL_PTD_OFFSET, slot, &ptd); | 1278 | ptd_read(hcd->regs, ATL_PTD_OFFSET, slot, &ptd); |
1279 | if (!FROM_DW0_VALID(ptd.dw0) && | 1279 | if (!FROM_DW0_VALID(ptd.dw0) && |
1280 | !FROM_DW3_ACTIVE(ptd.dw3)) | 1280 | !FROM_DW3_ACTIVE(ptd.dw3)) |
@@ -1286,7 +1286,7 @@ static void errata2_function(unsigned long data) | |||
1286 | 1286 | ||
1287 | spin_unlock_irqrestore(&priv->lock, spinflags); | 1287 | spin_unlock_irqrestore(&priv->lock, spinflags); |
1288 | 1288 | ||
1289 | errata2_timer.expires = jiffies + SLOT_CHECK_PERIOD * HZ / 1000; | 1289 | errata2_timer.expires = jiffies + msecs_to_jiffies(SLOT_CHECK_PERIOD); |
1290 | add_timer(&errata2_timer); | 1290 | add_timer(&errata2_timer); |
1291 | } | 1291 | } |
1292 | 1292 | ||
@@ -1336,7 +1336,7 @@ static int isp1760_run(struct usb_hcd *hcd) | |||
1336 | return retval; | 1336 | return retval; |
1337 | 1337 | ||
1338 | setup_timer(&errata2_timer, errata2_function, (unsigned long)hcd); | 1338 | setup_timer(&errata2_timer, errata2_function, (unsigned long)hcd); |
1339 | errata2_timer.expires = jiffies + SLOT_CHECK_PERIOD * HZ / 1000; | 1339 | errata2_timer.expires = jiffies + msecs_to_jiffies(SLOT_CHECK_PERIOD); |
1340 | add_timer(&errata2_timer); | 1340 | add_timer(&errata2_timer); |
1341 | 1341 | ||
1342 | chipid = reg_read32(hcd->regs, HC_CHIP_ID_REG); | 1342 | chipid = reg_read32(hcd->regs, HC_CHIP_ID_REG); |
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index e6f4cbfeed97..067920f2d570 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1969,10 +1969,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) | |||
1969 | goto fail0; | 1969 | goto fail0; |
1970 | } | 1970 | } |
1971 | 1971 | ||
1972 | pm_runtime_use_autosuspend(musb->controller); | ||
1973 | pm_runtime_set_autosuspend_delay(musb->controller, 200); | ||
1974 | pm_runtime_enable(musb->controller); | ||
1975 | |||
1976 | spin_lock_init(&musb->lock); | 1972 | spin_lock_init(&musb->lock); |
1977 | musb->board_set_power = plat->set_power; | 1973 | musb->board_set_power = plat->set_power; |
1978 | musb->min_power = plat->min_power; | 1974 | musb->min_power = plat->min_power; |
@@ -1991,6 +1987,12 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) | |||
1991 | musb_readl = musb_default_readl; | 1987 | musb_readl = musb_default_readl; |
1992 | musb_writel = musb_default_writel; | 1988 | musb_writel = musb_default_writel; |
1993 | 1989 | ||
1990 | /* We need musb_read/write functions initialized for PM */ | ||
1991 | pm_runtime_use_autosuspend(musb->controller); | ||
1992 | pm_runtime_set_autosuspend_delay(musb->controller, 200); | ||
1993 | pm_runtime_irq_safe(musb->controller); | ||
1994 | pm_runtime_enable(musb->controller); | ||
1995 | |||
1994 | /* The musb_platform_init() call: | 1996 | /* The musb_platform_init() call: |
1995 | * - adjusts musb->mregs | 1997 | * - adjusts musb->mregs |
1996 | * - sets the musb->isr | 1998 | * - sets the musb->isr |
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 53bd0e71d19f..a900c9877195 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c | |||
@@ -457,12 +457,27 @@ static int dsps_musb_init(struct musb *musb) | |||
457 | if (IS_ERR(musb->xceiv)) | 457 | if (IS_ERR(musb->xceiv)) |
458 | return PTR_ERR(musb->xceiv); | 458 | return PTR_ERR(musb->xceiv); |
459 | 459 | ||
460 | musb->phy = devm_phy_get(dev->parent, "usb2-phy"); | ||
461 | |||
460 | /* Returns zero if e.g. not clocked */ | 462 | /* Returns zero if e.g. not clocked */ |
461 | rev = dsps_readl(reg_base, wrp->revision); | 463 | rev = dsps_readl(reg_base, wrp->revision); |
462 | if (!rev) | 464 | if (!rev) |
463 | return -ENODEV; | 465 | return -ENODEV; |
464 | 466 | ||
465 | usb_phy_init(musb->xceiv); | 467 | usb_phy_init(musb->xceiv); |
468 | if (IS_ERR(musb->phy)) { | ||
469 | musb->phy = NULL; | ||
470 | } else { | ||
471 | ret = phy_init(musb->phy); | ||
472 | if (ret < 0) | ||
473 | return ret; | ||
474 | ret = phy_power_on(musb->phy); | ||
475 | if (ret) { | ||
476 | phy_exit(musb->phy); | ||
477 | return ret; | ||
478 | } | ||
479 | } | ||
480 | |||
466 | setup_timer(&glue->timer, otg_timer, (unsigned long) musb); | 481 | setup_timer(&glue->timer, otg_timer, (unsigned long) musb); |
467 | 482 | ||
468 | /* Reset the musb */ | 483 | /* Reset the musb */ |
@@ -502,6 +517,8 @@ static int dsps_musb_exit(struct musb *musb) | |||
502 | 517 | ||
503 | del_timer_sync(&glue->timer); | 518 | del_timer_sync(&glue->timer); |
504 | usb_phy_shutdown(musb->xceiv); | 519 | usb_phy_shutdown(musb->xceiv); |
520 | phy_power_off(musb->phy); | ||
521 | phy_exit(musb->phy); | ||
505 | debugfs_remove_recursive(glue->dbgfs_root); | 522 | debugfs_remove_recursive(glue->dbgfs_root); |
506 | 523 | ||
507 | return 0; | 524 | return 0; |
@@ -610,7 +627,7 @@ static int dsps_musb_reset(struct musb *musb) | |||
610 | struct device *dev = musb->controller; | 627 | struct device *dev = musb->controller; |
611 | struct dsps_glue *glue = dev_get_drvdata(dev->parent); | 628 | struct dsps_glue *glue = dev_get_drvdata(dev->parent); |
612 | const struct dsps_musb_wrapper *wrp = glue->wrp; | 629 | const struct dsps_musb_wrapper *wrp = glue->wrp; |
613 | int session_restart = 0; | 630 | int session_restart = 0, error; |
614 | 631 | ||
615 | if (glue->sw_babble_enabled) | 632 | if (glue->sw_babble_enabled) |
616 | session_restart = sw_babble_control(musb); | 633 | session_restart = sw_babble_control(musb); |
@@ -624,8 +641,14 @@ static int dsps_musb_reset(struct musb *musb) | |||
624 | dsps_writel(musb->ctrl_base, wrp->control, (1 << wrp->reset)); | 641 | dsps_writel(musb->ctrl_base, wrp->control, (1 << wrp->reset)); |
625 | usleep_range(100, 200); | 642 | usleep_range(100, 200); |
626 | usb_phy_shutdown(musb->xceiv); | 643 | usb_phy_shutdown(musb->xceiv); |
644 | error = phy_power_off(musb->phy); | ||
645 | if (error) | ||
646 | dev_err(dev, "phy shutdown failed: %i\n", error); | ||
627 | usleep_range(100, 200); | 647 | usleep_range(100, 200); |
628 | usb_phy_init(musb->xceiv); | 648 | usb_phy_init(musb->xceiv); |
649 | error = phy_power_on(musb->phy); | ||
650 | if (error) | ||
651 | dev_err(dev, "phy powerup failed: %i\n", error); | ||
629 | session_restart = 1; | 652 | session_restart = 1; |
630 | } | 653 | } |
631 | 654 | ||
@@ -687,7 +710,7 @@ static int dsps_create_musb_pdev(struct dsps_glue *glue, | |||
687 | struct musb_hdrc_config *config; | 710 | struct musb_hdrc_config *config; |
688 | struct platform_device *musb; | 711 | struct platform_device *musb; |
689 | struct device_node *dn = parent->dev.of_node; | 712 | struct device_node *dn = parent->dev.of_node; |
690 | int ret; | 713 | int ret, val; |
691 | 714 | ||
692 | memset(resources, 0, sizeof(resources)); | 715 | memset(resources, 0, sizeof(resources)); |
693 | res = platform_get_resource_byname(parent, IORESOURCE_MEM, "mc"); | 716 | res = platform_get_resource_byname(parent, IORESOURCE_MEM, "mc"); |
@@ -739,7 +762,10 @@ static int dsps_create_musb_pdev(struct dsps_glue *glue, | |||
739 | pdata.mode = get_musb_port_mode(dev); | 762 | pdata.mode = get_musb_port_mode(dev); |
740 | /* DT keeps this entry in mA, musb expects it as per USB spec */ | 763 | /* DT keeps this entry in mA, musb expects it as per USB spec */ |
741 | pdata.power = get_int_prop(dn, "mentor,power") / 2; | 764 | pdata.power = get_int_prop(dn, "mentor,power") / 2; |
742 | config->multipoint = of_property_read_bool(dn, "mentor,multipoint"); | 765 | |
766 | ret = of_property_read_u32(dn, "mentor,multipoint", &val); | ||
767 | if (!ret && val) | ||
768 | config->multipoint = true; | ||
743 | 769 | ||
744 | ret = platform_device_add_data(musb, &pdata, sizeof(pdata)); | 770 | ret = platform_device_add_data(musb, &pdata, sizeof(pdata)); |
745 | if (ret) { | 771 | if (ret) { |
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 883a9adfdfff..c3d5fc9dfb5b 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c | |||
@@ -2613,7 +2613,7 @@ static const struct hc_driver musb_hc_driver = { | |||
2613 | .description = "musb-hcd", | 2613 | .description = "musb-hcd", |
2614 | .product_desc = "MUSB HDRC host driver", | 2614 | .product_desc = "MUSB HDRC host driver", |
2615 | .hcd_priv_size = sizeof(struct musb *), | 2615 | .hcd_priv_size = sizeof(struct musb *), |
2616 | .flags = HCD_USB2 | HCD_MEMORY, | 2616 | .flags = HCD_USB2 | HCD_MEMORY | HCD_BH, |
2617 | 2617 | ||
2618 | /* not using irq handler or reset hooks from usbcore, since | 2618 | /* not using irq handler or reset hooks from usbcore, since |
2619 | * those must be shared with peripheral code for OTG configs | 2619 | * those must be shared with peripheral code for OTG configs |
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 763649eb4987..cc752d8c7773 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -516,7 +516,7 @@ static int omap2430_probe(struct platform_device *pdev) | |||
516 | struct omap2430_glue *glue; | 516 | struct omap2430_glue *glue; |
517 | struct device_node *np = pdev->dev.of_node; | 517 | struct device_node *np = pdev->dev.of_node; |
518 | struct musb_hdrc_config *config; | 518 | struct musb_hdrc_config *config; |
519 | int ret = -ENOMEM; | 519 | int ret = -ENOMEM, val; |
520 | 520 | ||
521 | glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL); | 521 | glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL); |
522 | if (!glue) | 522 | if (!glue) |
@@ -559,7 +559,10 @@ static int omap2430_probe(struct platform_device *pdev) | |||
559 | of_property_read_u32(np, "num-eps", (u32 *)&config->num_eps); | 559 | of_property_read_u32(np, "num-eps", (u32 *)&config->num_eps); |
560 | of_property_read_u32(np, "ram-bits", (u32 *)&config->ram_bits); | 560 | of_property_read_u32(np, "ram-bits", (u32 *)&config->ram_bits); |
561 | of_property_read_u32(np, "power", (u32 *)&pdata->power); | 561 | of_property_read_u32(np, "power", (u32 *)&pdata->power); |
562 | config->multipoint = of_property_read_bool(np, "multipoint"); | 562 | |
563 | ret = of_property_read_u32(np, "multipoint", &val); | ||
564 | if (!ret && val) | ||
565 | config->multipoint = true; | ||
563 | 566 | ||
564 | pdata->board_data = data; | 567 | pdata->board_data = data; |
565 | pdata->config = config; | 568 | pdata->config = config; |
diff --git a/drivers/usb/renesas_usbhs/Kconfig b/drivers/usb/renesas_usbhs/Kconfig index de83b9d0cd5c..ebc99ee076ce 100644 --- a/drivers/usb/renesas_usbhs/Kconfig +++ b/drivers/usb/renesas_usbhs/Kconfig | |||
@@ -6,6 +6,7 @@ config USB_RENESAS_USBHS | |||
6 | tristate 'Renesas USBHS controller' | 6 | tristate 'Renesas USBHS controller' |
7 | depends on USB_GADGET | 7 | depends on USB_GADGET |
8 | depends on ARCH_SHMOBILE || SUPERH || COMPILE_TEST | 8 | depends on ARCH_SHMOBILE || SUPERH || COMPILE_TEST |
9 | depends on EXTCON || !EXTCON # if EXTCON=m, USBHS cannot be built-in | ||
9 | default n | 10 | default n |
10 | help | 11 | help |
11 | Renesas USBHS is a discrete USB host and peripheral controller chip | 12 | Renesas USBHS is a discrete USB host and peripheral controller chip |