1. 01 10月, 2013 1 次提交
    • S
      usb: musb: dsps: do not bind to "musb-hdrc" · 4fc4b274
      Sebastian Andrzej Siewior 提交于
      This went unnoticed in durin the merge window:
      The dsps driver creates a child device for the musb core driver _and_
      attaches the of_node to it so devm_usb_get_phy_by_phandle() grabs the
      correct phy and attaches the devm resources to the proper device. We
      could also use the parent device but then devm would attach the
      resource to the wrong device and it would be destroyed once the parent
      device is gone - not the device that is used by the musb core driver.
      
      If the phy is now not available then dsps_musb_init() /
      devm_usb_get_phy_by_phandle() returns with EPROBE_DEFER. Since the
      of_node is attached it tries OF drivers as well and matches the driver
      against DSPS. That one creates a new child device for the musb core
      driver which gets probed immediately.
      
      The whole thing repeats itself until the stack overflows.
      
      I belive the same problem exists in ux500 glue code (since 313bdb11
      ("usb: musb: ux500: add device tree probing support") but the drivers are
      now probed in the right order so they don't see it.
      
      The problem is that the dsps driver gets bound to the musb-child device
      due to the same of_node / matching binding. I don't really agree with
      having yet another child node in DT to fix this. Ideally we would have
      musb core driver with DT bindings and according to the binding we would
      select the few extra hacks / gleue layer.
      
      Therefore I suggest the driver to reject the musb-core device.
      
      Cc: Lee Jones <lee.jones@linaro.org>
      Tested-by: NTom Rini <trini@ti.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4fc4b274
  2. 28 8月, 2013 4 次提交
    • S
      usb: musb: am335x-evm: Do not remove the session bit HOST-only mode · 781f1798
      Sebastian Andrzej Siewior 提交于
      This is what I observe:
      On the first connect, the musb starts with DEVCTL.Session set. On
      disconnect, musb_core calls try_idle. That functions removes the Session
      bit signalizing that the session is over (something that only in OTG is
      required). A new device, that is plugged, is no longer recognized.
      I've setup a timer and checked the DEVCTL register and I haven't seen a
      change in VBus and I saw the B-Device bit set. After setting the IDDIG
      into A mode and forcing the device to behave like a A device, I didn't
      see a change.
      Neither VBUS goes to 0b11 nor does a session start request comes.
      In the TI-v3.2 kernel they skip to call musb_platform_try_idle() in the
      OTG_STATE_A_WAIT_BCON state while not in OTG mode.
      Since the second port hast a standard A plug the patch changes the port
      to run in host mode only and skips the timer which would remove
      DEVCTL.Session so we can reconnect to another device later.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      781f1798
    • S
      usb: musb: dsps: do not set is_active on the first drvbus interrupt · 9dfa3621
      Sebastian Andrzej Siewior 提交于
      Quite early on init there is an vbus / drvvbus interrupt comming and the
      dsps code sets is_active to one. As a result we see a lot of
      
      |musb_bus_suspend 2459: trying to suspend as a_wait_bcon while active
      
      until a device is plugged in with pm_runtime enabled in the kernel.
      After checking davinci, am35, da8xx I noticed that dsps is actually the
      only one doing this.
      So remove it and we won't flooded with mesages and the idle port can be
      suspended.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      9dfa3621
    • S
      usb: usb: dsps: update code according to the binding document · c031a7d4
      Sebastian Andrzej Siewior 提交于
      This relfects the code and dts requires changes due to recent .dts
      binding updates:
      - use mg prefix for the Metor Graphics specific attributes
      - use power in mA not in mA/2 as specifed in the USB2.0 specification
      - remove the child node for USB. This is driver specific on won't be
        reflected in the device tree
      - use the "mentor" prefix instead of "mg".
      - use "dr_mode" istead of "mg,port-mode" for the port mode. The former
        is used by a few other drivers.
      
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: devicetree@vger.kernel.org
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c031a7d4
    • J
      usb: musb: dsps: fix devm_ioremap_resource error detection code · 51ef74f6
      Julia Lawall 提交于
      devm_ioremap_resource returns an ERR_PTR value, not NULL, on failure.
      Furthermore, the value returned by devm_ioremap_resource should be tested.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression e,e1;
      statement S;
      @@
      
      *e = devm_ioremap_resource(...);
      if (!e1) S
      
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      51ef74f6
  3. 09 8月, 2013 3 次提交
    • S
      usb: musb: dsps: use proper child nodes · 97238b35
      Sebastian Andrzej Siewior 提交于
      This moves the two instances from the big node into two child nodes. The
      glue layer ontop does almost nothing.
      
      There is one devices containing the control module for USB (2) phy,
      (2) usb and later the dma engine. The usb device is the "glue device"
      which contains the musb device as a child. This is what we do ever since.
      
      The new file musb_am335x is just here to prob the new bus and populate
      child devices.
      
      There are a lot of changes to the dsps file as a result of the changes:
      
      - musb_core_offset
        This is gone. The device tree provides memory ressources information
        for the device there is no need to "fix" things
      
      - instances
        This is gone as well. If we have two instances then we have have two
        child enabled nodes in the device tree. For instance the SoC in beagle
        bone has two USB instances but only one has been wired up so there is
        no need to load and init the second instance since it won't be used.
      
      - dsps_glue is now per glue device
        In the past there was one of this structs but with an array of two and
        each instance accessed its variable depending on the platform device
        id.
      
      - no unneeded copy of structs
        I do not know why struct dsps_musb_wrapper is copied but it is not
        necessary. The same goes for musb_hdrc_platform_data which allocated
        on demand and then again by platform_device_add_data(). One copy is
        enough.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      97238b35
    • S
      usb: musb: dsps: remove the hardcoded phy pieces · e96bdc3d
      Sebastian Andrzej Siewior 提交于
      dsps uses a nop driver which is added in dsps itself and does the PHY
      on/off calls within dsps. Since those calls are now moved the nop driver
      itself, we can now request the phy proper phy and remove those calls.
      Currently only the first musb interface is used so we only add one phy
      node for now.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e96bdc3d
    • S
      usb: phy: rename nop_usb_xceiv => usb_phy_gen_xceiv · 3fa4d734
      Sebastian Andrzej Siewior 提交于
      The "nop" driver isn't a do-nothing-stub but supports a couple functions
      like clock on/off or is able to use a voltage regulator. This patch
      simply renames the driver to "generic" since it is easy possible to
      extend it by a simple function istead of writing a complete driver.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      3fa4d734
  4. 30 7月, 2013 1 次提交
  5. 29 7月, 2013 4 次提交
  6. 28 5月, 2013 1 次提交
  7. 15 5月, 2013 1 次提交
  8. 02 4月, 2013 1 次提交
  9. 18 3月, 2013 3 次提交
  10. 23 1月, 2013 1 次提交
  11. 17 1月, 2013 1 次提交
    • M
      usb: musb: fix dependency on transceiver driver · 25736e0c
      Ming Lei 提交于
      This patch let glue driver return -EPROBE_DEFER if the transceiver
      is not readly, so we can support defer probe on musb to fix the
      below error on 3.7-rc5 if transceiver drivers are built as module:
      
      [   19.052490] unable to find transceiver of type USB2 PHY
      [   19.072052] HS USB OTG: no transceiver configured
      [   19.076995] musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -19
      [   19.089355] musb-hdrc: probe of musb-hdrc.0.auto rejects match -19
      [   19.096771] driver: 'musb-omap2430': driver_bound: bound to device 'musb-omap2430'
      [   19.105194] bus: 'platform': really_probe: bound device musb-omap2430 to driver musb-omap2430
      [   19.174407] bus: 'platform': add driver twl4030_usb
      [   19.179656] bus: 'platform': driver_probe_device: matched device twl4030_usb with driver twl4030_usb
      [   19.202270] bus: 'platform': really_probe: probing driver twl4030_usb with device twl4030_usb
      [   19.214172] twl4030_usb twl4030_usb: HW_CONDITIONS 0xc0/192; link 3
      [   19.239624] musb-omap2430 musb-omap2430: musb core is not yet ready
      [   19.246765] twl4030_usb twl4030_usb: Initialized TWL4030 USB module
      [   19.254516] driver: 'twl4030_usb': driver_bound: bound to device 'twl4030_usb'
      [   19.263580] bus: 'platform': really_probe: bound device twl4030_usb to driver twl4030_usb
      
      Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
      Cc: <stable@vger.kernel.org> v3.8
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      25736e0c
  12. 10 1月, 2013 1 次提交
  13. 13 12月, 2012 1 次提交
    • A
      usb: musb: dsps: header movement build error fix · deeeb9ee
      Afzal Mohammed 提交于
      "54db6eee ARM: OMAP2+: Introduce local usb.h" moved control module bit
      definitions from plat/usb.h (which dsps glue was using) to a local
      header in mach-omap2. And in parallel,
      "c68bb4c6 usb: musb: dsps: control module handling (quirk)" added
      control module handling capability to dsps glue driver that used
      those control module bit definitions.
      
      Integration of above two changes would cause build error in musb dsps
      glue driver (they go through different trees upstream) as is seen now
      in linux-next. Fix it by adding necessary definitions in dsps glue
      driver.
      Signed-off-by: NAfzal Mohammed <afzal@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      deeeb9ee
  14. 22 11月, 2012 4 次提交
  15. 09 11月, 2012 1 次提交
  16. 06 11月, 2012 5 次提交
  17. 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
  18. 26 10月, 2012 1 次提交
  19. 25 10月, 2012 1 次提交
    • F
      ARM: OMAP: move OMAP USB platform data to <linux/platform_data/omap-usb.h> · e8c4a7ac
      Felipe Balbi 提交于
      In order to make single zImage work for ARM architecture,
      we need to make sure we don't depend on private headers.
      
      Move USB platform_data to <linux/platform_data/omap-usb.h>
      and add a minimal drivers/mfd/usb-omap.h.
      
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Partha Basak <parthab@india.ti.com>
      Cc: Keshava Munegowda <keshava_mgowda@ti.com>
      Cc: linux-usb@vger.kernel.org
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      [tony@atomide.com: updated for local mfd/usb-omap.h]
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      e8c4a7ac
  20. 23 10月, 2012 1 次提交
  21. 11 9月, 2012 3 次提交