1. 18 Jan, 2015 17 commits
    • Rene Griessl's avatar
      usb: eth: asix88179: add ability to modify MAC address · 11933975
      Rene Griessl authored
      
      
      This patch enables U-Boot to modify the MAC address of the AX88179.
      Tested on RECS5250 (similar to Arndale5250)
      Signed-off-by: default avatarRene Griessl <rgriessl@cit-ec.uni-bielefeld.de>
      11933975
    • Hans de Goede's avatar
      musb-new: Add interrupt queue support · 904f2a83
      Hans de Goede authored
      
      
      Add interrupt queue support, so that a usb keyboard can be used without
      causing huge latencies.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      904f2a83
    • Hans de Goede's avatar
      musb-new: Add urb and hep parameters to construct_urb · accf04c2
      Hans de Goede authored
      
      
      Make construct_urb take an urb and hep parameter, rather then having it always
      operate on the file global urb and hep structs. This is a preperation patch
      for adding interrupt queue support.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      accf04c2
    • Hans de Goede's avatar
      musb-new: Properly remove a transfer from the schedule on timeout · b918a0c6
      Hans de Goede authored
      
      
      If a transfer / urb times-out, properly remove it from the schedule, rather
      then letting it sit on the ep head. This stops the musb code from getting
      confused and refusing to queue further transfers after a timeout.
      
      Tested by unplugging a usb-keyboard, replugging it and doing a usb-reset,
      before this commit the keyboard would not work after the usb-reset.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      b918a0c6
    • Hans de Goede's avatar
      musb-new: Fix reset sequence when in host mode · 90cdc103
      Hans de Goede authored
      
      
      This commit fixes a number of issues with the reset sequence of musb-new
      in host mode:
      
      1) Our usb device probe relies on a second device reset being done after the
      first descriptors read. Factor the musb reset code into a usb_reset_root_port
      function (and add this as an empty define for other controllers), and call
      this when a device has no parent.
      
      2) Just like with normal usb controllers there needs to be a delay after
      reset, for normal usb controllers, this is handled in hub_port_reset, add a
      delay to usb_reset_root_port.
      
      3) Sync the musb reset sequence with the upstream kernel, clear all bits of
      power except bits 4-7, and increase the time reset is asserted to 50 ms.
      
      With these fixes an usb keyboard I have now always enumerates properly, where
      as earlier it would only enumerare properly once every 5 tries.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      90cdc103
    • Hans de Goede's avatar
      musb-new: Fix interrupt transfers not working · e8672e3f
      Hans de Goede authored
      
      
      For bulk and ctrl transfers common/usb.c sets udev->status = USB_ST_NOT_PROC,
      but it does not do so for interrupt transfers.
      
      musb_uboot.c: submit_urb() however was waiting for USB_ST_NOT_PROC to become 0,
      and thus without anyone setting USB_ST_NOT_PROC would exit immediately for
      interrupt urbs, returning the urb status of EINPROGRESS as error.
      
      This commit fixes this, thereby also making usb_kbd.c work together with
      musb_new and CONFIG_SYS_USB_EVENT_POLL.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      e8672e3f
    • Hans de Goede's avatar
      musb-new: Use time based timeouts rather then cpu-cycles based timeouts · dc9a3912
      Hans de Goede authored
      
      
      CPU cycle based timeouts are no good, because how long they use depends on
      CPU speed. Instead use time based timeouts, and wait one second for a
      device connection to show up (per the USB spec), and wait USB_TIMEOUT_MS
      for various urbs to complete.
      
      This fixes "usb start" taking for ever when no device is plugged into the
      otg port.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      dc9a3912
    • Hans de Goede's avatar
      musb-new: Add sunxi musb controller support · 28a15ef7
      Hans de Goede authored
      
      
      This is based on Jussi Kivilinna's work for the linux-sunxi-3.4 kernel to use
      the kernels musb driver instead of Allwinners own custom driver.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      28a15ef7
    • Hans de Goede's avatar
      musb-new: Add register defines for different reg layout on sunxi · 0f8bc532
      Hans de Goede authored
      
      
      The sunxi SoCs also have a musb controller, but with a different register
      layout.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      0f8bc532
    • Hans de Goede's avatar
      usb: Do not log an error when no devices is plugged into a root-hub-less hcd · d906bbc2
      Hans de Goede authored
      
      
      Before this commit u-boot would print the following on boot with musb and
      no usb device plugged in:
      
      starting USB...
      USB0:   Port not available.
      USB error: all controllers failed lowlevel init
      
      This commit changes this to:
      
      starting USB...
      USB0:   Port not available.
      
      Which is the correct thing to do since the low-level init went fine.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      d906bbc2
    • Hans de Goede's avatar
      usb: Fix usb_kbd_deregister when console-muxing is used · 3cbcb289
      Hans de Goede authored
      
      
      When iomuxing is used we must not only deregister the device with stdio.c,
      but also remove the reference to the device in the console_devices array
      used by console-muxing. Add a call to iomux_doenv to usb_kbd_deregister to
      update console_devices, which will drop the reference.
      
      This fixes the console filling with "Failed to enqueue URB to controller"
      messages after a "usb stop force", or when the USB keyboard is gone after a
      "usb reset".
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      3cbcb289
    • Hans de Goede's avatar
      usb: Add an interval parameter to create_int_queue · 8bb6c1d1
      Hans de Goede authored
      
      
      Currently create_int_queue is only implemented by the ehci code, and that
      does not honor interrupt intervals, but other drivers which might also want
      to implement create_int_queue may honor intervals, so add an interval param.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      8bb6c1d1
    • Hans de Goede's avatar
      config_distro_bootcmd.h: Remove unnecessary magic to avoid repeated USB scans · a1d31077
      Hans de Goede authored
      
      
      Now that "usb start" will only start usb if not already started, we can simply
      call "usb start" whenever we (may) need access to usb devices, and it will only
      actually scan the bus at the first call.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      a1d31077
    • Hans de Goede's avatar
      USB: make "usb start" start usb only once · b5072264
      Hans de Goede authored
      
      
      Currently we've this magic in include/config_distro_bootcmd.h to avoid
      scanning the usb bus multiple times.
      
      And it does not work when also using an usb keyboard because then the
      preboot command has already scanned the bus, so we're still scanning it
      twice.
      
      This commit makes "usb start" only start usb if it is no already started,
      allowing us to remove all the magic for it from include/config_distro_bootcmd.h
      and just call it unconditionally.
      
      This also causes "usb start" and "usb reset" to actually do what their
      different names suggest, rather then both of them doing exactly the same.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      b5072264
    • Alex Sadovsky's avatar
      usb: gadget: pxa25x_udc: fix use-before-initialized bug · c0978a94
      Alex Sadovsky authored
      
      
      Fix use-before-initialized bug in pxa25x_udc driver.
      
      Function usb_gadget_register_driver calls udc_disable,
      and udc_disable calls pullup_off that uses dev->mach->udc_command.
      But dev->mach is initialized in usb_gadget_register_driver after
      calling udc_disable. This patch fixes the order of initialization.
      Signed-off-by: default avatarAlex Sadovsky <Nable.MainInbox@googlemail.com>
      c0978a94
    • Stefan Roese's avatar
      usb: gadget: f_dfu: Add get_alt function to pass the USB compliance test · 1fd81b7c
      Stefan Roese authored
      
      
      Without this function the USB compliance test (USB 2.0 Command Verifier) will
      fail in the "Interface Descriptor Test" with this error message:
      
      FAIL
      (1.2.51) A successful GetInterface request must return the alternate setting
      set by a prior call to SetInterface.
      
      Lets add this function to read back the value so that the DFU device fully
      passes the USB compliance test.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Roger Meier <r.meier@siemens.com>
      Cc: Samuel Egli <samuel.egli@siemens.com>
      Cc: Enrico Leto <enrico.leto@siemens.com>
      Acked-by: default avatarHeiko Schocher <hs@denx.de>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      1fd81b7c
    • Stefan Roese's avatar
      usb: gadget: composite: Fix NULL pointer crash in USB compliance test · 87ed6b10
      Stefan Roese authored
      
      
      On the DXR2 board (AM335x using MUSB) the USB compliance test suite
      (USB 2.0 Command Verifier) will cause the board to crash and reset
      upon the "BOS Descriptor Test - Addressed state". Here the output
      from the DRX2 while running this test:
      
      GADGET DRIVER: usb_dnl_dfu
      musb-hdrc: peripheral reset irq lost!
      composite_setup (776)
      data abort
      pc : [<87f693ac>]          lr : [<87f6911c>]
      sp : 86f33a58  ip : 00000000     fp : 86f3bbac
      r10: 00000f00  r9 : 86f33ef4     r8 : 86f37da8
      r7 : 00000005  r6 : 86f33a90     r5 : 00000000  r4 : 86f37e30
      r3 : 00000000  r2 : 00000000     r1 : 87f9c888  r0 : 00000016
      Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32
      Resetting CPU ...
      
      resetting ...
      
      By adding the case statement for USB_DT_BOS and therefore not running
      into the default case (jump to unkown label) this crash is fixed.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Roger Meier <r.meier@siemens.com>
      Cc: Samuel Egli <samuel.egli@siemens.com>
      Cc: Enrico Leto <enrico.leto@siemens.com>
      Acked-by: default avatarHeiko Schocher <hs@denx.de>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      87ed6b10
  2. 16 Jan, 2015 4 commits
  3. 15 Jan, 2015 18 commits
  4. 14 Jan, 2015 1 commit