1. 20 Oct, 2013 10 commits
    • Troy Kisky's avatar
      usb: gadget: mv_udc: flush item before head · 5fc2e997
      Troy Kisky authored
      
      
      Make sure the transfer descriptor is flushed
      before the queue is updated so that the controller
      will not see old information.
      Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
      5fc2e997
    • Troy Kisky's avatar
      usb: gadget: mv_udc: set is_dualspeed = 1 · 5a904430
      Troy Kisky authored
      
      
      This controller support full and high speed.
      Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
      5a904430
    • Troy Kisky's avatar
      usb: gadget: mv_udc: fix typo in error message · d0928794
      Troy Kisky authored
      
      
      Change 'nfo=' to 'info='
      Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
      d0928794
    • Troy Kisky's avatar
      usb: gadget: ether: return error from rx_submit if no request · 71fc5f91
      Troy Kisky authored
      
      
      This prevents a crash if tftpboot is given a bad filename.
      
      rx_req will be released by eth_reset_config
      which is called by eth_disconnect,
      which is called using the .disconnect member of usb_gadget_driver by mv_pullup in mv_udc
      which is called using the .pullup member of usb_gadget_ops by usb_gadget_disconnect
      which is called by usb_eth_halt
      which is called using the .halt member of eth_device by eth_halt
      which is called by TftpHandler when TFTP_ERR_FILE_NOT_FOUND or TFTP_ERR_ACCESS_DENIED occurs
      
      I trigger this with the following commands
      setenv ipaddr 10.0.0.2 && setenv netmask 255.255.255.0 && setenv serverip 10.0.0.1
      setenv usbnet_devaddr 00:11:22:33:44:55 && setenv usbnet_hostaddr 00:aa:bb:cc:dd:ee
      setenv ethprime usb_ether && setenv ethact usb_ether && setenv ncip 10.0.0.1
      tftpboot 10800000 10.0.0.1:missing_file
      Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
      71fc5f91
    • Troy Kisky's avatar
      usb: gadget: ether set wMaxPacketSize · 43880ce5
      Troy Kisky authored
      
      
      set wMaxPacketSize for full speed descriptors
      fs_source_desc, fs_sink_desc to 64.
      
      Full-speed bulk endpoint can have a maximum packet size of
      8, 16, 32, or 64 bytes, so choice 64.
      
      The hs_source_desc, hs_sink_desc, already have their wMaxPacketSize
      set to 512. That is the only legal value for high speed bulk endpoints.
      
      Strictly speaking, this patch is not needed because
      usb_ep_autoconfig will call ep_matches which will
      override wMaxPacketSize for BULK endpoints only with
      the size associated with the endpoint setup by the udc driver.
      But if you want to rely on this, you may as well combine the
      full speed descriptor with the high speed descriptor to
      minimize confusion.
      Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
      43880ce5
    • Dan Murphy's avatar
      OMAP5: USB: Add OMAP xHCI file and header · 2d2358ac
      Dan Murphy authored
      
      
      Add the OMAP file for the xHCI Host controller
      This code will initilialize the proper components within the
      OMAP5 to enable the xHCI host controller.
      Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
      2d2358ac
    • Julius Werner's avatar
      exynos: usb: Switch USB VBUS GPIOs to be device tree configured · 4a271cb1
      Julius Werner authored
      
      
      Some Exynos boards, such as the SMDK5250, control USB port power through
      a GPIO pin. For now this had been hardcoded in the exynos5-dt board
      file, but not all boards use the same pin, requiring local changes to
      support different boards.
      
      This patch moves the GPIO initialization into the USB host controller
      drivers which they belong to, and uses the samsung,vbus-gpio parameter
      in the device tree to configure it.
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      Signed-off-by: default avatarVivek Gautam <gautam.vivek@samsung.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Minkyu Kang <mk7.kang@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      4a271cb1
    • Vivek Gautam's avatar
      USB: XHCI: Add xHCI host controller support for Exynos5 · 13194f3b
      Vivek Gautam authored
      
      
      This adds driver layer for xHCI controller in Samsung's
      exynos5 soc. This interacts with xHCI host controller stack.
      Signed-off-by: default avatarVikas C Sajjan <vikas.sajjan@samsung.com>
      Signed-off-by: default avatarVivek Gautam <gautam.vivek@samsung.com>
      Cc: Julius Werner <jwerner@chromium.org>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Minkyu Kang <mk7.kang@samsung.com>
      Cc: Dan Murphy <dmurphy@ti.com>
      Cc: Marek Vasut <marex@denx.de>
      13194f3b
    • Vivek Gautam's avatar
      USB: xHCI: Add stack support for xHCI · 5853e133
      Vivek Gautam authored
      
      
      This adds stack layer for eXtensible Host Controller Interface
      which facilitates use of USB 3.0 in host mode.
      
      Adapting xHCI host controller driver in linux-kernel
      by Sarah Sharp to needs in u-boot.
      
      Initial porting from Linux kernel version 3.4, with following
      top commit history of drivers/usb/host/xhci* :
      cf84055 xHCI: Cleanup isoc transfer ring when TD length mismatch found
      
      This adds the basic xHCI host controller driver with bare minimum
      features:
      - Control/Bulk transfer support has been added with required
        infrastructure for necessary xHC data structures.
      - Stream protocol hasn't been supported yet.
      - No support for quirky devices has been added.
      Signed-off-by: default avatarVikas C Sajjan <vikas.sajjan@samsung.com>
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      Signed-off-by: default avatarVivek Gautam <gautam.vivek@samsung.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Minkyu Kang <mk7.kang@samsung.com>
      Cc: Dan Murphy <dmurphy@ti.com>
      Cc: Marek Vasut <marex@denx.de>
      5853e133
    • Vivek Gautam's avatar
      usb: Move 'bmRequestType' USB device request macros from EHCI header · e3d7440c
      Vivek Gautam authored
      
      
      Macros defining bmRequestType field of USB device request,
      given in table 9.2 USB 2.0 spec, are rather generic macros
      which can be further used by other Host controller stacks.
      So moving them to usb_defs header.
      Signed-off-by: default avatarVivek Gautam <gautam.vivek@samsung.com>
      Cc: Julius Werner <jwerner@chromium.org>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Minkyu Kang <mk7.kang@samsung.com>
      Cc: Dan Murphy <dmurphy@ti.com>
      Cc: Marek Vasut <marex@denx.de>
      e3d7440c
  2. 14 Oct, 2013 3 commits
  3. 10 Oct, 2013 1 commit
  4. 07 Oct, 2013 1 commit
    • Andrew Murray's avatar
      usb: Fix error handling in musb_hcd.c · ddd025bb
      Andrew Murray authored
      
      
      The wait_until_[rx|tx]ep_ready functions return a u8 to indicate success
      containing the value 0, 1 or -1. This patch changes the return type to an
      int to accommodate the negative return values.
      
      These functions are used in the file using calls such as if (!wait_until...
      Where a -1 is returned it is mishandled and treated as success instead of
      a CRC error. This patch addresses this.
      
      Cc: Marek Vasut <marex@denx.de>
      Cc: Tom Rini <trini@ti.com>
      Signed-off-by: default avatarAndrew Murray <amurray@embedded-bits.co.uk>
      Acked-by: default avatarMarek Vasut <marex@denx.de>
      ddd025bb
  5. 27 Sep, 2013 1 commit
    • Julius Werner's avatar
      usb: ehci: Fix test mode for connected ports · 5077f96f
      Julius Werner authored
      
      
      The EHCI controller has some very specific requirements for the USB 2.0
      port test modes, which were not closely followed in the initial test
      mode commit. It demands that the host controller is completely shut down
      (all ports suspended, Run/Stop bit unset) when activating test mode, and
      will not work on an already enumerated port.
      
      This patch fixes that by introducing a new ehci_shutdown() function that
      closely follows the procedure listed in EHCI 4.14. Also, when we have
      such a function anyway, we might as well also use it in
      usb_lowlevel_stop() to make the normal host controller shutdown cleaner.
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      5077f96f
  6. 24 Sep, 2013 7 commits
  7. 26 Aug, 2013 6 commits
  8. 22 Aug, 2013 1 commit
  9. 19 Aug, 2013 2 commits
  10. 15 Aug, 2013 1 commit
  11. 29 Jul, 2013 7 commits
    • Nikita Kiryanov's avatar
      ehci-hcd: fix memory leak in lowlevel init · 8bc36036
      Nikita Kiryanov authored
      
      
      usb_lowlevel_init() allocates a new periodic_list each time it is invoked,
      without freeing the original list. Since it is initialized later on in the code,
      just reuse the first-allocated list in future invocations of usb_lowlevel_init.
      
      Cc: Marek Vasut <marex@denx.de>
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      8bc36036
    • Roger Quadros's avatar
      usb: ehci-omap: Don't softreset USB High-speed Host (UHH) Module · bb1f327d
      Roger Quadros authored
      
      
      Fixes NFS root problems with Beagle (3530 ES1.0) when used with
      external USB-ethernet adapter and "USB start" command used within
      u-boot.
      
      Soft resetting the UHH module causes instability issues on
      all OMAPs so we just avoid it.
      
      See OMAP36xx Errata
        i571: USB host EHCI may stall when entering smart-standby mode
        i660: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
      
      On OMAP4/5, soft-resetting the UHH module can put it into
      Smart-Idle mode and lead to a deadlock.
      
      On OMAP3 this doesn't seem to be the case but still instabilities
      are observed on beagle (3530 ES1.0) if soft-reset is used.
       e.g. NFS root failures with Linux kernel.
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      bb1f327d
    • Lukasz Majewski's avatar
      dfu: Implementation of target reset after communication with dfu-util's -R switch · 6bed7ce5
      Lukasz Majewski authored
      
      
      This patch extends dfu code to support transmission with -R switch
      specified at dfu-util.
      
      When -R is specified, the extra USB_REQ_DFU_DETACH request is sent after
      successful data transmission. Then dfu resources are released and reset
      command is issued.
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      6bed7ce5
    • Marek Vasut's avatar
      usb: mv_udc: Add bounce buffer · 6dd30af0
      Marek Vasut authored
      
      
      The requests sent to the controller are not properly cache aligned
      most of the time, thus implement a simple bounce buffer to avoid
      problem with cache.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Lei Wen <leiwen@marvell.com>
      Cc: Otavio Salvador <otavio@ossystems.com.br>
      Cc: Stefano Babic <sbabic@denx.de>
      6dd30af0
    • Marek Vasut's avatar
      usb: mv_udc: Add proper cache management · f19a343e
      Marek Vasut authored
      
      
      Implement functions to flush/invalidate dcache over QH and qTDs
      and make use of them where appropriate. Also use them to replace
      the old incorrect cache management attempt. This is the first step
      towards making this driver work with data cache enabled.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Lei Wen <leiwen@marvell.com>
      Cc: Otavio Salvador <otavio@ossystems.com.br>
      Cc: Stefano Babic <sbabic@denx.de>
      f19a343e
    • Marek Vasut's avatar
      usb: mv_udc: Implement better qTD item accessor · ede709c0
      Marek Vasut authored
      
      
      The code for retrieving qTD item for particular endpoint is hard
      to understand, moreover it's duplicated all over the driver. Move
      the code into single nice and documented function.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Lei Wen <leiwen@marvell.com>
      Cc: Otavio Salvador <otavio@ossystems.com.br>
      Cc: Stefano Babic <sbabic@denx.de>
      ede709c0
    • Marek Vasut's avatar
      usb: mv_udc: Improve allocation of qTD items · 8a095a68
      Marek Vasut authored
      
      
      Allocate the qTD items all at once instead of allocating them
      separately. Moreover, make sure each qTD is properly aligned
      to 32-bytes boundary and that cache can be safely flushed over
      each qTD touple.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Lei Wen <leiwen@marvell.com>
      Cc: Otavio Salvador <otavio@ossystems.com.br>
      Cc: Stefano Babic <sbabic@denx.de>
      8a095a68