1. 03 8月, 2012 1 次提交
  2. 25 6月, 2012 1 次提交
  3. 04 5月, 2012 1 次提交
  4. 11 4月, 2012 2 次提交
    • G
      usb: musb: wake the device before ulpi transfers · bf070bc1
      Grazvydas Ignotas 提交于
      musb can be suspended at the time some other driver wants to do ulpi
      transfers using usb_phy_io_* functions, and that can cause data abort,
      as it happened with isp1704_charger:
      http://article.gmane.org/gmane.linux.kernel/1226122
      
      Add pm_runtime to ulpi functions to rectify this. This also adds io_dev
      to usb_phy so that pm_runtime_* functions can be used.
      
      Cc: Felipe Contreras <felipe.contreras@gmail.com>
      Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      bf070bc1
    • G
      usb: musb: fix some runtime_pm issues · c04352a5
      Grazvydas Ignotas 提交于
      When runtime_pm was originally added, it was done in rather confusing
      way: omap2430_musb_init() (called from musb_init_controller) would do
      runtime_pm_get_sync() and musb_init_controller() itself would do
      runtime_pm_put to balance it out. This is not only confusing but also
      wrong if non-omap2430 glue layer is used.
      
      This confusion resulted in commit 772aed45 "usb: musb: fix
      pm_runtime mismatch", that removed runtime_pm_put() from
      musb_init_controller as that looked unbalanced, and also happened to
      fix unrelated isp1704_charger crash. However this broke runtime PM
      functionality (musb is now always powered, even without gadget active).
      
      Avoid these confusing runtime pm dependences by making
      musb_init_controller() and omap2430_musb_init() do their own runtime
      get/put pairs; also cover error paths. Remove unneeded runtime_pm_put
      in omap2430_remove too. isp1704_charger crash that motivated
      772aed45 will be fixed by following patch.
      
      Cc: Felipe Contreras <felipe.contreras@gmail.com>
      Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c04352a5
  5. 02 3月, 2012 1 次提交
  6. 27 2月, 2012 2 次提交
  7. 13 2月, 2012 2 次提交
  8. 31 1月, 2012 1 次提交
  9. 24 1月, 2012 2 次提交
    • G
      usb: musb: fix shutdown while usb gadget is in use · 24307cae
      Grazvydas Ignotas 提交于
      If we shutdown without stopping the gadget first or removing the cable,
      gadget manages to configure itself again:
      
      root@pandora /root# poweroff
      The system is going down NOW!
      Requesting system poweroff
      [   47.714385] musb-hm halted.
      [   48.120697]  gadget: suspend
      [   48.123748]  gadget: reset config
      [   48.127227]  gadget: ecm deactivated
      [   48.130981] usb0: gether_disconnect
      [   48.281799]  gadget: high-speed config #1: CDC Ethernet (ECM)
      [   48.287872]  gadget: init ecm
      [   48.290985]  gadget: notify connect false
      [   48.295288]  gadget: notify speed 425984000
      
      This is not only unwanted, it's also happening on half-unitialized
      state, after musb_shutdown() has returned, which sometimes causes
      hardware to fail to work after reboot. Let's better properly stop
      gadget on shutdown too.
      
      This patch moves musb_gadget_cleanup out of musb_free(), which has 2
      callsites: probe error path and musb_remove. On probe error path it was
      superflous since musb_gadget_cleanup is called explicitly there, and
      musb_remove() calls musb_shutdown(), so cleanup will get called as before.
      Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      24307cae
    • G
      usb: musb: drop superfluous pm_runtime calls around musb_shutdown · f5579787
      Grazvydas Ignotas 提交于
      Since commit 4f9edd2d "usb: musb: Fix the crash issue during reboot"
      musb_shutdown() does pm_runtime_get_sync/pm_runtime_put by itself, so
      this no longer needs to be done by the caller. Also, musb_exit_debugfs()
      doesn't access the device, so just drop those runtime_pm calls.
      Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com>
      Reviewed-by: NShubhrajyoti D <shubhrajyoti@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f5579787
  10. 13 1月, 2012 1 次提交
  11. 20 12月, 2011 1 次提交
  12. 12 12月, 2011 2 次提交
  13. 29 11月, 2011 1 次提交
    • K
      usb: musb: PM: fix context save/restore in suspend/resume path · 5d193ce8
      Kevin Hilman 提交于
      Currently the driver tries to save context in the suspend path, but
      will cause an abort if the device is already runtime suspended.  This
      happens, for example, if MUSB loaded/compiled-in, in host mode, but no
      USB devices are attached.  MUSB will be runtime suspended, but then
      attempting a system suspend will crash due to the context save
      being attempted while the device is disabled.
      
      On OMAP, as of v3.1, the driver's ->runtime_suspend() callback will be
      called late in the suspend path (by the PM domain layer) if the driver
      is not already runtime suspended, ensuring a full shutdown.
      
      Therefore, the context save is not needed in the ->suspend() method
      since it will be called in the ->runtime_suspend() method anyways
      (similarily for resume.)
      
      NOTE: this leaves the suspend/resume methods basically empty (with
            some FIXMEs and comments, but I'll leave it to the maintainers
            to decide whether to remove them.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5d193ce8
  14. 15 11月, 2011 2 次提交
  15. 08 7月, 2011 1 次提交
  16. 02 7月, 2011 5 次提交
  17. 24 6月, 2011 1 次提交
  18. 07 6月, 2011 1 次提交
  19. 18 5月, 2011 1 次提交
  20. 13 5月, 2011 2 次提交
    • F
      usb: musb: export musb_interrupt symbol · 981430a1
      Felipe Balbi 提交于
      currently that's used by another module
      (am35x) which, granted, it shouldn't be
      using that, but in order to avoid compile
      errors, let's export that symbol temporarily
      until re-factoring work is done on that
      driver.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      981430a1
    • F
      usb: musb: drop unneeded musb_debug trickery · 5c8a86e1
      Felipe Balbi 提交于
      We have a generic way of enabling/disabling
      different debug messages on a driver called
      DYNAMIC_PRINTK. Anyone interested in enabling
      just part of the debug messages, please read
      the documentation under:
      
      Documentation/dynamic-debug-howto.txt
      
      for information on how to use that great
      infrastructure.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      5c8a86e1
  21. 07 5月, 2011 1 次提交
  22. 13 4月, 2011 1 次提交
    • H
      usb: musb: Fix the crash issue during reboot · 4f9edd2d
      Hema HK 提交于
      Below crash observed with commit 7acc6197
      (usb: musb: Idle path retention and offmode support for OMAP3)
      during board reboot.
      
      The musb clock was disabled when musb_shutdown() was called by
      platform_drv_shutdown in which there are register accesses.
      call pm_runtime_get_sync() and pm_runtime_put_sync() in the
      musb_shutdown function.
      
      / # [  172.368774] Unhandled fault: imprecise external abort (0x1406) at 0x400f0000
      [  172.376190] Internal error: : 1406 [#1] SMP
      [  172.380554] last sysfs file: /sys/devices/platform/omap/omap_i2c.4/i2c-4/i2c-dev/i2c-4/dev
      [  172.389221] Modules linked in:
      [  172.392456] CPU: 0    Tainted: G        W    (2.6.38-06671-geddecbb6 #33)
      [  172.399475] PC is at do_raw_spin_unlock+0x50/0xc0
      [  172.404418] LR is at _raw_spin_unlock_irqrestore+0x24/0x44
      [  172.410186] pc : [<c069bfdc>]    lr : [<c085a7f8>]    psr: 60000093
      [  172.410186] sp : ee993e40  ip : c0d00240  fp : bea9cf14
      [  172.422241] r10: 00000000  r9 : ee992000  r8 : c04b2fa8
      [  172.427703] r7 : 00000000  r6 : c0fa46c0  r5 : ef966124  r4 : ef966124
      [  172.434539] r3 : ef92cbc0  r2 : ef92cbc0  r1 : 00000000  r0 : ef966124
      [  172.441406] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
      [  172.448974] Control: 10c5387d  Table: ae8d804a  DAC: 00000015
      [  172.454986] Process init (pid: 1094, stack limit = 0xee9922f8)
      [  172.461120] Stack: (0xee993e40 to 0xee994000)
      [  172.465667] 3e40: a0000013 c085a7f8 ef966124 a0000013 c0fa46c0 c0761ab4 c0761a70 ef95c008
      [  172.474273] 3e60: ef95c014 c06e2fd0 c06e2fbc c06dea90 00000000 01234567 28121969 c04fccb4
      [  172.482849] 3e80: 00000000 c04fcd04 c0a302bc c04fce44 c0a02600 00000001 00000000 c085cd04
      [  172.491424] 3ea0: 00000000 00000002 c09ea000 c085afc0 ee993f24 00000000 00040001 00000445
      [  172.499999] 3ec0: a8eb9d34 00000027 00000000 00000000 00000000 c0a56a4c 00000000 00000000
      [  172.508575] 3ee0: 00000002 60000093 00000000 c0519aac 00000002 00000080 00000000 c0550420
      [  172.517150] 3f00: 00000000 00000002 ee970000 c0a56a3c c0a56a20 00000002 c0a56a3c 00000000
      [  172.525726] 3f20: c0a56a3c 0000000a c1580e00 c0a56a20 00000002 c0a56a3c c1580e00 c0a56a20
      [  172.534301] 3f40: ef92cbc0 c05173a0 00000001 ef92cbc0 c0576190 c04e3174 20000013 c0517324
      [  172.542877] 3f60: ef815c00 ee90b720 c04e3174 c0576190 00000001 ef92cbc0 c04b2f00 ffffffff
      [  172.551483] 3f80: 00000058 c0517324 00000000 00000000 ffffffff 00000000 00000000 ffffffff
      [  172.560058] 3fa0: 00000058 c04b2de0 00000000 00000000 fee1dead 28121969 01234567 00000000
      [  172.568634] 3fc0: 00000000 00000000 ffffffff 00000058 00000000 00000001 400aa000 bea9cf14
      [  172.577209] 3fe0: 000ea148 bea9c958 000aa750 40225728 60000010 fee1dead 00000000 00000000
      [  172.585784] [<c069bfdc>] (do_raw_spin_unlock+0x50/0xc0) from [<c085a7f8>] (_raw_spin_unlock_irqrestore+0x24/0x44)
      [  172.596588] [<c085a7f8>] (_raw_spin_unlock_irqrestore+0x24/0x44) from [<c0761ab4>] (musb_shutdown+0x44/0x88)
      [  172.606933] [<c0761ab4>] (musb_shutdown+0x44/0x88) from [<c06e2fd0>] (platform_drv_shutdown+0x14/0x18)
      [  172.616699] [<c06e2fd0>] (platform_drv_shutdown+0x14/0x18) from [<c06dea90>] (device_shutdown+0x74/0xb4)
      [  172.626647] [<c06dea90>] (device_shutdown+0x74/0xb4) from [<c04fccb4>] (kernel_restart_prepare+0x24/0x38)
      [  172.636688] [<c04fccb4>] (kernel_restart_prepare+0x24/0x38) from [<c04fcd04>] (kernel_restart+0xc/0x48)
      [  172.646545] [<c04fcd04>] (kernel_restart+0xc/0x48) from [<c04fce44>] (sys_reboot+0xfc/0x1d8)
      [  172.655426] [<c04fce44>] (sys_reboot+0xfc/0x1d8) from [<c04b2de0>] (ret_fast_syscall+0x0/0x3c)
      [  172.664459] Code: e3c3303f e594200c e593300c e1520003 (0a000002)
      [  172.670867] ------------[ cut here ]------------
      Signed-off-by: NHema HK <hemahk@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4f9edd2d
  23. 01 3月, 2011 1 次提交
    • 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
  24. 25 2月, 2011 1 次提交
  25. 18 2月, 2011 1 次提交
  26. 01 2月, 2011 2 次提交
    • 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
  27. 28 1月, 2011 1 次提交
  28. 17 12月, 2010 1 次提交