1. 04 6月, 2015 1 次提交
    • J
      mmc: sdhci-pxav3: fix device wakeup initialization · 83dc9fec
      Jisheng Zhang 提交于
      MMC_PM_KEEP_POWER doesn't imply MMC_PM_WAKE_SDIO_IRQ, we should only
      enable device wake up when MMC_PM_WAKE_SDIO_IRQ is set. And "pm_flags"
      is the requested pm features, we should not set it in the host driver.
      
      At the same time, device wakeup is disabled by default, so there's no
      need to disable device wakeup explicitly.
      
      This patch fixes the warning as following:
      
      [   64.616651] ------------[ cut here ]------------
      [   64.616665] WARNING: CPU: 0 PID: 79 at linux/kernel/irq/manage.c:603 irq_set_irq_wake+0xf0/0x11c()
      [   64.616667] Unbalanced IRQ 87 wake disable
      Signed-off-by: NJisheng Zhang <jszhang@marvell.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      83dc9fec
  2. 01 6月, 2015 1 次提交
  3. 29 1月, 2015 4 次提交
  4. 28 1月, 2015 1 次提交
    • J
      mmc: sdhci-pxav3: fix race between runtime pm and irq · 3bb10f60
      Jisheng Zhang 提交于
      This patch is to fix a race condition that may cause an unhandled irq,
      which results in big sdhci interrupt numbers and endless "mmc1: got irq
      while runtime suspended" msgs before v3.15.
      
      Consider following scenario:
      
            CPU0                            CPU1
                                    sdhci_pxav3_runtime_suspend()
                                     spin_lock_irqsave(&host->lock, flags);
       sdhci_irq()
        spining on the &host->lock
                                     host->runtime_suspended = true;
                                     spin_unlock_irqrestore(&host->lock, flags);
        get the &host->lock
        runtime_suspended is true now
        return IRQ_NONE;
      
      Fix this race by using the core sdhci.c supplied sdhci_runtime_suspend_host()
      in runtime suspend hook which will disable card interrupts. We also use the
      sdhci_runtime_resume_host() in the runtime resume hook accordingly.
      Signed-off-by: NJisheng Zhang <jszhang@marvell.com>
      Cc: <stable@vger.kernel.org> # v3.9+
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      3bb10f60
  5. 21 1月, 2015 1 次提交
  6. 19 1月, 2015 2 次提交
  7. 12 1月, 2015 1 次提交
    • T
      mmc: sdhci-pxav3: do the mbus window configuration after enabling clocks · aa8165f9
      Thomas Petazzoni 提交于
      In commit 5491ce3f ("mmc: sdhci-pxav3: add support for the Armada
      38x SDHCI controller"), the sdhci-pxav3 driver was extended to include
      support for the SDHCI controller found in the Armada 38x
      processor. This mainly involved adding some MBus window related
      configuration.
      
      However, this configuration is currently done too early in ->probe():
      it is done before clocks are enabled, while this configuration
      involves touching the registers of the controller, which will hang the
      SoC if the clock is disabled. It wasn't noticed until now because the
      bootloader typically leaves gatable clocks enabled, but in situations
      where we have a deferred probe (due to a CD GPIO that cannot be taken,
      for example), then the probe will be re-tried later, after a clock
      disable has been done in the exit path of the failed probe attempt of
      the device. This second probe() will hang the system due to the clock
      being disabled.
      
      This can for example be produced on Armada 385 GP, which has a CD GPIO
      connected to an I2C PCA9555. If the driver for the PCA9555 is not
      compiled into the kernel, then we will have the following sequence of
      events:
      
        1. The SDHCI probes
        2. It does the MBus configuration (which works, because the clock is
           left enabled by the bootloader)
        3. It enables the clock
        4. It tries to get the CD GPIO, which fails due to the driver being
           missing, so -EPROBE_DEFER is returned.
        5. Before returning -EPROBE_DEFER, the driver cleans up what was
           done, which includes disabling the clock.
        6. Later on, the SDHCI probe is tried again.
        7. It does the MBus configuration, which hangs because the clock is
           no longer enabled.
      
      This commit does the obvious fix of doing the MBus configuration after
      the clock has been enabled by the driver.
      
      Fixes: 5491ce3f ("mmc: sdhci-pxav3: add support for the Armada 38x SDHCI controller")
      Cc: <stable@vger.kernel.org> # v3.15+
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      aa8165f9
  8. 05 12月, 2014 1 次提交
  9. 10 11月, 2014 7 次提交
  10. 10 9月, 2014 1 次提交
  11. 09 9月, 2014 2 次提交
  12. 11 8月, 2014 1 次提交
  13. 22 5月, 2014 5 次提交
  14. 30 3月, 2014 1 次提交
  15. 25 8月, 2013 1 次提交
  16. 28 6月, 2013 1 次提交
    • D
      sdhci-pxav3: Fix runtime PM initialization · 0dcaa249
      Daniel Drake 提交于
      Commit bb691ae4 breaks boot on OLPC
      XO-4, it hangs somewhere inside sdhci_add_host.
      
      When pm_runtime_set_autosuspend_delay() was being called, the device's
      usage counter was 0, causing the PM layer to runtime-suspend the
      device.  We then went on to call sdhci_add_host() on a suspended
      device, which hung.
      
      Fix this by making the driver consistent with the omap_hsmmc driver,
      both in terms of runtime PM initialization and error handling. Now
      the device is not runtime-suspended until we exit the probe routine.
      Signed-off-by: NDaniel Drake <dsd@laptop.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      0dcaa249
  17. 27 6月, 2013 1 次提交
  18. 31 5月, 2013 1 次提交
  19. 27 5月, 2013 1 次提交
  20. 04 4月, 2013 4 次提交
  21. 23 3月, 2013 1 次提交
  22. 25 2月, 2013 1 次提交