1. 02 6月, 2016 17 次提交
  2. 27 4月, 2016 3 次提交
  3. 04 3月, 2016 4 次提交
    • P
      usb: musb: core: added missing const qualifier to musb_hdrc_platform_data::config · ead22caf
      Petr Kulhavy 提交于
      The musb_hdrc_platform_data::config was defined as a non-const pointer.
      However some drivers (e.g. the ux500) set up this pointer to point to a
      static structure, which is potentially dangerous. Since the musb core
      uses the pointer in a read-only manner the const qualifier was added to
      protect the content of the config.
      Signed-off-by: NPetr Kulhavy <petr@barix.com>
      Acked-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NBin Liu <b-liu@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@kernel.org>
      ead22caf
    • E
      usb: musb: sunxi: support module autoloading · 5266a760
      Emilio López 提交于
      MODULE_DEVICE_TABLE() is missing, so the module isn't auto-loading on
      sunxi systems using the OTG controller. This commit adds the missing
      line so it loads automatically when building it as a module and running
      on a system with an USB OTG port.
      Signed-off-by: NEmilio López <emilio.lopez@collabora.co.uk>
      Signed-off-by: NFelipe Balbi <balbi@kernel.org>
      5266a760
    • A
      usb: musb/ux500: remove duplicate check for dma_is_compatible · 62a6abdd
      Arnd Bergmann 提交于
      When dma_addr_t is 64-bit, we get a warning about an invalid cast
      in the call to ux500_dma_is_compatible() from ux500_dma_channel_program():
      
      drivers/usb/musb/ux500_dma.c: In function 'ux500_dma_channel_program':
      drivers/usb/musb/ux500_dma.c:210:51: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
        if (!ux500_dma_is_compatible(channel, packet_sz, (void *)dma_addr, len))
      
      The problem is that ux500_dma_is_compatible() is called from the
      main musb driver on the virtual address, but here we pass in a
      DMA address, so the types are fundamentally different but it works
      because the function only checks the alignment of the buffer and
      that is the same.
      
      We could work around this by adding another cast, but I have checked
      that the buffer we get passed here is already checked before it
      gets mapped, so the second check seems completely unnecessary
      and removing it must be the cleanest solution.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NFelipe Balbi <balbi@kernel.org>
      62a6abdd
    • A
      usb: musb: use %pad format string from dma_addr_t · 3ec08ddf
      Arnd Bergmann 提交于
      The musb driver prints DMA addresses in a few places, using the
      0x%x format string. This is wrong on 64-bit architectures (which
      need %lx) and 32-bit ARM with CONFIG_LPAE set (which needs
      %llx), otherwise we print the wrong data, as gcc warns:
      
      musb/musbhsdma.c: In function 'configure_channel':
      musb/musbhsdma.c:120:53: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=]
        dev_dbg(musb->controller, "%p, pkt_sz %d, addr 0x%x, len %d, mode %d\n",
      musb/musbhsdma.c: In function 'dma_channel_program':
      musb/musbhsdma.c:155:53: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=]
        dev_dbg(musb->controller, "ep%d-%s pkt_sz %d, dma_addr 0x%x length %d, mode %d\n",
      musb/tusb6010_omap.c: In function 'tusb_omap_dma_program':
      musb/tusb6010_omap.c:313:53: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=]
        dev_dbg(musb->controller, "ep%i %s dma ch%i dma: %08x len: %u(%u) packet_sz: %i(%i)\n",
      
      This uses the %pad format string, which prints a dma_addr_t that
      gets passed by reference, which works for all combinations.
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NFelipe Balbi <balbi@kernel.org>
      3ec08ddf
  4. 03 3月, 2016 1 次提交
  5. 23 2月, 2016 1 次提交
  6. 17 2月, 2016 1 次提交
  7. 15 2月, 2016 2 次提交
  8. 04 2月, 2016 1 次提交
  9. 23 12月, 2015 1 次提交
  10. 17 12月, 2015 3 次提交
  11. 15 12月, 2015 1 次提交
  12. 09 12月, 2015 1 次提交
  13. 08 12月, 2015 1 次提交
    • T
      usb: musb: core: Fix pm runtime for deferred probe · 4d055910
      Tony Lindgren 提交于
      If musb_init_controller fails at musb_platform_init, we have already
      called pm_runtime_irq_safe for musb and that causes the pm runtime count
      to be enabled for parent before the parent has completed initialization.
      This causes pm to stop working as on unload nothing gets idled.
      
      This issue can be reproduced at least with:
      
      # modprobe omap2430
      HS USB OTG: no transceiver configured
      musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517
      # modprobe phy-twl4030-usb
      # rmmod omap2430
      
      And after the steps above omap2430 will block deeper idle states on
      omap3.
      
      To fix this, let's not enable pm runtime until we need to and the
      parent has been initialized. Note that this does not fix the issue of
      PM being broken for musb during runtime.
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4d055910
  14. 19 11月, 2015 1 次提交
    • A
      usb: musb: USB_TI_CPPI41_DMA requires dmaengine support · 183e53e8
      Arnd Bergmann 提交于
      The CPPI-4.1 driver selects TI_CPPI41, which is a dmaengine
      driver and that may not be available when CONFIG_DMADEVICES
      is not set:
      
      warning: (USB_TI_CPPI41_DMA) selects TI_CPPI41 which has unmet direct dependencies (DMADEVICES && ARCH_OMAP)
      
      This adds an extra dependency to avoid generating warnings in randconfig
      builds. Ideally we'd remove the 'select' statement, but that has the
      potential to break defconfig files.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 411dd19c ("usb: musb: Kconfig: Select the DMA driver if DMA mode of MUSB is enabled")
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      183e53e8
  15. 18 11月, 2015 2 次提交
    • B
      usb: musb: enable usb_dma parameter · 51676c8d
      Bin Liu 提交于
      Change the permission of usb_dma parameter so it can
      be used for runtime debug without reboot.
      Signed-off-by: NBin Liu <b-liu@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      51676c8d
    • B
      usb: musb: fix tx fifo flush handling · 68fe05e2
      Bin Liu 提交于
      Here are a few changes in musb_h_tx_flush_fifo().
      
      - It has been observed that sometimes (if not always) musb is unable
        to flush tx fifo during urb dequeue when disconnect a device. But
        it seems to be harmless, since the tx fifo flush is done again in
        musb_ep_program() when re-use the hw_ep.
      
        But the WARN() floods the console in the case when multiple tx urbs
        are queued, so change it to dev_WARN_ONCE().
      
      - applications could queue up many tx urbs, then the 1ms delay could
        causes minutes of delay in device disconnect. So remove it to get
        better user experience. The 1ms delay does not help the flushing
        anyway.
      
      - cleanup the debug code - related to lastcsr.
      
      ----
      Note: The tx fifo flush issue has been observed during device disconnect
      on AM335x.
      
      To reproduce the issue, ensure tx urb(s) are queued when unplug the usb
      device which is connected to AM335x usb host port.
      
      I found using a usb-ethernet device and running iperf (client on AM335x)
      has very high chance to trigger the problem.
      
      Better to turn on dev_dbg() in musb_cleanup_urb() with CPPI enabled to
      see the issue when aborting the tx channel.
      Signed-off-by: NBin Liu <b-liu@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      68fe05e2