08 Feb, 2014

3 commits

  • The open and close mmc sub-commands implement a hard-coded set of values
    specific to the SMDK5250 platform. Remove these commands as what they
    did can be done instead with a series of mmc dev / bootpart / bootbus
    commands instead now.

    Cc: Amar
    Cc: Minkyu Kang
    Acked-by: Jaehoon Chung
    Signed-off-by: Tom Rini
    Signed-off-by: Pantelis Antoniou

    Tom Rini
     
  • Add a bootbus sub-command to the mmc command to allow for setting
    the boot_bus_width, reset_boot_bus_width and boot_mode fields of
    BOOT_BUS_WIDTH (EXT_CSD[177]).

    Acked-by: Jaehoon Chung
    Signed-off-by: Tom Rini
    Signed-off-by: Pantelis Antoniou

    Tom Rini
     
  • Add a partconf sub-command to the mmc command to allow for setting
    the boot_ack, boot_partition and partition_access fields of
    PARTITION_CONFIG (formerly BOOT_CONFIG, EXT_CSD[179]). Part of this
    requires changing the check for 'part' from an strncmp to a strcmp, like
    the rest of the sub-commands.

    Cc: Andy Fleming
    Cc: Pantelis Antoniou
    Acked-by: Jaehoon Chung
    Signed-off-by: Tom Rini
    Signed-off-by: Pantelis Antoniou

    Tom Rini
     

09 Jan, 2014

2 commits

  • The eMMC and the SD-Card specifications describe the optional SET_DSR command.
    During measurements at our lab we found that some cards implementing this feature
    having really strong driver strengts per default. This can lead to voltage peaks
    above the specification of the host on signal edges for data sent from a card to
    the host.

    Since availability of a given card type may be shorter than the time a certain
    hardware will be produced it is useful to have support for this command (Alternative
    would be changing termination resistors and adapting the driver strength of the
    host to the used card.)

    Following proposal for an implementation:

    - new field that reflects CSD field DSR_IMP in struct mmc
    - new field for design specific DSR value in struct mmc
    - board code can set DSR value in mmc struct just after registering an controller
    - mmc_startup sends the the stored DSR value before selecting a card, if DSR_IMP is set

    Additionally the mmc command is extended to make is possible to play around with different
    DSR values.

    The concept was tested on a i.MX53 based platform using a Micron eMMC card where the default
    DSR is 0x0400 (12mA) but in our design 0x0100 (0x0100) were enough. To use this feature for
    instance on a mx53loco one have to add a call to mmc_set_dsr() in board_mmc_init() after
    calling fsl_esdhc_initialize() for the eMMC.

    Signed-off-by: Markus Niebel
    Acked-by: Pantelis Antoniou

    Markus Niebel
     
  • The spl_mmc_load() was removed while converting to
    CONFIG_SPL_FRAMEWORK usage the definition was removed
    but the declaration was missed. This patch removes this
    declaration.

    Signed-off-by: Lad, Prabhakar
    Acked-by: Pantelis Antoniou

    Lad, Prabhakar
     

31 Oct, 2013

1 commit


18 Sep, 2013

1 commit

  • When CONFIG_MMC_SPI is not enabled, the MMC_MODE_SPI capability can
    never be set. However there is code in mmc.c which uses the
    mmc_host_is_spi macro to check that capability & act accordingly. If we
    expand that macro to 0 when CONFIG_MMC_SPI is not set (since it will
    always be 0 at runtime anyway) then the compiler can optimize away the
    SPI-specific code paths in mmc.c.

    Signed-off-by: Paul Burton

    Paul Burton
     

24 Jul, 2013

1 commit


22 Jun, 2013

1 commit


19 Jun, 2013

1 commit


14 Jun, 2013

1 commit

  • Enhance the MMC core to calculate the size of each MMC partition, and
    update mmc->capacity whenever a partition is selected. This causes:

    mmc dev 0 1 ; mmcinfo

    ... to report the size of the currently selected partition, rather than
    always reporting the size of the user partition.

    Signed-off-by: Stephen Warren
    Signed-off-by: Andy Fleming

    Stephen Warren
     

13 Jun, 2013

