1. 10 Aug, 2017 1 commit
    • Johan Hovold's avatar
      ARM: OMAP2+: omap_device: drop broken RPM status update from suspend_noirq · 90de9634
      Johan Hovold authored
      Since commit a8636c89 ("PM / Runtime: Don't allow to suspend a
      device with an active child"), which went into 4.10, it is no longer
      permitted to set RPM_SUSPENDED state for a device with active children
      (unless power.ignore_children is set).
      
      This specifically means that the attempts to do just that from the omap
      pm-domain suspend_noirq callback have since been failing whenever a
      child is active, for example:
      
        am335x-usb-childs 47400000.usb: runtime PM trying to suspend
          device but active child
      
      Silence this warning by dropping the broken pm_runtime_set_suspended()
      call from the omap suspend_noirq callback along with the redundant
      pm_runtime_set_active() in resume_noirq.
      
      This effectively reverts commit 3522bf7b ("ARM: OMAP2+: omap_device:
      maintain sane runtime pm status around suspend/resume"), which started
      updating the RPM state after the runtime_suspend callback (!) for active
      omap devices had been called during system suspend. The rationale was
      that a later pm_runtime_get_sync() would then fail (even after runtime
      pm had been disabled) and that this in turn would avoid any external
      aborts when accessing registers with clocks disabled. (See also commit
      6f3c77b0 ("PM / Runtime: let rpm_resume() succeed if RPM_ACTIVE,
      even when disabled, v2").
      
      But during the suspend_noirq phase all children would already have been
      suspended and their drivers would specifically not attempt any further
      register accesses. And if this was all just a workaround for random
      device drivers doing cross-tree calls during system suspend, those
      drivers should be fixed and updated to explicitly model such
      dependencies using device-links instead (and either way, any such calls
      have been causing crashes since 4.10).
      
      Fixes: 3522bf7b ("ARM: OMAP2+: omap_device: maintain sane runtime pm status around suspend/resume")
      Fixes: a8636c89 ("PM / Runtime: Don't allow to suspend a device with an active child")
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Dave Gerlach <d-gerlach@ti.com>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Nishanth Menon <nm@ti.com>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Ulf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Tested-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      90de9634
  2. 12 Jul, 2017 1 commit
  3. 05 Jul, 2017 3 commits
  4. 30 Jun, 2017 2 commits
    • Tony Lindgren's avatar
      ARM: OMAP4: Fix legacy code clean-up regression · c5b39558
      Tony Lindgren authored
      Commit 2a26d31b ("ARM: OMAP2+: Remove unused legacy code for PRM")
      removed PRM platform init code that I thought is unused. Turns out omap4
      still needs this code, so let's do a partial revert to add it back.
      
      I probably missed this earlier as the comments used to say
      "OMAP4+ is DT only now" for !of_have_populated_dt() to exit early and
      missed the negative test. Let's not add those lines back as they are
      confusing and no longer needed as we only boot in device tree mode.
      
      Without things things can mysterious fail for i2c, for example LM75
      I2C temperature sensor can stop working as the PRM interrupts won't work.
      
      Fixes: 2a26d31b ("ARM: OMAP2+: Remove unused legacy code for PRM")
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      c5b39558
    • Tony Lindgren's avatar
      ARM: OMAP2+: Fix omap3 prm shared irq · 324dd7a6
      Tony Lindgren authored
      Shared interrupts with IRQ_NOAUTOEN got a warning added with commit
      04c848d3 ("genirq: Warn when IRQ_NOAUTOEN is used with shared
      interrupts").
      
      Let's just drop the IRQ_NOAUTOEN use for omap3 PRM shared interrupt as
      it does not seem to cause any other issues based on my testing. We have
      moved a lot of the code to initialize later, and whatever problems the
      legacy booting had seem to be gone now with pinctrl driver and device
      tree based booting.
      
      Otherwise we will get:
      
      WARNING: CPU: 0 PID: 1 at kernel/irq/manage.c:1348 __setup_irq+0x5d0/0x64c
      [<c01b0260>] (__setup_irq) from [<c01b0480>]
      (request_threaded_irq+0xdc/0x188)
      [<c01b0480>] (request_threaded_irq) from [<c051c780>]
      (pcs_probe+0x6ec/0x8a4)
      [<c051c780>] (pcs_probe) from [<c05a84b8>] (platform_drv_probe+0x50/0xb0)
      [<c05a84b8>] (platform_drv_probe) from [<c05a6288>]
      (driver_probe_device+0x33c/0x478)
      
      Note that we also need to remove the related enable_irq() to avoid
      getting the following:
      
      WARNING: CPU: 0 PID: 1 at kernel/irq/manage.c:529 enable_irq+0x34/0x70
      [<c01afa04>] (enable_irq) from [<c0c0f1fc>] (omap3_pm_init+0x118/0x3f8)
      [<c0c0f1fc>] (omap3_pm_init) from [<c0c0ae7c>] (am35xx_init_late+0x10/0x18)
      
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      324dd7a6
  5. 14 Jun, 2017 4 commits
  6. 12 Jun, 2017 2 commits
  7. 08 Jun, 2017 13 commits
  8. 06 Jun, 2017 7 commits
  9. 16 May, 2017 3 commits
  10. 13 May, 2017 4 commits