1. 17 12月, 2015 1 次提交
    • T
      usb: musb: core: Fix handling of the phy notifications · 8055555f
      Tony Lindgren 提交于
      We currently can't unload omap2430 MUSB platform glue driver module and
      this cause issues for fixing the MUSB code further. The reason we can't
      remove omap2430 is because it uses the PHY functions and also exports the
      omap_musb_mailbox function that some PHY drivers are using.
      
      Let's fix the issue by exporting a more generic musb_mailbox function
      from the MUSB core and allow platform glue layers to register phy_callback
      function as needed.
      
      And now we can now also get rid of the include/linux/musb-omap.h.
      
      Cc: Bin Liu <b-liu@ti.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Cc: NeilBrown <neil@brown.name>
      Reviewed-by: NKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      8055555f
  2. 15 12月, 2015 1 次提交
  3. 09 12月, 2015 1 次提交
  4. 08 12月, 2015 1 次提交
    • T
      usb: musb: core: Fix pm runtime for deferred probe · 4d055910
      Tony Lindgren 提交于
      If musb_init_controller fails at musb_platform_init, we have already
      called pm_runtime_irq_safe for musb and that causes the pm runtime count
      to be enabled for parent before the parent has completed initialization.
      This causes pm to stop working as on unload nothing gets idled.
      
      This issue can be reproduced at least with:
      
      # modprobe omap2430
      HS USB OTG: no transceiver configured
      musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517
      # modprobe phy-twl4030-usb
      # rmmod omap2430
      
      And after the steps above omap2430 will block deeper idle states on
      omap3.
      
      To fix this, let's not enable pm runtime until we need to and the
      parent has been initialized. Note that this does not fix the issue of
      PM being broken for musb during runtime.
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4d055910
  5. 18 11月, 2015 1 次提交
  6. 17 11月, 2015 1 次提交
    • U
      usb: musb: core: fix order of arguments to ulpi write callback · 705e63d2
      Uwe Kleine-König 提交于
      There is a bit of a mess in the order of arguments to the ulpi write
      callback. There is
      
      	int ulpi_write(struct ulpi *ulpi, u8 addr, u8 val)
      
      in drivers/usb/common/ulpi.c;
      
      	struct usb_phy_io_ops {
      		...
      		int (*write)(struct usb_phy *x, u32 val, u32 reg);
      	}
      
      in include/linux/usb/phy.h.
      
      The callback registered by the musb driver has to comply to the latter,
      but up to now had "offset" first which effectively made the function
      broken for correct users. So flip the order and while at it also
      switch to the parameter names of struct usb_phy_io_ops's write.
      
      Fixes: ffb865b1 ("usb: musb: add ulpi access operations")
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      705e63d2
  7. 16 10月, 2015 1 次提交
  8. 27 9月, 2015 1 次提交
  9. 14 9月, 2015 2 次提交
  10. 26 5月, 2015 5 次提交
  11. 08 5月, 2015 3 次提交
  12. 08 4月, 2015 1 次提交
  13. 11 3月, 2015 18 次提交
  14. 09 3月, 2015 2 次提交
    • F
      usb: musb: core: improve musb_interrupt() a bit · 31a0ede0
      Felipe Balbi 提交于
      instead of using manually spelled out bit-shits
      and iterate over each of the 16-bits (one for
      each endpoint) on each direction, we can make use
      of for_each_set_bit() which internally uses
      find_first_bit().
      
      This makes the code slightly more readable while
      also making we only iterate over bits which are
      actually set.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      31a0ede0
    • F
      usb: musb: core: fix TX/RX endpoint order · e3c93e1a
      Felipe Balbi 提交于
      As per Mentor Graphics' documentation, we should
      always handle TX endpoints before RX endpoints.
      
      This patch fixes that error while also updating
      some hard-to-read comments which were scattered
      around musb_interrupt().
      
      This patch should be backported as far back as
      possible since this error has been in the driver
      since it's conception.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e3c93e1a
  15. 23 2月, 2015 1 次提交
    • F
      usb: musb: core: add pm_runtime_irq_safe() · 3e43a072
      Felipe Balbi 提交于
      We need a pm_runtime_get_sync() call from
      within musb_gadget_pullup() to make sure
      registers are accessible at that time.
      
      The problem is that musb_gadget_pullup() is
      called with IRQs disabled and, because of that,
      we need to tell pm_runtime that this pm_runtime_get_sync()
      is IRQ safe.
      
      We can simply add pm_runtime_irq_safe(), however, because
      we need to make our read/write accessor function pointers
      have been initialized before trying to use them. This means
      that all pm_runtime initialization for musb_core needs to
      be moved down so that when we call pm_runtime_irq_safe(),
      the pm_runtime_get_sync() that it calls on the parent, won't
      cause a crash due to NULL musb_read/write accessors.
      Reported-by: NPali Rohár <pali.rohar@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      3e43a072