1 commit


07 May, 2013

1 commit

  • Most of time that MMC driver spends on initializing a device is polling
    OCR (operation conditions register). To decouple this polling loop,
    device init is split into two parts: The first part fires the OCR query
    command, and the second part polls the result. So the caller is now no
    longer bound to the OCR-polling delay; he may fire the query, go
    somewhere and then come back later for the result.

    To use this, call mmc_set_preinit() on any device which needs this.

    This can save significant amounts of time on boot (e.g. 200ms) by
    hiding the MMC init time behind other init.

    Signed-off-by: Che-Liang Chiou
    Signed-off-by: Simon Glass
    Acked-by: Jaehoon Chung
    Signed-off-by: Andy Fleming

    Che-Liang Chiou
     

02 May, 2013

1 commit


17 Apr, 2013

2 commits


09 Mar, 2013

1 commit


06 Sep, 2012

1 commit

  • Some eMMC devices contain boot partitions, but do not set the PART_SUPPORT
    bit in EXT_CSD_PARTITIONING_SUPPORT. Allow partition selection on such
    devices, by enabling partition switching when EXT_CSD_BOOT_MULT is set.

    Note that the Linux kernel enables access to boot partitions solely based
    on the value of EXT_CSD_BOOT_MULT; EXT_CSD_PARTITIONING_SUPPORT only
    influences access to "general" partitions.

    eMMC devices affected by this issue exist on various NVIDIA Tegra
    platforms (and presumably many others too), such as Harmony (plug-in eMMC),
    Seaboard, Springbank, and Whistler (plug-in eMMC).

    Signed-off-by: Stephen Warren
    Signed-off-by: Andy Fleming

    Stephen Warren
     

02 Sep, 2012

1 commit


01 Sep, 2012

1 commit

  • DA850/OMAP-L138 does not support strict MMC/SD boot mode. SPL will
    be in SPI flash and U-Boot image will be in MMC/SD card. SPL will
    do the low level initialization and then loads the u-boot image
    from MMC/SD card.

    Define CONFIG_SPL_MMC_LOAD macro in the DA850/OMAP-L138
    configuration file to enable this feature.

    Tested-by: Christian Riesch
    Signed-off-by: Lad, Prabhakar
    Signed-off-by: Rajashekhara, Sudhakar
    Signed-off-by: Hadli, Manjunath

    Lad, Prabhakar
     

09 May, 2012

2 commits


13 Mar, 2012

1 commit

  • gen_atmel_mci works on AVR32 as well, so no need to use the legacy
    mmc driver. This also has the nice side effect of being able to use
    SDHC cards an those boards.

    Signed-off-by: Sven Schnelle
    Signed-off-by: Andreas Bießmann

    Sven Schnelle
     

16 Feb, 2012

1 commit


09 Jan, 2012

2 commits

  • Check for card detect each time an MMC/SD device is initialized. If card
    detection is not implemented, this code behaves as before and continues
    assuming a card is present. If no card is detected, has_init is reset
    for the MMC/SD device (to force initialization next time) and an error
    is returned.

    Signed-off-by: Thierry Reding
    Tested-by: Jason Liu

    Thierry Reding
     
  • The new API no longer uses the extra cd parameter that was used to store
    the card presence state. Instead, this information is returned via the
    function's return value. board_mmc_getcd() returns -1 to indicate that
    no card-detection mechanism is implemented; 0 indicates that no card is
    present and 1 is returned if it was detected that a card is present.

    The rationale for this change can be found in the following email
    thread:

    http://lists.denx.de/pipermail/u-boot/2011-November/110180.html

    In summary, the old API was not consistent with the rest of the MMC API
    which always passes a struct mmc as the first parameter. Furthermore the
    cd parameter was used to mean "card absence" in some implementations and
    "card presence" in others.

    Signed-off-by: Thierry Reding
    Tested-by: Jason Liu

    Thierry Reding
     

03 Nov, 2011

1 commit


16 Jul, 2011

