1. 16 Apr, 2021 2 commits
    • Quanyang Wang's avatar
      spi: spi-zynqmp-gqspi: fix hang issue when suspend/resume · 799f923f
      Quanyang Wang authored
      After calling platform_set_drvdata(pdev, xqspi) in probe, the return
      value of dev_get_drvdata(dev) is a pointer to struct zynqmp_qspi but
      not struct spi_controller. A wrong structure type passing to the
      functions spi_controller_suspend/resume will hang the system.
      
      And we should check the return value of spi_controller_suspend, if
      an error is returned, return it to PM subsystem to stop suspend.
      
      Also, GQSPI_EN_MASK should be written to GQSPI_EN_OFST to enable
      the spi controller in zynqmp_qspi_resume since it was disabled in
      zynqmp_qspi_suspend before.
      
      Fixes: 1c26372e ("spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework")
      Signed-off-by: default avatarQuanyang Wang <quanyang.wang@windriver.com>
      Link: https://lore.kernel.org/r/20210416004652.2975446-3-quanyang.wang@windriver.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      799f923f
    • Quanyang Wang's avatar
      spi: spi-zynqmp-gqspi: fix clk_enable/disable imbalance issue · c6bdae08
      Quanyang Wang authored
      The clks "pclk" and "ref_clk" are enabled twice during the probe. The
      first time is in the function zynqmp_qspi_probe and the second time is
      in zynqmp_qspi_setup_op which is called by devm_spi_register_controller.
      Then calling zynqmp_qspi_remove (rmmod this module) to disable these clks
      will trigger a warning as below:
      
      [  309.124604] Unpreparing enabled qspi_ref
      [  309.128641] WARNING: CPU: 1 PID: 537 at drivers/clk/clk.c:824 clk_core_unprepare+0x108/0x110
      
      Since pm_runtime works now, clks can be enabled/disabled by calling
      zynqmp_runtime_suspend/resume. So we don't need to enable these clks
      explicitly in zynqmp_qspi_setup_op. Remove them to fix this issue.
      
      And remove clk enabling/disabling in zynqmp_qspi_resume because there is
      no spi transfer operation so enabling ref_clk is redundant meanwhile pclk
      is not disabled for it is shared with other peripherals.
      
      Furthermore replace clk_enable/disable with clk_prepare_enable and
      clk_disable_unprepare in runtime_suspend/resume functions.
      
      Fixes: 1c26372e ("spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework")
      Signed-off-by: default avatarQuanyang Wang <quanyang.wang@windriver.com>
      Link: https://lore.kernel.org/r/20210416004652.2975446-2-quanyang.wang@windriver.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      c6bdae08
  2. 15 Apr, 2021 6 commits
  3. 12 Apr, 2021 4 commits
  4. 09 Apr, 2021 13 commits
  5. 08 Apr, 2021 4 commits
  6. 07 Apr, 2021 2 commits
  7. 01 Apr, 2021 3 commits
  8. 31 Mar, 2021 4 commits
  9. 29 Mar, 2021 1 commit
  10. 25 Mar, 2021 1 commit