1. 18 2月, 2011 4 次提交
    • H
      usb: musb: Using runtime pm APIs for musb. · 207b0e1f
      Hema HK 提交于
      Calling runtime pm APIs pm_runtime_put_sync() and pm_runtime_get_sync()
      for enabling/disabling the clocks, sysconfig settings.
      
      Enable clock, configure no-idle/standby when active and configure force idle/standby
      and disable clock when idled. This is taken care by the runtime framework when
      driver calls the pm_runtime_get_sync and pm_runtime_put_sync APIs.
      Need to configure MUSB into force standby and force idle mode when usb not used
      Signed-off-by: NHema HK <hemahk@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Cousson, Benoit <b-cousson@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      207b0e1f
    • F
      usb: musb: gadget: do not poke with gadget's list_head · ad1adb89
      Felipe Balbi 提交于
      struct usb_request's list_head is supposed to be
      used only by gadget drivers, but musb is abusing
      that. Give struct musb_request its own list_head
      and prevent musb from poking into other driver's
      business.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      ad1adb89
    • F
      usb: musb: gadget: beautify usb_gadget_probe_driver()/usb_gadget_unregister_driver · 63eed2b5
      Felipe Balbi 提交于
      Just a few cosmetic fixes to usb_gadget_probe_driver()
      and usb_gadget_unregister_driver().
      
      Decreased a few indentation levels with goto statements.
      
      While at that, also add the missing call to musb_stop().
      If we don't have OTG, there's no point of leaving
      MUSB prepared for operation if a gadget driver fails
      to probe. The same is valid for usb_gadget_unregister_driver(),
      since we are removing the gadget driver and we don't have
      OTG, we can completely unconfigure MUSB.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      63eed2b5
    • F
      usb: musb: do not error out if Kconfig doesn't match board mode · 75a14b14
      Felipe Balbi 提交于
      During development, even though board is wired
      to e.g. OTG, we might want to compile host-only
      or peripheral-only configurations.
      
      Let's allow that to happen.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      75a14b14
  2. 05 2月, 2011 1 次提交
  3. 01 2月, 2011 6 次提交
    • M
      usb: musb: introduce api for dma code to check compatibility with usb request · 5f5761cb
      Mian Yousaf Kaukab 提交于
      Gadget MUSB driver handles dma mappings in musb_gadget_queue(). Where as it is
      possible for  dma code to reject the usb request later at ->channel_program()
      called from txstate()/rxstate()
      
      For example ->channel_program in tusb6010_omap.c:
      
      static int tusb_omap_dma_program(struct dma_channel *channel, u16 packet_sz,
              u8 rndis_mode, dma_addr_t dma_addr, u32 len)
      {
      ...
      	if (unlikely(dma_addr & 0x1) || (len < 32) || (len > packet_sz))
      		return false;
      ...
      	if (dma_addr & 0x2)
      		return false;
      ...
      }
      
      In this case, usb request will be handled in PIO mode which renders dma mapping
      operations unnecessary.
      
      This patch adds an api to allow dma code to indicate incompatibility with usb
      request. Gadget musb driver call this api, if available, before dma mappings to
      avoid any unnecessary mapping operations.
      Signed-off-by: NMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      5f5761cb
    • M
      usb: musb: maintain three states for buffer mappings instead of two · c65bfa62
      Mian Yousaf Kaukab 提交于
      If dma buffers are mapped by a higher layer, with a boolean musb_request.mapped
      it is still possible to call dma_sync_single_for_device() from
      musb_g_giveback(), even if txstate()/rxstate() has called unmap_dma_buffer()
      before falling back to pio mode.
      
      Moreover, check for musb_ep->dma is moved within map_dma_buffer() so where
      applicable checks for it are removed. And where possible, checks for
      is_dma_capable() are merged with buffer map state check.
      Signed-off-by: NMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c65bfa62
    • F
      usb: musb: disable double buffering when it's broken · 06624818
      Felipe Balbi 提交于
      We know that blackfin doesn't support double
      buffering feature as of today. So we add a
      flag set by musb_platform_init() to forcefully
      disable that feature.
      
      Such flag is created and marked as deprecated
      to force us to find a solution for the missing
      double buffering support on blackfin.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      06624818
    • B
      usb: musb: hsdma: change back to use musb_read/writew · 9c668079
      Bob Liu 提交于
      Blackfin platform doesn't support 32bits musbdma registers, so change back to
      use musb_read/writew instead of musb_read/writel and simply some format casts.
      Signed-off-by: NBob Liu <lliubbo@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      9c668079
    • S
      usb: musb: core: fix IRQ check · 541079de
      Sergei Shtylyov 提交于
      musb_probe() only regards 0 as a wrong IRQ number, despite platform_get_irq()
      that it calls returns -ENXIO in that case. It leads to musb_init_controller()
      calling request_irq() with a negative IRQ number, and when it naturally
      fails, the following is printed to the console:
      
      request_irq -6 failed!
      musb_init_controller failed with status -19
      
      Fix musb_probe() to filter out the error values as well as 0.
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      541079de
    • M
      usb: musb: fix kernel panic during s2ram(v2) · 456bb169
      Ming Lei 提交于
      This patch fixes kernel panic during s2ram, which is caused
      by the below:
      
      	- musb is not put into drv data of musb platform device if
      	CONFIG_USB_MUSB_HDRC_HCD is defined
      
      	- glue layer driver always get musb instance via platform_get_drvdata.
      
      The patch fixes the issue by always puting musb into drv data
      of musb platform device, which is doable even the platform device
      is a host controller device.
      
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Sergei Shtylyov <sshtylyov@mvista.com>
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      456bb169
  4. 11 1月, 2011 1 次提交
  5. 17 12月, 2010 2 次提交
  6. 11 12月, 2010 1 次提交
  7. 10 12月, 2010 25 次提交