1. 23 1月, 2013 1 次提交
  2. 22 11月, 2012 3 次提交
  3. 06 11月, 2012 1 次提交
    • P
      usb: musb: remove generic_interrupt · baef653a
      Philippe De Swert 提交于
      This patch is based on the discussion of a previous patch to fix an issue
      where the omap2430 musb driver is not working for N9/N950.
      
      Moving all the interrupt handling to the devices. Avoids inclusion of generic
      interrupt and breakage due to sometimes misleading CONFIG options. This makes
      sure usb always works if on of the subdrivers is chosen. Tested on Nokia N9/N950.
      
      Partially clean up CONFIG_SOC_OMAP3430 which is not necessary in the cases
      where I removed it. Also helps with the removal work of those options that
      Tony Lindgren predicted would happen at some point.
      Signed-off-by: NPhilippe De Swert <philippe.deswert@jollamobile.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      baef653a
  4. 01 11月, 2012 1 次提交
    • S
      usb: musb: remove hand-crafted id handling · 2f771164
      Sebastian Andrzej Siewior 提交于
      This replaced the handcrafted id handling by the PLATFORM_DEVID_AUTO
      value which should do the same thing.
      
      This patch probably also fixes ux500 because I did not find the "musbid"
      variable to remove. And we close a tiny-unlikely race window becuase the
      old code gave the id back before device was destroyed in the remove
      case.
      
      [ balbi@ti.com : fixed up two failed hunks when applying patch ]
      
      Cc: B, Ravi <ravibabu@ti.com>
      Cc: Santhapuri, Damodar <damodar.santhapuri@ti.com>
      Cc: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
      Cc: Bob Liu <lliubbo@gmail.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      2f771164
  5. 11 9月, 2012 3 次提交
  6. 20 8月, 2012 1 次提交
  7. 14 8月, 2012 1 次提交
  8. 09 8月, 2012 1 次提交
  9. 03 8月, 2012 1 次提交
  10. 02 7月, 2012 1 次提交
  11. 25 6月, 2012 6 次提交
  12. 11 4月, 2012 4 次提交
    • S
      usb: musb: omap: fix the error check for pm_runtime_get_sync · ad579699
      Shubhrajyoti D 提交于
      pm_runtime_get_sync returns a signed integer. In case of errors
      it returns a negative value. This patch fixes the error check
      by making it signed instead of unsigned thus preventing register
      access if get_sync_fails. Also passes the error cause to the
      debug message.
      
      Cc: stable@vger.kernel.org
      Cc:  Kishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: NShubhrajyoti D <shubhrajyoti@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      ad579699
    • K
      usb: musb: omap: fix crash when musb glue (omap) gets initialized · 3006dc8c
      Kishon Vijay Abraham I 提交于
      pm_runtime_enable is being called after omap2430_musb_init. Hence
      pm_runtime_get_sync in omap2430_musb_init does not have any effect (does
      not enable clocks) resulting in a crash during register access. It is
      fixed here.
      
      Cc: stable@vger.kernel.org # v3.0, v3.1, v3.2, v3.3
      Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      3006dc8c
    • 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
    • V
      usb: musb: fix oops on omap2430 module unload · afb76df1
      Vladimir Zapolskiy 提交于
      This change prevents runtime suspend and resume actual execution, if
      omap2430 controller driver is loaded after musb-hdrc, and therefore the
      controller isn't initialized properly.
      
      The problem is reproducible with 3.1.y and 3.2 kernels.
      
      Kernel configuration of musb:
      
        % cat .config | egrep 'MUSB|GADGET'
        CONFIG_USB_MUSB_HDRC=y
        # CONFIG_USB_MUSB_TUSB6010 is not set
        CONFIG_USB_MUSB_OMAP2PLUS=m
        # CONFIG_USB_MUSB_AM35X is not set
        CONFIG_MUSB_PIO_ONLY=y
        CONFIG_USB_GADGET=y
        # CONFIG_USB_GADGET_DEBUG is not set
        # CONFIG_USB_GADGET_DEBUG_FILES is not set
        # CONFIG_USB_GADGET_DEBUG_FS is not set
        CONFIG_USB_GADGET_VBUS_DRAW=2
        CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
        CONFIG_USB_GADGET_MUSB_HDRC=m
        CONFIG_USB_GADGET_DUALSPEED=y
        CONFIG_USB_GADGETFS=m
        # CONFIG_USB_MIDI_GADGET is not set
      
      Fixes the following oops on module unloading:
      
        Unable to handle kernel NULL pointer dereference at virtual address 00000220
        ----8<----
        [<bf162088>] (omap2430_runtime_resume+0x24/0x54 [omap2430]) from [<c0302e34>] (pm_generic_runtime_resume+0x3c/0x50)
        [<c0302e34>] (pm_generic_runtime_resume+0x3c/0x50) from [<c0031a24>] (_od_runtime_resume+0x28/0x2c)
        [<c0031a24>] (_od_runtime_resume+0x28/0x2c) from [<c0306cb0>] (__rpm_callback+0x60/0xa0)
        [<c0306cb0>] (__rpm_callback+0x60/0xa0) from [<c0307f2c>] (rpm_resume+0x3fc/0x6e4)
        [<c0307f2c>] (rpm_resume+0x3fc/0x6e4) from [<c030851c>] (__pm_runtime_resume+0x5c/0x90)
        [<c030851c>] (__pm_runtime_resume+0x5c/0x90) from [<c02fd0dc>] (__device_release_driver+0x2c/0xd0)
        [<c02fd0dc>] (__device_release_driver+0x2c/0xd0) from [<c02fda18>] (driver_detach+0xe8/0xf4)
        [<c02fda18>] (driver_detach+0xe8/0xf4) from [<c02fcf88>] (bus_remove_driver+0xa0/0x104)
        [<c02fcf88>] (bus_remove_driver+0xa0/0x104) from [<c02fde54>] (driver_unregister+0x60/0x80)
        [<c02fde54>] (driver_unregister+0x60/0x80) from [<c02ff2d4>] (platform_driver_unregister+0x1c/0x20)
        [<c02ff2d4>] (platform_driver_unregister+0x1c/0x20) from [<bf162928>] (omap2430_exit+0x14/0x1c [omap2430])
        [<bf162928>] (omap2430_exit+0x14/0x1c [omap2430]) from [<c007d8bc>] (sys_delete_module+0x1f4/0x264)
        [<c007d8bc>] (sys_delete_module+0x1f4/0x264) from [<c000f000>] (ret_fast_syscall+0x0/0x30)
      Signed-off-by: NVladimir Zapolskiy <vladimir.zapolskiy@nokia.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: stable@vger.kernel.org # 3.1
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      afb76df1
  13. 27 2月, 2012 2 次提交
  14. 13 2月, 2012 1 次提交
  15. 31 1月, 2012 1 次提交
  16. 25 1月, 2012 1 次提交
  17. 20 12月, 2011 3 次提交
  18. 12 12月, 2011 4 次提交
    • F
      usb: musb: omap2430: fix compile warning · e7f4e732
      Felipe Balbi 提交于
      fix the following compile warning:
      
      drivers/usb/musb/omap2430.c: In function 'musb_otg_notifier_work':
      drivers/usb/musb/omap2430.c:279:3: warning: 'return' with a value, in
      	function returning void
      drivers/usb/musb/omap2430.c:282:2: warning: 'return' with a value, in
      	function returning void
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e7f4e732
    • V
      usb: musb: fix pm_runtime calls while atomic · 712d8efa
      Vikram Pandita 提交于
      musb pm_runtime_get_sync call happens in intrrupt context on cable attach case
      That can result in re-enabling the interrupts and cause side affects.
      
      So move the code to a work queue.
      
      Following is the error path hit on cable attach:
      
      BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:802
      in_atomic(): 0, irqs_disabled(): 0, pid: 18, name: irq/378-twl6030
      
      Backtrace:
      [<c00520f0>] (dump_backtrace+0x0/0x110) from [<c054f454>] (dump_stack+0x18/0x1c)
      [<c054f43c>] (dump_stack+0x0/0x1c) from [<c007f59c>] (__might_sleep+0x130/0x134)
      [<c007f46c>] (__might_sleep+0x0/0x134) from [<c02c2794>] (__pm_runtime_resume+0x94/0x98)
      [<c02c2700>] (__pm_runtime_resume+0x0/0x98) from [<c033e7e4>] (musb_otg_notifications+0x9c/0x164)
      [<c033e748>] (musb_otg_notifications+0x0/0x164) from [<c00b3df0>] (notifier_call_chain+0x4c/0x8c)
      [<c00b3da4>] (notifier_call_chain+0x0/0x8c) from [<c00b44a8>] (__atomic_notifier_call_chain+0x40/0x54)
      [<c00b4468>] (__atomic_notifier_call_chain+0x0/0x54) from [<c00b44dc>] (atomic_notifier_call_chain+0x20/0x28)
      [<c00b44bc>] (atomic_notifier_call_chain+0x0/0x28) from [<c033f124>] (twl6030_usb_irq+0xc8/0xdc)
      [<c033f05c>] (twl6030_usb_irq+0x0/0xdc) from [<c00d79f8>] (irq_thread_fn+0x24/0x40)
      [<c00d79d4>] (irq_thread_fn+0x0/0x40) from [<c00d7b64>] (irq_thread+0x150/0x1d8)
      [<c00d7a14>] (irq_thread+0x0/0x1d8) from [<c00adf70>] (kthread+0x94/0x98)
      [<c00adedc>] (kthread+0x0/0x98) from [<c0094388>] (do_exit+0x0/0x720)
      
      Tested with:
      MUSB Device mode: Cold boot / Hot plug
      MUSB Host mode: Cold boot / Hot plug
      Signed-off-by: NVikram Pandita <vikram.pandita@ti.com>
      Signed-off-by: NMoiz Sonasath <m-sonasath@ti.com>
      Signed-off-by: NVikram Pandita <vikram.pandita@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      712d8efa
    • F
      usb: musb: headers cleanup · 7d5b49a2
      Felipe Balbi 提交于
      Remove a few unnecessary headers from a
      few files.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      7d5b49a2
    • H
      usb: musb: omap2+: save and restore OTG_INTERFSEL · e25bec16
      Hema HK 提交于
      we need to save and restore OTG_INTERFSEL register
      else we will be unable to function on resume after
      OFF mode.
      Reported-by: NDevaraj Rangasamy <dev@ti.com>
      Signed-off-by: NHema HK <hemahk@ti.com>
      Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: NVikram Pandita <vikram.pandita@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e25bec16
  19. 02 7月, 2011 1 次提交
  20. 13 5月, 2011 1 次提交
    • 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. 02 5月, 2011 1 次提交
    • J
      usb: musb: omap2430: Fix retention idle on musb peripheral only boards · 383cf4e8
      Jarkko Nikula 提交于
      Recent runtime pm and hwmod conversions for 2.6.39 broke the musb peripheral
      mode OMAP retention idle on boards where the board mode in struct
      musb_hdrc_platform_data is set to MUSB_PERIPHERAL.
      
      These conversions changed the way how the OTG_SYSCONFIG register is
      configured and used in runtime. Before 2.6.39 smart standby/idle modes were
      activated statically in OTG_SYSCONFIG. Those modes allow that the musb is
      able to idle when peripheral device is not connected to host.
      
      In 2.6.39 the OTG_SYSCONFIG is updated runtime depending on VBUS status.
      No standby/idle modes are used when device is connected and force
      standby/idle when disconnected.
      
      Unfortunately VBUS disconnect event that handles the disconnect case lets
      the peripheral musb to idle only when board mode is MUSB_OTG. Fix this by
      checking the peripheral mode also.
      Signed-off-by: NJarkko Nikula <jhnikula@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      383cf4e8