05 May, 2015

10 commits

  • We need to clear the allocated memory explicitly as the included
    struct sdhci_host has function pointers. Those are compared to NULL to
    test if this (optional) feature is supported. Leaving them undefined let
    u-boot jump to arbitrary memory.

    Signed-off-by: Alexander Stein

    Alexander Stein
     
  • Freescale eMMC44 adapter card uses Micron N2M400FDB311A3CF eMMC
    memory. According to the silicon datasheet, secure erase timeout
    is 600ms. So increase erase timeout value from 250ms to 600ms.

    Signed-off-by: Yangbo Lu
    Cc: York Sun

    Yangbo Lu
     
  • Timeout interrupt also work for response busy command(R1b) like
    cmd38/cmd6. So need to set it accordingly. Current code only
    set timeout for data command.

    Signed-off-by: Kevin Liu
    Signed-off-by: Rob Herring
    Cc: Pantelis Antoniou

    Kevin Liu
     
  • 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
    implementation.

    [panto] Hand merged and renumbering MMC_MODE_DDR_52MHz.

    Signed-off-by: Rob Herring
    Signed-off-by: Pantelis Antoniou
    Cc: Pantelis Antoniou

    Rob Herring
     
  • 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: Andrew Gabbasov

    Andrew Gabbasov
     
  • 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
    conditions.

    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: Andrew Gabbasov

    Andrew Gabbasov
     
  • 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: Andrew Gabbasov

    Andrew Gabbasov
     
  • 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: Andrew Gabbasov

    Andrew Gabbasov
     
  • 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: Andrew Gabbasov

    Andrew Gabbasov
     
  • The version flag constant name used in IS_MMC macro is incorrect/undefined.

    Signed-off-by: Andrew Gabbasov

    Andrew Gabbasov
     

29 Apr, 2015

29 commits


28 Apr, 2015

1 commit