| fd1bd21b | 17-Jun-2015 |
Hans de Goede <hdegoede@redhat.com> |
dm: usb: Do not assume that first child is always a hub
On some single port (otg) controllers there is no emulated root hub, so the first child (if any) may be one of: UCLASS_MASS_STORAGE, UCLASS_US
dm: usb: Do not assume that first child is always a hub
On some single port (otg) controllers there is no emulated root hub, so the first child (if any) may be one of: UCLASS_MASS_STORAGE, UCLASS_USB_DEV_GENERIC or UCLASS_USB_HUB.
All three of these (and in the future others) are suitable for our purposes, remove the check for the device being a hub, and add a check to deal with the fact that there may be no child-dev.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| b2f219b0 | 17-Jun-2015 |
Hans de Goede <hdegoede@redhat.com> |
dm: usb: Allow usb host drivers to implement usb_reset_root_port
Allow usb uclass host drivers to implement usb_reset_root_port, this is used by single port usb hosts which do not emulate a hub, suc
dm: usb: Allow usb host drivers to implement usb_reset_root_port
Allow usb uclass host drivers to implement usb_reset_root_port, this is used by single port usb hosts which do not emulate a hub, such as otg controllers.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 9b510df7 | 01-Jul-2015 |
Hans de Goede <hdegoede@redhat.com> |
dm: usb: Rename usb_find_child to usb_find_emul_child
Now that we unbind usb devices from usb_stop() usb_find_child() is only necessary to deal with emulated usb devices.
Rename it to make this cle
dm: usb: Rename usb_find_child to usb_find_emul_child
Now that we unbind usb devices from usb_stop() usb_find_child() is only necessary to deal with emulated usb devices.
Rename it to make this clear and add a #ifdef to make it a nop in other cases.
Note the #ifdef turns usb_find_emul_child() into a nop, rather then not building it and adding another #ifdef to the caller, this is done this way because adding a #ifdef to the caller is somewhat hairy.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 6cda3695 | 01-Jul-2015 |
Hans de Goede <hdegoede@redhat.com> |
dm: usb: Use device_unbind_children to clean up usb devs on stop
On an usb stop instead of leaving orphan usb devices behind simply remove them.
The result of this commit is best seen in the output
dm: usb: Use device_unbind_children to clean up usb devs on stop
On an usb stop instead of leaving orphan usb devices behind simply remove them.
The result of this commit is best seen in the output of "dm tree" after plugging out an usb hub with 2 devices plugges in and plugging in a keyb. instead, before this commit the output would be:
usb [ + ] `-- sunxi-musb usb_hub [ ] |-- usb_hub usb_mass_st [ ] | |-- usb_mass_storage usb_dev_gen [ ] | `-- generic_bus_0_dev_3 usb_dev_gen [ + ] `-- generic_bus_0_dev_1
Notice the non active usb_hub child and its 2 non active children. The first child being non-active as in this example also causes usb_get_dev_index to return NULL when probing the first child, which results in the usb kbd code not binding to the keyboard.
With this commit in place the output after swapping and "usb reset" is:
usb [ + ] `-- sunxi-musb usb_dev_gen [ + ] `-- generic_bus_0_dev_1
As expected, and usb_get_dev_index works properly and the keyboard works.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 9eb72dd1 | 17-Jun-2015 |
Hans de Goede <hdegoede@redhat.com> |
usb: usb_setup_device: Drop unneeded portnr function argument
Drop the unneeded portnr function argument, the portnr is part of the usb_device struct which is passed via the dev argument.
Signed-of
usb: usb_setup_device: Drop unneeded portnr function argument
Drop the unneeded portnr function argument, the portnr is part of the usb_device struct which is passed via the dev argument.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| bf495712 | 13-May-2015 |
Hans de Goede <hdegoede@redhat.com> |
usb: ohci: Add support for interrupt queues
Add support for interrupt queues to the ohci hcd code, bringing it inline with the ehci and musb-new(host) code.
Signed-off-by: Hans de Goede <hdegoede@r
usb: ohci: Add support for interrupt queues
Add support for interrupt queues to the ohci hcd code, bringing it inline with the ehci and musb-new(host) code.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de>
show more ...
|
| d563e62c | 13-May-2015 |
Hans de Goede <hdegoede@redhat.com> |
usb: ohci: Add an ohci_alloc_urb() function
Add an ohci_alloc_urb() function, this is a preparation patch for adding interrupt queue support.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Revi
usb: ohci: Add an ohci_alloc_urb() function
Add an ohci_alloc_urb() function, this is a preparation patch for adding interrupt queue support.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de>
show more ...
|
| 44dbc330 | 13-May-2015 |
Hans de Goede <hdegoede@redhat.com> |
usb: ohci: Do not reuse ed for interrupt endpoints of different devices
When submitting interrupt packets to an endpoint we only link in the ed once to avoid some races surrounding unlinking of peri
usb: ohci: Do not reuse ed for interrupt endpoints of different devices
When submitting interrupt packets to an endpoint we only link in the ed once to avoid some races surrounding unlinking of periodic endpoints, but we share one ohci_device struct / one set of ed-s for all devices, which means that if we have an interrupt endpoint at endpoint 1 with one device, and a non interrupt endpoint 1 with another device we end up with the same ed linked into both the periodic and async lists, which is not good (tm).
This commit switches over to using separate ohci_device structs, and thus separate ed-s for devices with interrupt endpoints, fixing this.
This fixes e.g. matching a usb storage device and keyboard on the same usb-1 hub not working.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de>
show more ...
|
| 6a72e804 | 10-May-2015 |
Hans de Goede <hdegoede@redhat.com> |
sunxi: ohci: Add ohci usb host controller support
This commit adds support for the OHCI companion controller, which makes usb-1 devices directly plugged into to usb root port work.
Note for now thi
sunxi: ohci: Add ohci usb host controller support
This commit adds support for the OHCI companion controller, which makes usb-1 devices directly plugged into to usb root port work.
Note for now this switches usb-keyboard support for sunxi back from int-queue support to the old interrupt polling method. Adding int-queue support to the ohci code and switching back to int-queue support is in the works.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Ian Campbell <ijc@hellion.org.uk>
show more ...
|
| 8d837a1f | 10-May-2015 |
Hans de Goede <hdegoede@redhat.com> |
sunxi: ehci: Convert to the driver-model
Convert sunxi-boards which use the sunxi-ehci code to the driver-model.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromi
sunxi: ehci: Convert to the driver-model
Convert sunxi-boards which use the sunxi-ehci code to the driver-model.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Ian Campbell <ijc@hellion.org.uk>
show more ...
|