05 Aug, 2015

14 commits

  • The code in question polls an USB port status via USB_REQ_GET_STATUS
    to determine whether there is a device on the port or not. The way to
    figure that out is to check two bits. Those are wPortChange[0] and
    wPortStatus[0].

    The wPortChange[0] indicates whether some kind of a connection status
    change happened on a port (a device was plugged or unplugged). The
    wPortStatus[0] bit indicates the status of the connection (plugged or
    unplugged).

    The current code tests whether wPortChange[0] == wPortStatus[0] and
    if that's the case, considers the loop polling for the presence of a
    USB device on port finished.

    This works for most USB sticks, since they come up really quickly and
    trigger the USB port change detection before the first iteration of the
    detection loop happens. Thus, both wPortChange[0] and wPortStatus[0]
    are set to 1 and thus equal. The loop is existed in it's first iteration
    and the stick is detected correctly.

    The problem is with some obscure USB sticks, which take some time before
    they pop up on the bus after the port was enabled. In this case, both
    the wPortChange[0] and wPortStatus[0] are 0. They are equal again, so
    the loop again exits in the first iteration, but this is incorrect, as
    such USB stick didn't have the opportunity to get detected on the bus.

    Rework the code such, that it checks for wPortChange[0] first to test
    if any connection change happened at all. If no change occured, keep
    polling. If a change did occur, test the wPortStatus[0] to see there is
    some device present on the port and only if this is the case, break out
    of the polling loop.

    This patch also trims down the duration of the polling loop from 10s
    per port to 1s per port. This is still annoyingly long, but there is
    no better option in case of U-Boot unfortunatelly. This change will
    most likely increase the duration of 'usb start' on some platforms,
    but this is needed to fix a bug.

    Signed-off-by: Marek Vasut
    Cc: Simon Glass
    Cc: Hans de Goede

    Marek Vasut
     
  • This patch fixes operation of our on-board AX88772B chip without EEPROM
    but with a ethaddr coming from the regular U-Boot environment. This is
    a forward port of some remaining parts initially implemented by
    Antmicro.

    Signed-off-by: Marcel Ziswiler
    Acked-by: Marek Vasut

    Marcel Ziswiler
     
  • USB_KEYBOARD is now defined in drivers/usb/Kconfig, drop our own duplicate
    definition.

    Signed-off-by: Hans de Goede

    Hans de Goede
     
  • usb_stor_reset is only defined when USB storage support is enabled, thus the
    function is not declared when such support is missing.

    Signed-off-by: Paul Kocialkowski

    Paul Kocialkowski
     
  • This adds some config options to the sunxi-common config to enable the USB
    download gadget and the fastboot and USB mass storage functions.

    Signed-off-by: Paul Kocialkowski

    Paul Kocialkowski
     
  • Currently, the second use of a gadget will fail, while the first one works.

    Forcing the EP0 at every enable fix this issue.

    Signed-off-by: Maxime Ripard

    Maxime Ripard
     
  • Now that some things were updated in Kconfig, they should be reflected on the
    sunxi-common config too.

    Signed-off-by: Paul Kocialkowski

    Paul Kocialkowski
     
  • Now that the musb-new driver has a Kconfig, we can move Kconfig options to
    enable controllers to it, so that it's easier in e.g. menuconfig.

    In addition, this allows declaring support for USB_MUSB_HOST/GADGET in
    defconfigs instead of the USB_MUSB_SUNXI controller, that will get selected
    automatically when needed.

    Signed-off-by: Paul Kocialkowski

    Paul Kocialkowski
     
  • Having MUSB_HOST and MUSB_GADGET in Kconfig allows more flexibility with regard
    to what Kconfig options to enable, such as USB_STORAGE or USB_KEYBOARD.

    Signed-off-by: Paul Kocialkowski

    Paul Kocialkowski
     
  • USB-related options are usually prefixed with CONFIG_USB and platform-specific
    adaptation for the MUSB controller already have a CONFIG_USB_MUSB prefix, so
    this switches all MUSB-related options to a CONFIG_USB_MUSB prefix, for
    consistency.

    Signed-off-by: Paul Kocialkowski

    Paul Kocialkowski
     
  • There is no particular reason why the USB Kconfig option should be specific to
    host mode. In prevision of adding MUSB host and gadget to Kconfig, this moves
    the title and help message of the USB Kconfig option to a more generic format.

    Adding comments to the usb Kconfig allows for a better separation and more
    readability in generated configs and in menuconfig.

    Signed-off-by: Paul Kocialkowski

    Paul Kocialkowski
     
  • The USB_ARCH_HAS_HCD currently serves no purpose and adds some confusion to the
    required Kconfig options that are required to have USB support.

    Dropping it makes things easier and doesn't break anything, since it was unused
    anyways.

    Signed-off-by: Paul Kocialkowski

    Paul Kocialkowski
     
  • This patch makes the dwc2 controller like ehci / ohci / xhci controllers
    by calling the board_usb_init() function from usb_lowlevel_init.

    This can then be implemented by specific platforms to initialise
    their USB hardware (phys / clocks etc).

    Signed-off-by: Peter Griffin

    Peter Griffin
     
  • Tom Rini
     

04 Aug, 2015

24 commits


03 Aug, 2015

1 commit


02 Aug, 2015

1 commit