2 commits

  • This patch provides handling of the two way handshake when SEND_OP_COND
    (CMD1) is send to mmc card. It is necessary to inform eMMC card if the
    host can work with high capacity cards (Jedec JESD84-A441, point 7.4.3).

    The extra flag MMC_MODE_HC (high capacity) is added to indicate if the
    host is capable of handling the high capacity eMMC cards.

    Since this change is added to the generic mmc framework, then it requires
    other boards to indicate if their mmc controllers can handle high capacity
    cards. As it is now - the old behaviour of the framework is preserved.

    Signed-off-by: Lukasz Majewski
    Signed-off-by: Andy Fleming

    Łukasz Majewski
     
  • Erase is a very basic function since the begin of sd specification is
    announced. Although we could write a bulk of full 0xff memory to the
    range to take place of erase, it is more convenient and safe to
    implement the erase function itself.

    Signed-off-by: Lei Wen
    Signed-off-by: Andy Fleming
    Acked-by: Mike Frysinger

    Lei Wen
     

19 May, 2011

3 commits

  • For emmc, it may have up to 7 partitions: two boot partitions, one
    user partition, one RPMB partition and four general purpose partitions.
    (Refer to JESD84-A44.pdf/page 154)

    As bootloader may need to read out or reflashing images on those

    different partitions, it is better to enable the partition switch with
    console command support.

    Also for partition would be restore to user partition(part 0) when CMD0
    is used, so change mmc_init routine to perform normal initialization
    only once for each slot, unless use the rescan command to force init
    again.

    Signed-off-by: Lei Wen
    Acked-by: Andy Fleming

    Lei Wen
     
  • mmc command applied device, like ide and usb...

    Signed-off-by: Lei Wen
    Acked-by: Andy Fleming

    Lei Wen
     
  • A "send status" command is added with the commit "mmc: checking
    status after commands with R1b response". But the status register
    returned from send status command of SPI protocol is different from
    that of MMC/SD protocol. We do a simple test and generate a response
    in stead of full bit-by-bit translation.

    Signed-off-by: Thomas Chou

    Thomas Chou
     

29 Apr, 2011

2 commits


13 Apr, 2011

3 commits

  • The first SEND_OP_COND (CMD1) command added is used to ask card capabilities.
    After it an AND operation is done between card capabilities and host
    capabilities (at the moment only for the voltage field).
    Finally the correct value is sent to the MMC, waiting that the card
    exits from busy state.

    Signed-off-by: Raffaele Recalcati
    Signed-off-by: Andy Fleming

    Raffaele Recalcati
     
  • It is recommended to check card status after these kind of commands.
    This is done using CMD13 (SEND_STATUS) JEDEC command until
    the card is ready.
    In case of error the card status field is displayed.

    Signed-off-by: Raffaele Recalcati
    Signed-off-by: Andy Fleming

    Raffaele Recalcati
     
  • This patch supports mmc/sd card with spi interface. It is based on
    the generic mmc framework. It works with SDHC and supports multi
    blocks read/write.

    The crc checksum on data packet is enabled with the def,

    There is a subcomamnd "mmc_spi" to setup spi bus and cs at run time.

    Signed-off-by: Thomas Chou
    Signed-off-by: Andy Fleming

    Thomas Chou
     

02 Feb, 2011

1 commit

  • Added support for MMC/SD cards for Davinci. This feature is enabled by
    CONFIG_DAVINCI_MMC and is dependant on CONFIG_MMC and CONFIG_GENERIC_MMC
    options. This is tested on DM355 and DM365 EVMs with both the available mmc
    controllers.

    Signed-off-by: Alagu Sankar
    Signed-off-by: Sandeep Paulraj

    Sandeep Paulraj
     

19 Dec, 2010

1 commit

  • After booting the u-boot, and first using some SD card (such as Sandisk 2G SD
    card), because the field 'clock' of struct mmc is zero, this will cause
    the read transfer is always active and SDHC DATA line is always active,
    therefore, driver can't handle the next command.

    Therefore, we use mmc_set_clock to setup both the data structure and HW
    to the initial clock speed of 400000Hz.

    Signed-off-by: Jerry Huang
    Tested-by: Stefano Babic
    Signed-off-by: Kumar Gala

    Jerry Huang
     

03 Sep, 2010

1 commit