1. 13 2月, 2017 1 次提交
    • M
      mmc: use empty initializer list to zero-clear structures · c7836d15
      Masahiro Yamada 提交于
      In the MMC subsystem, we see such initializers that only clears the
      first member explicitly.
      
      For example,
      
        struct mmc_request mrq = {NULL};
      
      sets the first member (.sbc) to NULL explicitly.  However, this is
      an unstable form because we may insert a non-pointer member at the
      top of the struct mmc_request in the future. (if we do so, the
      compiler will spit warnings.)
      
      So, using a designated initializer is preferred coding style.  The
      expression above is equivalent to:
      
        struct mmc_request mrq = { .sbc = NULL };
      
      Of course, this does not express our intention.  We want to fill
      all struct members with zeros.  Please note struct members are
      implicitly zero-cleared unless otherwise specified in the initializer.
      
      After all, the most reasonable (and stable) form is:
      
        struct mmc_request mrq = {};
      
      Do likewise for mmc_command, mmc_data as well.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      c7836d15
  2. 16 1月, 2017 1 次提交
  3. 05 12月, 2016 3 次提交
  4. 29 11月, 2016 9 次提交
  5. 25 7月, 2016 2 次提交
  6. 29 2月, 2016 1 次提交
  7. 22 12月, 2015 1 次提交
  8. 27 10月, 2015 1 次提交
    • C
      mmc: mmc: extend the mmc_send_tuning() · 9979dbe5
      Chaotian Jing 提交于
      The mmc_execute_tuning() has already prepared the opcode,
      there is no need to prepare it again at mmc_send_tuning(),
      and, there is a BUG of mmc_send_tuning() to determine the opcode
      by bus width, assume eMMC was running at HS200, 4bit mode,
      then the mmc_send_tuning() will overwrite the opcode from CMD21
      to CMD19, then got error.
      
      in addition, extend an argument of "cmd_error" to allow getting
      if there was cmd error when tune response.
      Signed-off-by: NChaotian Jing <chaotian.jing@mediatek.com>
      [Ulf: Rebased patch]
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      9979dbe5
  9. 26 10月, 2015 1 次提交
  10. 01 6月, 2015 2 次提交
  11. 19 1月, 2015 1 次提交
  12. 08 12月, 2014 1 次提交
  13. 26 11月, 2014 1 次提交
  14. 10 11月, 2014 5 次提交
  15. 24 9月, 2014 1 次提交
  16. 09 9月, 2014 1 次提交
  17. 23 2月, 2014 4 次提交
    • U
      mmc: core: Fixup busy detection for mmc switch operations · b9ec2616
      Ulf Hansson 提交于
      If the host controller supports busy detection in HW, we expect the
      MMC_CAP_WAIT_WHILE_BUSY to be set. Likewise the corresponding
      host->max_busy_timeout should reflect the maximum busy detection
      timeout supported by the host.
      
      Previously we expected a host that supported MMC_CAP_WAIT_WHILE_BUSY to
      cope with any timeout, which just isn't feasible due to HW limitations.
      
      For most switch operations, R1B responses are expected and thus we need
      to check for busy detection completion. To cope with cases where the
      requested busy detection timeout is greater than what the host are able
      to support, we fallback to use a R1 response instead. This will prevent
      the host from doing HW busy detection.
      
      In those cases, busy detection completion is handled by polling the for
      the card's status using CMD13. This is the same mechanism used when the
      host doesn't support MMC_CAP_WAIT_WHILE_BUSY.
      
      Do note, a host->max_busy_timeout set to zero, is interpreted by the
      mmc core as it don't know what the host supports. It will then provide
      the host with whatever timeout the mmc core finds suitable.
      
      For some cases the mmc core has unfurtunate no clue of what timeout to
      use. In these cases we provide the host with a timeout value of zero,
      which the host may interpret as use whatever timeout it finds suitable.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <chris@printf.net>
      b9ec2616
    • U
      mmc: core: Minor simplifications to __mmc_switch · 636bd13c
      Ulf Hansson 提交于
      Instead of using several references to card->host, let's use a local
      variable. That means we can remove the BUG_ON verifications for the
      same pointers.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <chris@printf.net>
      636bd13c
    • U
      mmc: core: Add ignore_crc flag to __mmc_switch · 4509f847
      Ulf Hansson 提交于
      Instead of handle specific adaptations, releated to certain switch
      operations, inside __mmc_switch, push this to be handled by the caller
      instead.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <chris@printf.net>
      4509f847
    • U
      mmc: core: Rename cmd_timeout_ms to busy_timeout · 1d4d7744
      Ulf Hansson 提交于
      To better reflect that the cmd_timeout_ms is directly related to the
      busy detection timeout, let's rename it.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <chris@printf.net>
      1d4d7744
  18. 09 11月, 2013 1 次提交
  19. 31 10月, 2013 1 次提交
  20. 26 9月, 2013 1 次提交
  21. 25 8月, 2013 1 次提交