1. 24 4月, 2012 1 次提交
  2. 11 4月, 2012 1 次提交
  3. 02 3月, 2012 2 次提交
  4. 28 2月, 2012 1 次提交
    • F
      usb: dwc3: gadget: use generic map/unmap routines · 0fc9a1be
      Felipe Balbi 提交于
      those routines have everything we need to map/unmap
      USB requests and it's better to use them.
      
      In order to achieve that, we had to add a simple
      change on how we allocate and use our setup buffer;
      we cannot allocate it from coherent anymore otherwise
      the generic map/unmap routines won't be able to easily
      know that the GetStatus request already has a DMA
      address.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      0fc9a1be
  5. 13 2月, 2012 1 次提交
    • F
      usb: dwc3: convert TRBs into bitshifts · f6bafc6a
      Felipe Balbi 提交于
      this will get rid of a useless memcpy on
      IRQ handling, thus improving driver performance.
      
      Tested with OMAP5430 running g_mass_storage on
      SuperSpeed and HighSpeed.
      
      Note that we are removing the little endian access
      of the TRB and all accesses will be in System endianness,
      if there happens to be a system in BE, bit 12 of GSBUSCFG0
      should be set so that HW does byte invariant BE accesses
      when fetching TRBs.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f6bafc6a
  6. 10 2月, 2012 1 次提交
    • G
      usb: dwc3: ep0: fix SetFeature(TEST) · 3b637367
      Gerard Cauvy 提交于
      When host requests us to enter a test mode,
      we cannot directly enter the test mode before
      Status Phase is completed, otherwise the core
      will never be able to deliver the Status ZLP
      to host, because it has already entered the
      requested Test Mode.
      
      In order to fix the error, we move the actual
      start of Test Mode right after we receive
      Transfer Complete event of the status phase.
      Signed-off-by: NGerard Cauvy <g-cauvy1@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      3b637367
  7. 06 2月, 2012 3 次提交
  8. 12 12月, 2011 15 次提交
  9. 05 10月, 2011 5 次提交
  10. 09 9月, 2011 10 次提交
    • F
      usb: dwc3: ep0: introduce ep0_expect_in flag · 55f3fba6
      Felipe Balbi 提交于
      This flag will tell us which direction we're
      expecting on the next (data or status) phase.
      
      It will help us catching errors of host going
      crazy and requesting data of the wrong direction.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      55f3fba6
    • F
      usb: dwc3: define ScaleDown macro helper · f78d32e7
      Felipe Balbi 提交于
      We must ensure that those bits aren't set as
      they should only be used in simulation.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f78d32e7
    • F
      usb: dwc3: Fix definition of DWC3_GCTL_U2RSTECN · f4aadbe4
      Felipe Balbi 提交于
      that should be 1 << 16, not 16. Caused so many
      problems and we never caught it before.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f4aadbe4
    • F
      usb: dwc3: core: add ep0_next_event field · b53c772d
      Felipe Balbi 提交于
      this field will hold the next expected event.
      
      In certain cases, host might fall into some error
      condition and ask from us the wrong Control phase.
      On such situations, we should stall and restart.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      b53c772d
    • F
      usb: dwc3: drop EP0_STALL state · 0b7836a9
      Felipe Balbi 提交于
      Whenever we issue a Set Stall command on EP0,
      the state machine will be restarted and Stall
      is cleared automatically, when core receives
      the next SETUP packet.
      
      There's no need to track that EP0_STALL state.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      0b7836a9
    • S
      usb: dwc3: gadget: rework the dequeue on RESET & DISCONNECT · 624407f9
      Sebastian Andrzej Siewior 提交于
      - since a while we are disabling an endpoint and purging every requests on
        RESET and DISCONNECT which leads to a warning since the endpoint was
        disabled twice (once by the UDC, and second time by the gadget). I
        think UDC should nuke all requests because all those requests
        become invalid. It's gadget driver's responsability, though, to disable
        its used endpoints. This is done by merging dwc3_stop_active_transfer()
        and dwc3_gadget_nuke_reqs() into dwc3_remove_requests().
      
      - dwc3_stop_active_transfer() is now no longer called unconditionaly.
        This has the advantage that it is always called to disable an active
        transfer which means if res_trans_idx 0 than something went wrong and
        it is an error condition because we can't clean up the requests.
      
      - Remove the DWC3_EP_WILL_SHUTDOWN which was introduced while
        introducing the command complete part for dequeue. All requests on
        req_queued list should be removed during the dwc3_cleanup_done_reqs()
        callback so there is no reason to go through the list again.
        We consider it an error condition if requests are still on this
        list since we never queue TRB without LST=1 (the last requests has
        always LST=1, there are no requests with LST=0 behind it).
      
      [ balbi@ti.com : reworked commit log a bit, made patch apply ]
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      624407f9
    • F
      usb: dwc3: ep0: simplify EP0 state machine · c7fcdeb2
      Felipe Balbi 提交于
      The DesignWare USB3 core tells us which phase
      of a control transfer should be started, it
      also tells us which physical endpoint needs
      that transfer.
      
      With these two informations, we have all we
      need to simply EP0 handling quite a lot and
      get rid rid of the SW state machine tracking
      ep0 states.
      
      For achieving this perfectly, we needed to
      add support for situations where we get
      XferNotReady while endpoint is still busy
      and XferNotReady while gadget driver still
      hasn't queued a request.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c7fcdeb2
    • F
      usb: dwc3: core: add flag for EP0 direction · 984f66a6
      Felipe Balbi 提交于
      Add a flag to keep track of ep0 direction.
      This flag will be used on a following patch.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      984f66a6
    • F
      usb: dwc3: add a bounce buffer for control endpoints · 5812b1c2
      Felipe Balbi 提交于
      This core cannot handle OUT transfers which aren't
      aligned to wMaxPacketSize, but that can happen at
      least on control endpoint with the USB Audio Class.
      
      This patch adds a bounce buffer to be used on the
      case of a non-aligned ep0out request is queued.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      5812b1c2
    • F
      usb: dwc3: core: add defines for XferNotReady event on Control EPs · dc137f01
      Felipe Balbi 提交于
      The status field of the Transfer Not Read event
      is different on Control Endpoints. On this patch
      we are just adding the defines to be used on a
      later patch which will re-work the control endpoint
      handling.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      dc137f01