1. 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
  2. 07 5月, 2011 1 次提交
  3. 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
  4. 14 4月, 2011 1 次提交
  5. 01 3月, 2011 3 次提交
    • 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
  6. 18 2月, 2011 3 次提交
    • 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
    • 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 1 次提交
    • 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
  8. 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
    • 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: 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
    • F
      usb: musb: omap2430: drop the nops · e6326358
      Felipe Balbi 提交于
      we don't need those nops, so drop them.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e6326358
    • F
      usb: musb: drop musb_platform_save/restore_context · 49635141
      Felipe Balbi 提交于
      ... that can be easily folded into the
      musb_platform_suspend/resume calls.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      49635141
    • F
      usb: musb: move clock handling to glue layer · 03491761
      Felipe Balbi 提交于
      musb core doesn't need to know about platform
      specific details. So start moving clock
      handling to platform glue layer and make
      musb core agnostic about that.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      03491761
    • F
      usb: musb: pass platform_ops via platform_data · f7ec9437
      Felipe Balbi 提交于
      ... then we don't need to export any symbols
      from glue layer to musb_core.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f7ec9437
    • F
      usb: musb: omap2430: give it a context structure · a3cee12a
      Felipe Balbi 提交于
      that structure currently only holds a device
      pointer to our own platform_device and musb's
      platform_device, but soon it will hold pointers
      to our clock structures and glue-specific bits
      and pieces.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      a3cee12a
    • F
      usb: musb: split omap2430 to its own platform_driver · dc09886b
      Felipe Balbi 提交于
      Just adding its own platform_driver, not really
      using it yet.
      
      When all HW glue layers are converted, more patches
      will come to split power management code from musb_core
      and move it completely to HW glue layer.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      dc09886b
  9. 07 12月, 2010 1 次提交
    • F
      usb: musb: make all glue layer export struct musb_platform_ops · 743411b3
      Felipe Balbi 提交于
      preparing to a big refactor on musb code. We need
      to be able to compile in all glue layers (or at
      least all ARM-based ones) together and have a
      working binary.
      
      While preparing for that, we move every glue
      layer to export only one symbol, which is
      a struct musb_platform_ops, and make all
      other functions static.
      
      Later patches will come to allow for compiling
      all glue layers together and have a working
      binary.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      743411b3
  10. 01 12月, 2010 1 次提交
  11. 23 10月, 2010 1 次提交
    • S
      USB: MUSB: fix kernel WARNING/oops when unloading module in OTG mode · f4053874
      Sergei Shtylyov 提交于
      Since commit 461972d8 (musb_core: don't call
      musb_platform_exit() twice), unloading the driver module results in a WARNING
      "kobject: '(null)' (c73de788): is not initialized, yet kobject_put() is being
      called." (or even kernel oops) on e.g. DaVincis, though only in the OTG mode.
      There exists dubious and unbalanced put_device() call in musb_free() which
      takes place only in the OTG mode.  As this commit caused musb_platform_exit()
      to be called (and so unregister the NOP transceiver) before this put_device()
      call, this function references already freed memory.
      
      On the other hand, all the glue layers miss the otg_put_transceiver() call,
      complementary to the otg_get_transceiver() call that they do.  So, I think
      the solution is to get rid of the strange put_device() call, and instead
      call otg_put_transceiver() in the glue layers...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f4053874
  12. 11 8月, 2010 1 次提交
  13. 21 5月, 2010 5 次提交
  14. 01 5月, 2010 1 次提交
  15. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  16. 03 3月, 2010 2 次提交
  17. 12 12月, 2009 1 次提交
  18. 21 10月, 2009 1 次提交
    • T
      omap: headers: Move remaining headers from include/mach to include/plat · ce491cf8
      Tony Lindgren 提交于
      Move the remaining headers under plat-omap/include/mach
      to plat-omap/include/plat. Also search and replace the
      files using these headers to include using the right path.
      
      This was done with:
      
      #!/bin/bash
      mach_dir_old="arch/arm/plat-omap/include/mach"
      plat_dir_new="arch/arm/plat-omap/include/plat"
      headers=$(cd $mach_dir_old && ls *.h)
      omap_dirs="arch/arm/*omap*/ \
      drivers/video/omap \
      sound/soc/omap"
      other_files="drivers/leds/leds-ams-delta.c \
      drivers/mfd/menelaus.c \
      drivers/mfd/twl4030-core.c \
      drivers/mtd/nand/ams-delta.c"
      
      for header in $headers; do
      	old="#include <mach\/$header"
      	new="#include <plat\/$header"
      	for dir in $omap_dirs; do
      		find $dir -type f -name \*.[chS] | \
      			xargs sed -i "s/$old/$new/"
      	done
      	find drivers/ -type f -name \*omap*.[chS] | \
      		xargs sed -i "s/$old/$new/"
      	for file in $other_files; do
      		sed -i "s/$old/$new/" $file
      	done
      done
      
      for header in $(ls $mach_dir_old/*.h); do
      	git mv $header $plat_dir_new/
      done
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ce491cf8
  19. 16 6月, 2009 3 次提交
  20. 24 4月, 2009 1 次提交
  21. 08 1月, 2009 1 次提交