1. 07 Jun, 2020 2 commits
    • 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. 30 May, 2020 14 commits
  3. 29 May, 2020 18 commits
  4. 28 May, 2020 6 commits