1. 20 Oct, 2013 5 commits
    • 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 12 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
    • Marek Vasut's avatar
      usb: mv_udc: Implement better QH accessor · b5cd45bf
      Marek Vasut authored
      
      
      The code for retrieving QH 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>
      b5cd45bf
    • Marek Vasut's avatar
      usb: mv_udc: Add cacheline length check · 5804b885
      Marek Vasut authored
      
      
      Check the length of system cacheline at compile-time and fail
      if the system uses too long cachelines.
      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>
      5804b885
    • Marek Vasut's avatar
      usb: mv_udc: Properly align the endpoint QH and qTD list · ab65da14
      Marek Vasut authored
      
      
      The endpoint QH list has to be aligned to 10-bit boundary. We also have
      to make sure the list is aligned on a cacheline boundary. Make sure it
      is. Furthermore, check if the memory allocation for the QH list didn't
      fail. Moveover, improve the comment about the QH list structure.
      
      Finally, the qTD item list has to be aligned only to 5-bit boundary, not
      10-bit as it is now, fix this as well.
      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>
      ab65da14
    • Marek Vasut's avatar
      usb: mv_udc: Move QH and qTD into mv_drv · ab52df19
      Marek Vasut authored
      
      
      Both the endpoint queue head and the endpoint item list is a controller
      specific thing. Move them both into controller private data.
      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>
      ab52df19
    • Marek Vasut's avatar
      usb: mv_udc: Init mv_drv.gadget.ops statically · fe48f058
      Marek Vasut authored
      
      
      There is no need to init this field at runtime, so init it statically.
      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>
      fe48f058