1. 24 3月, 2011 3 次提交
  2. 14 3月, 2011 1 次提交
    • J
      USB 3.0 Hub Changes · dbe79bbe
      John Youn 提交于
      Update the USB core to deal with USB 3.0 hubs.  These hubs have a slightly
      different hub descriptor than USB 2.0 hubs, with a fixed (rather than
      variable length) size.  Change the USB core's hub descriptor to have a
      union for the last fields that differ.  Change the host controller drivers
      that access those last fields (DeviceRemovable and PortPowerCtrlMask) to
      use the union.
      
      Translate the new version of the hub port status field into the old
      version that khubd understands.  (Note: we need to fix it to translate the
      roothub's port status once we stop converting it to USB 2.0 hub status
      internally.)
      
      Add new code to handle link state change status.  Send out new control
      messages that are needed for USB 3.0 hubs, like Set Hub Depth.
      
      This patch is a modified version of the original patch submitted by John
      Youn.  It's updated to reflect the removal of the "bitmap" #define, and
      change the hub descriptor accesses of a couple new host controller
      drivers.
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Cc: Tony Olech <tony.olech@elandigitalsystems.com>
      Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>
      Cc: Max Vozeler <mvz@vozeler.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Cc: Rodolfo Giometti <giometti@linux.it>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Anton Vorontsov <avorontsov@mvista.com>
      Cc: Sebastian Siewior <bigeasy@linutronix.de>
      Cc: Lothar Wassmann <LW@KARO-electronics.de>
      Cc: Olav Kongas <ok@artecdesign.ee>
      Cc: Martin Fuzzey <mfuzzey@gmail.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      dbe79bbe
  3. 01 3月, 2011 5 次提交
    • H
      usb: musb: tusb: Fix possible null pointer dereference in tusb6010_omap.c · c88ba39c
      Huzaifa Sidhpurwala 提交于
      tusb_dma was being dereferenced when it was nul
      Signed-off-by: NHuzaifa Sidhpurwala <huzaifas@redhat.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c88ba39c
    • H
      usb: musb: OMAP3xxx: Fix device detection in otg & host mode · 70045c57
      Hema HK 提交于
      In OMAP3xxx with OTG mode or host only mode, When the device
      is inserted after the gadget driver loading the enumeration was not
      through. This is because the mentor controller will start sensing the
      ID PIN only after setting the session bit.
      So after ID-GND, need to set the session bit for mentor to get it
      configured as A device.
      
      This is a fix to set the session bit again in ID_GND notification handler.
      Tested with OMAP3630Zoom3 platform.
      Signed-off-by: NHema HK <hemahk@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      70045c57
    • H
      usb: musb: Idle path retention and offmode support for OMAP3 · 7acc6197
      Hema HK 提交于
      This patch supports the retention and offmode support in the idle path for
      musb driver using runtime pm APIs.
      
      This is restricted to support offmode and retention only when device not
      connected.When device/cable connected with gadget driver loaded,configured
      to no idle/standby which will not allow the core transition to retention
      or off.
      
      There is no context save/restore done by hardware for musb in OMAP3
      and OMAP4,driver has to take care of saving and restoring the context
      during offmode.
      
      Musb has a requirement of configuring sysconfig register to force
      idle/standby mode and set the ENFORCE bit in module STANDBY register
      for retention and offmode support.
      
      Runtime pm and hwmod frameworks will take care of configuring to force
      idle/standby when pm_runtime_put_sync is called and back to no
      idle/standby when pm_runeime_get_sync is called.
      
      Compile, boot tested and also tested the retention in the idle path on
      OMAP3630Zoom3. And tested the global suspend/resume with offmode enabled.
      Usb basic functionality tested on OMAP4430SDP.
      
      There is some problem with idle path offmode in mainline, I could not test
      with offmode. But I have tested this patch with resetting the controller
      in the idle path when wakeup from retention just to make sure that the
      context is lost, and restore path is working fine.
      
      Removed .suspend/.resume fnction pointers and functions because there
      is no need of having these functions as all required work is done
      at runtime in the driver.
      
      There is no need to call the runtime pm api with glue driver device
      as glue layer device is the parent of musb core device, when runtime apis
      are called for the child, parent device runtime functionality
      will be invoked.
      
      Design overview:
      
      pm_runtime_get_sync: When called with musb core device takes care of
      enabling the clock, calling runtime callback function of omap2430 glue
      layer, runtime call back of musb driver and configure the musb sysconfig
      to no idle/standby
      
      pm_runtime_put: Takes care of calling runtime callback function of omap2430
      glue layer, runtime call back of musb driver, Configure the musb sysconfig
      to force idle/standby and disable the clock.
      
      During musb driver load: Call pm_runtime_get_sync.
      
      End of musb driver load: Call pm_runtime_put
      
      During gadget driver load: Call pm_runtime_get_sync,
      End of gadget driver load: Call pm_runtime_put if there is no device
      or cable is connected.
      
      During unload of the gadget driver:Call pm_runtime_get_sync if cable/device
      is not connected.
      End of the gadget driver unload : pm_runtime_put
      
      During unload of musb driver : Call pm_runtime_get_sync
      End of unload: Call pm_runtime_put
      
      On connect of usb cable/device -> transceiver notification(VBUS and ID-GND):
      pm_runtime_get_sync only if the gadget driver loaded.
      
      On disconnect of the cable/device -> Disconnect Notification:
      pm_runtime_put if the gadget driver is loaded.
      Signed-off-by: NHema HK <hemahk@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      7acc6197
    • H
      usb: musb: Remove platform context save/restore API · da68ccec
      Hema HK 提交于
      For OMAP3 and OMAP4 for offmode and retention support, musb
      sysconfig is configured to force idle and standby with ENABLE_FORCE bit
      of OTG_FORCESTNDBY set.
      And on wakeup configure to no ilde/standby with resetting the ENABLE_FORCE
      bit. There is not need to save and restore of this register anymore
      so removed omap2430_save_context/omap2430_restore_context functions.
      and also removed otg_forcestandby member of musb_context_registers
      structure
      Signed-off-by: NHema HK <hemahk@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      da68ccec
    • F
      usb: musb: gadget: fix list_head usage · 4cbbf084
      Felipe Balbi 提交于
      commit ad1adb89
      (usb: musb: gadget: do not poke with gadget's list_head)
      fixed a bug in musb where it was corrupting the list_head
      which is supposed to be used by gadget drivers. While
      doing that, I forgot to fix the usage in musb_gadget_dequeue()
      method. Fix that.
      Reported-by: NPavol Kurina <pavol.kurina@emsys.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4cbbf084
  4. 25 2月, 2011 1 次提交
  5. 21 2月, 2011 1 次提交
  6. 18 2月, 2011 6 次提交
    • H
      usb: musb: OMAP4430: Fix usb device detection if connected during boot · 002eda13
      Hema HK 提交于
      OMAP4430 is embedded with UTMI PHY. This PHY does not support the
      OTG features like ID pin detection and VBUS detection. This function
      is exported to an external companion chip TWL6030. Software must retrieve
      the OTG HNP and SRP status from the TWL6030 and configure the bits inside
      the control module that drive the related USBOTGHS UTMI interface signals.
      It must also read back the UTMI signals needed to configure the TWL6030
      OTG module.
      
      Can find more details in the TRM[1].
      [1]:http://focus.ti.com/pdfs/wtbu/OMAP4430_ES2.0_Public_TRM_vJ.pdf
      
      In OMAP4430 musb driver VBUS and ID notifications are received from the
      transceiver driver. If the cable/device is connected during boot,
      notifications from transceiver driver will be missed till musb driver
      is loaded.
      Patch to configure the transceiver in the platform_enable/disable
      functions and enable the vbus in the gadget driver based on the
      last_event of the otg_transceiver.
      Signed-off-by: NHema HK <hemahk@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      002eda13
    • 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
    • J
      USB: musb: omap2430: fix kernel panic on reboot · 19b9a83e
      Johan Hovold 提交于
      Cancel idle timer in musb_platform_exit.
      
      The idle timer could trigger after clock had been disabled leading to
      kernel panic when MUSB_DEVCTL is accessed in musb_do_idle on 2.6.37.
      
      The fault below is no longer triggered on 2.6.38-rc4 (clock is disabled
      later, and only if compiled as a module, and the offending memory access
      has moved) but the timer should be cancelled nonetheless.
      
      Rebooting... musb_hdrc musb_hdrc: remove, state 4
      usb usb1: USB disconnect, address 1
      musb_hdrc musb_hdrc: USB bus 1 deregistered
      Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa0ab060
      Internal error: : 1028 [#1] PREEMPT
      last sysfs file: /sys/kernel/uevent_seqnum
      Modules linked in:
      CPU: 0    Not tainted  (2.6.37+ #6)
      PC is at musb_do_idle+0x24/0x138
      LR is at musb_do_idle+0x18/0x138
      pc : [<c02377d8>]    lr : [<c02377cc>]    psr: 80000193
      sp : cf2bdd80  ip : cf2bdd80  fp : c048a20c
      r10: c048a60c  r9 : c048a40c  r8 : cf85e110
      r7 : cf2bc000  r6 : 40000113  r5 : c0489800  r4 : cf85e110
      r3 : 00000004  r2 : 00000006  r1 : fa0ab000  r0 : cf8a7000
      Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
      Control: 10c5387d  Table: 8faac019  DAC: 00000015
      Process reboot (pid: 769, stack limit = 0xcf2bc2f0)
      Stack: (0xcf2bdd80 to 0xcf2be000)
      dd80: 00000103 c0489800 c02377b4 c005fa34 00000555 c0071a8c c04a3858 cf2bdda8
      dda0: 00000555 c048a00c cf2bdda8 cf2bdda8 1838beb0 00000103 00000004 cf2bc000
      ddc0: 00000001 00000001 c04896c8 0000000a 00000000 c005ac14 00000001 c003f32c
      dde0: 00000000 00000025 00000000 cf2bc000 00000002 00000001 cf2bc000 00000000
      de00: 00000001 c005ad08 cf2bc000 c002e07c c03ec039 ffffffff fa200000 c0033608
      de20: 00000001 00000000 cf852c14 cf81f200 c045b714 c045b708 cf2bc000 c04a37e8
      de40: c0033c04 cf2bc000 00000000 00000001 cf2bde68 cf2bde68 c01c3abc c004f7d8
      de60: 60000013 ffffffff c0033c04 00000000 01234567 fee1dead 00000000 c006627c
      de80: 00000001 c00662c8 28121969 c00663ec cfa38c40 cf9f6a00 cf2bded0 cf9f6a0c
      dea0: 00000000 cf92f000 00008914 c02cd284 c04a55c8 c028b398 c00715c0 becf24a8
      dec0: 30687465 00000000 00000000 00000000 00000002 1301a8c0 00000000 00000000
      dee0: 00000002 1301a8c0 00000000 00000000 c0450494 cf527920 00011f10 cf2bdf08
      df00: 00011f10 cf2bdf10 00011f10 cf2bdf18 c00f0b44 c004f7e8 cf2bdf18 cf2bdf18
      df20: 00011f10 cf2bdf30 00011f10 cf2bdf38 cf401300 cf486100 00000008 c00d2b28
      df40: 00011f10 cf401300 00200200 c00d3388 00011f10 cfb63a88 cfb63a80 c00c2f08
      df60: 00000000 00000000 cfb63a80 00000000 cf0a3480 00000006 c0033c04 cfb63a80
      df80: 00000000 c00c0104 00000003 cf0a3480 cfb63a80 00000000 00000001 00000004
      dfa0: 00000058 c0033a80 00000000 00000001 fee1dead 28121969 01234567 00000000
      dfc0: 00000000 00000001 00000004 00000058 00000001 00000001 00000000 00000001
      dfe0: 4024d200 becf2cb0 00009210 4024d218 60000010 fee1dead 00000000 00000000
      [<c02377d8>] (musb_do_idle+0x24/0x138) from [<c005fa34>] (run_timer_softirq+0x1a8/0x26)
      [<c005fa34>] (run_timer_softirq+0x1a8/0x26c) from [<c005ac14>] (__do_softirq+0x88/0x13)
      [<c005ac14>] (__do_softirq+0x88/0x138) from [<c005ad08>] (irq_exit+0x44/0x98)
      [<c005ad08>] (irq_exit+0x44/0x98) from [<c002e07c>] (asm_do_IRQ+0x7c/0xa0)
      [<c002e07c>] (asm_do_IRQ+0x7c/0xa0) from [<c0033608>] (__irq_svc+0x48/0xa8)
      Exception stack(0xcf2bde20 to 0xcf2bde68)
      de20: 00000001 00000000 cf852c14 cf81f200 c045b714 c045b708 cf2bc000 c04a37e8
      de40: c0033c04 cf2bc000 00000000 00000001 cf2bde68 cf2bde68 c01c3abc c004f7d8
      de60: 60000013 ffffffff
      [<c0033608>] (__irq_svc+0x48/0xa8) from [<c004f7d8>] (sub_preempt_count+0x0/0xb8)
      Code: ebf86030 e5940098 e594108c e5902010 (e5d13060)
      ---[ end trace 3689c0d808f9bf7c ]---
      Kernel panic - not syncing: Fatal exception in interrupt
      
      Cc: stable <stable@kernel.org>
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      19b9a83e
  7. 17 2月, 2011 2 次提交
    • J
      usb: musb: omap2430: fix kernel panic on reboot · b193b412
      Johan Hovold 提交于
      Cancel idle timer in musb_platform_exit.
      
      The idle timer could trigger after clock had been disabled leading to
      kernel panic when MUSB_DEVCTL is accessed in musb_do_idle on 2.6.37.
      
      The fault below is no longer triggered on 2.6.38-rc4 (clock is disabled
      later, and only if compiled as a module, and the offending memory access
      has moved) but the timer should be cancelled nonetheless.
      
      Rebooting... musb_hdrc musb_hdrc: remove, state 4
      usb usb1: USB disconnect, address 1
      musb_hdrc musb_hdrc: USB bus 1 deregistered
      Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa0ab060
      Internal error: : 1028 [#1] PREEMPT
      last sysfs file: /sys/kernel/uevent_seqnum
      Modules linked in:
      CPU: 0    Not tainted  (2.6.37+ #6)
      PC is at musb_do_idle+0x24/0x138
      LR is at musb_do_idle+0x18/0x138
      pc : [<c02377d8>]    lr : [<c02377cc>]    psr: 80000193
      sp : cf2bdd80  ip : cf2bdd80  fp : c048a20c
      r10: c048a60c  r9 : c048a40c  r8 : cf85e110
      r7 : cf2bc000  r6 : 40000113  r5 : c0489800  r4 : cf85e110
      r3 : 00000004  r2 : 00000006  r1 : fa0ab000  r0 : cf8a7000
      Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
      Control: 10c5387d  Table: 8faac019  DAC: 00000015
      Process reboot (pid: 769, stack limit = 0xcf2bc2f0)
      Stack: (0xcf2bdd80 to 0xcf2be000)
      dd80: 00000103 c0489800 c02377b4 c005fa34 00000555 c0071a8c c04a3858 cf2bdda8
      dda0: 00000555 c048a00c cf2bdda8 cf2bdda8 1838beb0 00000103 00000004 cf2bc000
      ddc0: 00000001 00000001 c04896c8 0000000a 00000000 c005ac14 00000001 c003f32c
      dde0: 00000000 00000025 00000000 cf2bc000 00000002 00000001 cf2bc000 00000000
      de00: 00000001 c005ad08 cf2bc000 c002e07c c03ec039 ffffffff fa200000 c0033608
      de20: 00000001 00000000 cf852c14 cf81f200 c045b714 c045b708 cf2bc000 c04a37e8
      de40: c0033c04 cf2bc000 00000000 00000001 cf2bde68 cf2bde68 c01c3abc c004f7d8
      de60: 60000013 ffffffff c0033c04 00000000 01234567 fee1dead 00000000 c006627c
      de80: 00000001 c00662c8 28121969 c00663ec cfa38c40 cf9f6a00 cf2bded0 cf9f6a0c
      dea0: 00000000 cf92f000 00008914 c02cd284 c04a55c8 c028b398 c00715c0 becf24a8
      dec0: 30687465 00000000 00000000 00000000 00000002 1301a8c0 00000000 00000000
      dee0: 00000002 1301a8c0 00000000 00000000 c0450494 cf527920 00011f10 cf2bdf08
      df00: 00011f10 cf2bdf10 00011f10 cf2bdf18 c00f0b44 c004f7e8 cf2bdf18 cf2bdf18
      df20: 00011f10 cf2bdf30 00011f10 cf2bdf38 cf401300 cf486100 00000008 c00d2b28
      df40: 00011f10 cf401300 00200200 c00d3388 00011f10 cfb63a88 cfb63a80 c00c2f08
      df60: 00000000 00000000 cfb63a80 00000000 cf0a3480 00000006 c0033c04 cfb63a80
      df80: 00000000 c00c0104 00000003 cf0a3480 cfb63a80 00000000 00000001 00000004
      dfa0: 00000058 c0033a80 00000000 00000001 fee1dead 28121969 01234567 00000000
      dfc0: 00000000 00000001 00000004 00000058 00000001 00000001 00000000 00000001
      dfe0: 4024d200 becf2cb0 00009210 4024d218 60000010 fee1dead 00000000 00000000
      [<c02377d8>] (musb_do_idle+0x24/0x138) from [<c005fa34>] (run_timer_softirq+0x1a8/0x26)
      [<c005fa34>] (run_timer_softirq+0x1a8/0x26c) from [<c005ac14>] (__do_softirq+0x88/0x13)
      [<c005ac14>] (__do_softirq+0x88/0x138) from [<c005ad08>] (irq_exit+0x44/0x98)
      [<c005ad08>] (irq_exit+0x44/0x98) from [<c002e07c>] (asm_do_IRQ+0x7c/0xa0)
      [<c002e07c>] (asm_do_IRQ+0x7c/0xa0) from [<c0033608>] (__irq_svc+0x48/0xa8)
      Exception stack(0xcf2bde20 to 0xcf2bde68)
      de20: 00000001 00000000 cf852c14 cf81f200 c045b714 c045b708 cf2bc000 c04a37e8
      de40: c0033c04 cf2bc000 00000000 00000001 cf2bde68 cf2bde68 c01c3abc c004f7d8
      de60: 60000013 ffffffff
      [<c0033608>] (__irq_svc+0x48/0xa8) from [<c004f7d8>] (sub_preempt_count+0x0/0xb8)
      Code: ebf86030 e5940098 e594108c e5902010 (e5d13060)
      ---[ end trace 3689c0d808f9bf7c ]---
      Kernel panic - not syncing: Fatal exception in interrupt
      
      Cc: stable@kernel.org
      Signed-off-by: NJohan Hovold <jhovold@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      b193b412
    • F
      usb: musb: fix build breakage · 5990378b
      Felipe Balbi 提交于
      commit 06624818
      (usb: musb: disable double buffering when it's broken),
      introduced a compile error when gadget API is disabled.
      
      Fix it.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      5990378b
  8. 05 2月, 2011 1 次提交
  9. 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
  10. 28 1月, 2011 1 次提交
  11. 11 1月, 2011 1 次提交
  12. 17 12月, 2010 2 次提交
  13. 11 12月, 2010 1 次提交
  14. 10 12月, 2010 9 次提交
    • H
      usb: musb: Adding musb support for OMAP4430 · 594632ef
      Hema HK 提交于
      OMAP4430 supports UTMI and ULPI types of transceiver interface.
      
      In UTMI mode: The PHY is embedded within OMAP4430. The transceiver functionality
      is split between the twl6030 PMIC chip and OMAP4430. The VBUS, ID pin
      sensing and OTG SRP generation part is integrated in TWL6030 and UTMI PHY
      functionality is embedded within the OMAP4430.
      
      There is no direct interactions between the MUSB controller and TWL6030
      chip to communicate the session-valid, session-end and ID-GND events.
      It has to be done through a software by setting/resetting bits in
      one of the control module register of OMAP4430 which in turn toggles
      the appropriate signals to MUSB controller.
      
      musb driver is register for blocking notifications from the transceiver
      driver to get the event notifications for connect/disconnect and ID-GND.
      Based on these events call the transceiver init/shutdown function to
      configure the transceiver to toggle the VBUS valid, session end and ID_GND
      signals to musb and power on/off the internal PHY.
      
      For ID_GND event notifications, toggle the ID_GND signal and then wait for
      musb to be configured as "A" device, and then call the transceiver function
      to set the VBUS.
      
      In OTG mode and musb as a host, When the Micro A connector used, VBUS is turned on
      and session bit set. When the device is connected, enumeration goes through.
      When the device disconnected from the other end of the connector(ID is still grounded),
      link will detect the disconnect and end the session. When the device is connected back,
      there are no events generated in the TWL6030-usb, and link is already down.
      So the device is not detected. Removed the session bit disable code which
      will recognize the connect of the device.
      
      Limitation: In OTG host mode, if device is connected during boot, it does not get
      detected. If disconnect and connect it back or connect after boot only it works.
      Fix for this, I will submit seperate patch later.
      Signed-off-by: NHema HK <hemahk@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      594632ef
    • H
      usb: musb: TWL6030: Selecting TWL6030_USB transceiver · 4c42fbc9
      Hema HK 提交于
      Selecting the twl6030-usb for OMAP4430SDP and OMAP4PANDA boards and
      adding OMAP4 internal phy code for compilation
      Signed-off-by: NHema HK <hemahk@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4c42fbc9
    • M
      usb: musb: add support for ux500 platform · 4bc36fd3
      Mian Yousaf Kaukab 提交于
      Initial support for u8500 and u5500 platform.
      Signed-off-by: NMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4bc36fd3
    • A
      musb: am35x: fix compile error due to control apis · a9c03783
      Ajay Kumar Gupta 提交于
      commit 4814ced5 (OMAP:
      control: move plat-omap/control.h to mach-omap2/control.h)
      moved <plat/control.h> to another location, preventing
      drivers from accessing it, so we need to pass function
      pointers from arch code to be able to talk to internal
      PHY on AM35x.
      Signed-off-by: NAjay Kumar Gupta <ajay.gupta@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      a9c03783
    • F
      usb: musb: drop board_set_vbus · 92b48df2
      Felipe Balbi 提交于
      that's not used anymore. So let's drop it.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      92b48df2
    • F
      usb: musb: drop musb_platform_suspend/resume · 78417372
      Felipe Balbi 提交于
      all glue layers are now fully moved to the
      new setup. We are now using dev_pm_ops to
      implement suspend/resume functionality and
      thus, musb_platform_suspend/resume has become
      deprecated and useless.
      
      This patch drops those function pointers and
      its uses.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      78417372
    • F
      usb: musb: blackfin: usb dev_pm_ops structure · fcd22e3b
      Felipe Balbi 提交于
      instead of using musb_platform_suspend_resume,
      we can use dev_pm_ops and let platform_device
      core handle when to call musb_core's suspend and
      glue layer's suspend.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      fcd22e3b
    • F
      usb: musb: am35x: usb dev_pm_ops structure · 6f783e28
      Felipe Balbi 提交于
      instead of using musb_platform_suspend_resume,
      we can use dev_pm_ops and let platform_device
      core handle when to call musb_core's suspend and
      glue layer's suspend.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      6f783e28
    • F
      usb: musb: omap2430: use dev_pm_ops structure · c20aebb9
      Felipe Balbi 提交于
      instead of using musb_platform_suspend/resume,
      we can use dev_pm_ops and let the platform_device
      core handle when to call musb_core's suspend and
      glue layer's suspend.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c20aebb9