1. 16 Jul, 2018 5 commits
    • Simon Horman's avatar
      mmc: core: more fine-grained hooks for HS400 tuning · ba6c7ac3
      Simon Horman authored
      This adds two new HS400 tuning operations:
      * hs400_downgrade
      * hs400_complete
      
      These supplement the existing HS400 operation:
      * prepare_hs400_tuning
      
      This is motivated by a requirement of Renesas SDHI for the following:
      1. Disabling SCC before selecting to HS if selection of HS400 has occurred.
         This can be done in an implementation of prepare_hs400_tuning_downgrade
      2. Updating registers after switching to HS400
         This can be done in an implementation of complete_hs400_tuning
      
      If hs400_downgrade or hs400_complete are not implemented then they are not
      called. Thus means there should be no affect for existing drivers as none
      implemt these ops.
      Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      ba6c7ac3
    • Marek Szyprowski's avatar
      mmc: dw_mmc-exynos: fix potential external abort in resume_noirq() · ecf7c7c5
      Marek Szyprowski authored
      dw_mci_exynos_resume_noirq() performs DWMMC register access without
      ensuring that respective clocks are enabled. This might cause external
      abort on some systems (observed on Exynos5433 based boards). Fix this
      by forcing a PM runtime active state before register access. Using
      SET_NOIRQ_SYSTEM_SLEEP_PM_OPS allows also to cleanup conditional code
      a bit.
      Suggested-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      ecf7c7c5
    • Aapo Vienamo's avatar
      mmc: tegra: Use sdhci_pltfm_clk_get_max_clock · 75067aba
      Aapo Vienamo authored
      The sdhci get_max_clock callback is set to sdhci_pltfm_clk_get_max_clock
      and tegra_sdhci_get_max_clock is removed. It appears that the
      shdci-tegra specific callback was originally introduced due to the
      requirement that the host clock has to be twice the bus clock on DDR50
      mode. As far as I can tell the only effect the removal has on DDR50 mode
      is in cases where the parent clock is unable to supply the requested
      clock rate, causing the DDR50 mode to run at a lower frequency.
      Currently the DDR50 mode isn't enabled on any of the SoCs and would also
      require configuring the SDHCI clock divider register to function
      properly.
      
      The problem with tegra_sdhci_get_max_clock is that it divides the clock
      rate by two and thus artificially limits the maximum frequency of faster
      signaling modes which don't have the host-bus frequency ratio requirement
      of DDR50 such as SDR104 and HS200. Furthermore, the call to
      clk_round_rate() may return an error which isn't handled by
      tegra_sdhci_get_max_clock.
      Signed-off-by: default avatarAapo Vienamo <avienamo@nvidia.com>
      Acked-by: default avatarThierry Reding <treding@nvidia.com>
      Tested-by: default avatarThierry Reding <treding@nvidia.com>
      Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      75067aba
    • Shawn Lin's avatar
      mmc: core: Adjust and reuse the macro of R1_STATUS(x) · a94a7483
      Shawn Lin authored
      R1_STATUS(x) now is only used by ioctl_rpmb_card_status_poll(),
      which checks all bits as possible. But according to the spec,
      bit 17 and bit 18 should be ignored, as well bit 14 which is
      reserved(must be set to 0) quoting from the spec and these rule
      apply to all places checking the device status. So change
      its checking from 0xFFFFE000 to 0xFFF9A000.
      
      As a bonus, we reuse it for mmc_do_erase() as well as
      mmc_switch_status_error().
      (1) Currently mmc_switch_status_error() doesn't check bit 25, but
      it means device is locked but not unlocked by CMD42 prior to any
      operations which need check busy, which is also not allowed.
      (2) mmc_do_erase() also forgot to to check bit 15, WP_ERASE_SKIP.
      The spec says "Only partial address space was erased due to existing
      write protected blocks.", which obviously means we should fail this I/O.
      Otherwise, the partial erased data stored in nonvalatile flash violates
      the data integrity from the view of I/O owner, which probably confuse
      it when further used.
      
      So reusing R1_STATUS for them not only improve the readability but also
      slove real problems.
      Signed-off-by: default avatarShawn Lin <shawn.lin@rock-chips.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      a94a7483
    • Ulf Hansson's avatar
      Merge branch 'next_pxa_dma' into next · 2fb166e5
      Ulf Hansson authored
      2fb166e5
  2. 15 Jul, 2018 2 commits
  3. 14 Jul, 2018 19 commits
  4. 13 Jul, 2018 14 commits