Skip to content
  1. Jun 08, 2020
    • Anson Huang's avatar
      mailbox: imx: ONLY IPC MU needs IRQF_NO_SUSPEND flag · b7b2796b
      Anson Huang authored
      
      
      IPC MU has no power domain assigned and there could be IPC during
      noirq suspend phase, so IRQF_NO_SUSPEND flag is needed for IPC MU.
      However, for other MUs, they have power domain assigned and their
      power will be turned off during noirq suspend phase, but with
      IRQF_NO_SUSPEND set, their interrupts are NOT disabled even after
      their power turned off, it will cause system crash when mailbox
      driver trys to handle pending interrupts but the MU power is already
      turned off.
      
      So, IRQF_NO_SUSPEND flag should ONLY be added to IPC MU which has
      power domain managed by SCU, then all other MUs' pending interrupts
      after noirq suspend phase will be handled after system resume.
      
      Signed-off-by: default avatarAnson Huang <Anson.Huang@nxp.com>
      Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
      b7b2796b
    • Anson Huang's avatar
      mailbox: imx: Add runtime PM callback to handle MU clocks · bb2b2624
      Anson Huang authored
      
      
      Some of i.MX8M SoCs have MU clock, they need to be managed in runtime
      to make sure the MU clock can be off in runtime, add runtime PM callback
      to handle MU clock.
      
      And on i.MX8MP, the MU clock is combined with power domain and runtime
      PM is enabled for the clock driver, during noirq suspend/resume phase,
      runtime PM is disabled by device suspend, but the MU context save/restore
      needs to enable MU clock for register access, calling clock prepare/enable
      will trigger runtime resume failure and lead to system suspend failed.
      
      Actually, the MU context save/restore is ONLY necessary for SCU IPC MU,
      other MUs especially on i.MX8MP platforms which have MU clock assigned,
      they need to runtime request/free mailbox channel in the consumer driver,
      so no need to save/restore MU context for them, hence it can avoid this
      issue, so the MU context save/restore is ONLY applied to i.MX platforms
      MU instance without clock present.
      
      Signed-off-by: default avatarAnson Huang <Anson.Huang@nxp.com>
      Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
      bb2b2624
    • Dong Aisheng's avatar
      mailbox: imx: Add context save/restore for suspend/resume · ba5f9fa0
      Dong Aisheng authored
      
      
      For "mem" mode suspend on i.MX8 SoCs, MU settings could be
      lost because its power is off, so save/restore is needed
      for MU settings during suspend/resume. However, the restore
      can ONLY be done when MU settings are actually lost, for the
      scenario of settings NOT lost in "freeze" mode suspend, since
      there could be still IPC going on multiple CPUs, restoring the
      MU settings could overwrite the TIE by mistake and cause system
      freeze, so need to make sure ONLY restore the MU settings when
      it is powered off, Anson fixes this by checking whether restore
      is actually needed when resume.
      
      Signed-off-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
      Signed-off-by: default avatarAnson Huang <Anson.Huang@nxp.com>
      Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
      ba5f9fa0
  2. May 31, 2020
  3. May 30, 2020
  4. May 29, 2020