1. 05 May, 2015 6 commits
    • Rob Herring's avatar
      mmc: remove the MMC_MODE_HC flag · 5a20397b
      Rob Herring authored
      High capacity support is not a host capability, but a device capability
      that is queried via the OCR. The flag in the operating conditions
      request argument can just be set unconditionally. This matches the Linux
      [panto] Hand merged and renumbering MMC_MODE_DDR_52MHz.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarPantelis Antoniou <pantelis.antoniou@konsulko.com>
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
    • Andrew Gabbasov's avatar
      mmc: Fix splitting device initialization · bd47c135
      Andrew Gabbasov authored
      Starting part of device initialization sets the init_in_progress flag
      only if the MMC card did not yet come to ready state and needs to continue
      polling. If the card is SD or if the MMC card became ready quickly,
      the flag is not set and (if using pre-initialization) the starting
      phase will be re-executed from mmc_init function.
      Set the init_in_progress flag in all non-error cases. Also, move flags
      setting statements around so that the flags are not set in error paths.
      Also, IN_PROGRESS return status becomes unnecessary, so get rid of it.
      Signed-off-by: default avatarAndrew Gabbasov <andrew_gabbasov@mentor.com>
    • Andrew Gabbasov's avatar
      mmc: Restructure polling loops to avoid extra delays · 1677eef4
      Andrew Gabbasov authored
      The polling loops in sd_send_op_cond and mmc_complete_op_cond functions
      check the ready flag state at the end of the loop, that is after executing
      a delay inside the loop, which, in case of exiting with no error,
      is not needed. Also, one of these loops, as well as the loop
      in mmc_send_status, have the delay just before exiting on timeout
      Restructure all these loops to check the respective conditions before making
      a delay for the next loop pass, and to appropriately exit without the delay.
      Signed-off-by: default avatarAndrew Gabbasov <andrew_gabbasov@mentor.com>
    • Andrew Gabbasov's avatar
      mmc: Continue polling MMC card for OCR only if it is still not ready · cc17c01f
      Andrew Gabbasov authored
      Some MMC cards come to ready state quite quickly, so that the respective
      flag appears to be set in mmc_send_op_cond already. In this case trying
      to continue polling the card with CMD1 in mmc_complete_op_cond is incorrect
      and may lead to unpredictable results. So check the flag before polling
      and skip it appropriately.
      Signed-off-by: default avatarAndrew Gabbasov <andrew_gabbasov@mentor.com>
    • Andrew Gabbasov's avatar
      mmc: Do not pass external mmc_cmd structure to mmc_send_op_cond_iter() · 5289b535
      Andrew Gabbasov authored
      The previous change to use 'ocr' structure field for storing send_op_cond
      command response also stopped using command response directly
      outside of mmc_send_op_cond_iter(). Now it becomes possible to use
      command structure in mmc_send_op_cond_iter() locally, removing a necessity
      to pass it as an argument from the caller.
      Signed-off-by: default avatarAndrew Gabbasov <andrew_gabbasov@mentor.com>
    • Andrew Gabbasov's avatar
      mmc: Avoid extra duplicate entry in mmc device structure · a626c8d4
      Andrew Gabbasov authored
      The 'op_cond_response' field in mmc structure contains the response
      from the last SEND_OP_COND MMC command while making iterational
      polling of the card. Later it is copied to 'ocr' field, designed
      to contain the OCR register value, which is actually the same
      response from the same command. So, these fields have actually
      the same data, just in different time periods. It's easier to use
      the same 'ocr' field in both cases at once, without temporary using
      of the 'op_cond_response' field.
      Signed-off-by: default avatarAndrew Gabbasov <andrew_gabbasov@mentor.com>
  2. 29 Apr, 2015 3 commits
  3. 28 Apr, 2015 6 commits
  4. 27 Apr, 2015 1 commit
  5. 23 Apr, 2015 24 commits