18 May, 2020

1 commit

  • The RPMB keyslot is stored in last block of boot1 partition which
    is easily erased or tampered, set power-on write protection for this
    partition to prevent corruption.

    Test: Power-on write protection works as expected on imx8m.

    Change-Id: Ib7e1094b979f7d94c0a2817391c5b3b5f3205d76
    Signed-off-by: Luo Ji
    (cherry picked from commit c7e207fbbcd8618d29b1192829c630777fea5220)

    Luo Ji
     

27 Apr, 2020

3 commits

  • This commit is cherry-picked from community:
    commit 343749c42554b058e53086aefe21d47b383326d5
    author Kever Yang
    date Wed, 19 Jul 2017 18:13:59 +0800 (19:13 +0900)

    mmc: rpmb: update size format for write_counter

    According to MMC spec, the write_counter is 4-byte length,
    use 'int' instead of 'long' type for the 'long' is not 4-byte
    in 64 bit CPU.

    Signed-off-by: Jason Zhu
    Signed-off-by: Kever Yang
    Reviewed-by: Simon Glass
    Signed-off-by: Jaehoon Chung

    Test: Access RPMB successfully on imx8m.

    Change-Id: I402b53c990856c2cdf7c3686eabf259f5581464d
    Signed-off-by: Luo Ji

    Luo Ji
     
  • Secure Storage service in Trusty OS will compute
    the encrypted mmc frame and the rpmb proxy inject the frame
    to driver directly. So that need to export RPMB related
    interface for Secure Storage proxy use.

    Change-Id: I7f69831a20a440f597d323b610fa615fd4344d05
    Signed-off-by: Haoran.Wang
    (cherry picked from commit 4d2c1873ce8221e35874265e41dc42a6df169659)
    (cherry picked from commit ce4e9dc35ff89a2429224ae6d0ffb4109cb42e28)
    (cherry picked from commit 412ece12209e2f916616053ad65b421e95c07955)

    Haoran.Wang
     
  • Porting the FSL android fastboot features from imx u-boot v2018.03 to
    support all SoCs: imx6/imx7/imx7ulp/imx8/imx8m.

    The UUU commands like UCmd and ACmd are also added. Users need set
    CONFIG_FASTBOOT_UUU_SUPPORT=y to enable the feature.

    Signed-off-by: Frank Li
    Signed-off-by: Ye Li
    (cherry picked from commit 65120b06a7f750b9b1a6e0db3d2082cc7088d5a8)
    (cherry picked from commit 9b149c2a28829fe7017f83981d634157bc31cc94)

    Ye Li
     

09 Mar, 2020

4 commits


20 Feb, 2020

1 commit


16 Jan, 2020

1 commit

  • It was observed (on ClearFog Base) that sending MMC APP_CMD returned
    an error on the first attempt. The issue appears to be timing related
    since even inserting a puts() short debug entry before the execution
    added sufficient delay to receive success on first attempt.

    Follow the existing quirks pattern to retry if initial issuance
    failed so as to not introduce any delay unless needed.

    Signed-off-by: Joel Johnson

    Joel Johnson
     

10 Oct, 2019

2 commits

  • Some MMC peripherals require specific power cycle sequence, where some
    registers need to be written between the regulator is turned off and then
    back on. This is the case for the MMC IP embedded in STM32MP1 SoC.

    In STM32MP157 reference manual [1], the power cycle sequence is:
    1. Reset the SDMMC with the RCC.SDMMCxRST register bit. This will reset
    the SDMMC to the reset state and the CPSM and DPSM to the Idle state.
    2. Disable the Vcc power to the card.
    3. Set the SDMMC in power-cycle state. This will make that the
    SDMMC_D[7:0], SDMMC_CMD and SDMMC_CK are driven low, to prevent the card
    from being supplied through the signal lines.
    4. After minimum 1ms enable the Vcc power to the card.
    5. After the power ramp period set the SDMMC to the power-off state for
    minimum 1ms. The SDMMC_D[7:0], SDMMC_CMD and SDMMC_CK are set to
    drive “1”.
    6. After the 1ms delay set the SDMMC to power-on state in which the
    SDMMC_CK clock will be enabled.
    7. After 74 SDMMC_CK cycles the first command can be sent to the card.

    The step 3. cannot be handled by the current framework implementation.
    A new callback (host_power_cycle) is created, and called in
    mmc_power_cycle(), after mmc_power_off().

    The incorrect power cycle sequence has shown some boot failures on
    STM32MP1 with some SD-cards, especially on cold boots when the input
    frequency is low (

    Yann Gautier
     
  • In SPL, all the available mmc devices gets initialized during boot.
    This might not work in cases where clocks are not available for
    certain mmc devices(other than boot device) and the support for
    enabling device might not be ready.

    Texas Instruments' K3 J721E device having a central system controller
    (dmsc) is one such example falling in this category. Below is the
    sequence for the failing scenario:
    - ROM comes up in SD mode and loads SPL by just initialing SD card.
    - SPL loads dmsc firmware from SD Card.
    Since ROM has enabled SD, SPL need not enable the SD, just need
    to re initialize the card. But SPL is trying to initialize other MMC
    instances which are in disabled state. Since dmsc firmware is not yet
    available, devices cannot be enabled. So in SPL, initialize only the
    mmc device that is needed.

    Signed-off-by: Lokesh Vutla
    Reviewed-by: Peng Fan

    Lokesh Vutla
     

05 Sep, 2019

1 commit

  • It's quite hard to figure out time units for various function that have
    timeout parameters. This leads to possible errors when one forgets to
    convert ms to us, for example. Let's rename those parameters
    correspondingly to 'timeout_us' and 'timeout_ms' to prevent such issues
    further.

    While at it, add time units info as comments to struct mmc fields.

    This commit doesn't change the behavior, only renames parameters names.
    Buildman should report no changes at all.

    Signed-off-by: Sam Protsenko
    Reviewed-by: Peng Fan
    Reviewed-by: Igor Opaniuk

    Sam Protsenko
     

15 Jul, 2019

7 commits


17 Feb, 2019

1 commit

  • Older kernel versions or systems which do not connect eMMC reset line
    properly may not be able to handle situations where either the eMMC
    is left in HS200/HS400 mode or SD card in UHS modes by the bootloader
    and may misbehave. Downgrade the eMMC to HS/HS52 mode and/or SD card
    to non-UHS mode before booting the kernel to allow such older kernels
    to work with modern U-Boot.

    Signed-off-by: Marek Vasut
    Cc: Tom Rini

    Marek Vasut
     

18 Jan, 2019

1 commit

  • Patch fixes build error when enabling CONFIG_ENV_IS_IN_SPI_FLAS
    and CONFIG_ENV_IS_IN_MMC at the same time mentioned issue in
    below link:

    Refer: https://lists.denx.de/pipermail/u-boot/2018-February/319565.html

    build error when enabling CONFIG_ENV_IS_IN_SPI_FLASH and
    CONFIG_ENV_IS_IN_MMC at the same time.

    Signed-off-by: Rajesh Bhagat
    Reviewed-by: York Sun

    Rajesh Bhagat
     

07 Oct, 2018

1 commit


11 Sep, 2018

1 commit

  • Add HS400 support.
    Selecting HS400 needs first select HS200 according to spec, so use
    a dedicated function for HS400.
    Add HS400 related macros.
    Remove the restriction of only using the low 6 bits of
    EXT_CSD_CARD_TYPE, using all the 8 bits.

    Signed-off-by: Peng Fan
    Cc: Jaehoon Chung
    Cc: Jean-Jacques Hiblot
    Cc: Stefano Babic
    Cc: Kishon Vijay Abraham I
    Cc: Faiz Abbas
    Cc: Marek Vasut
    Signed-off-by: Peng Fan

    Peng Fan
     

23 Jul, 2018

2 commits


08 May, 2018

1 commit

  • mmc_set_clock() function has the disable argument as bool type.
    When mmc_set_clock is called, it might be passed to "true" or "false".
    But it's too confusion whether clock is enabled or disabled with only
    "true" and "false".
    To prevent the confusion, replace to MMC_CLK_ENABLE/DISABLE macro from
    true/false.

    Signed-off-by: Jaehoon Chung

    Jaehoon Chung
     

07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

19 Feb, 2018

1 commit

  • The correspondence between mmc versions as used in u-boot and the version
    numbers reported in register EXT_CSD_REV is wrong for versions above and
    including MMC_VERSION_4_41. All those versions were shifted by one:
    real 4.5 hardware appeared to be MMC_VERSION_5_0.

    Fix this by adding the missing version in the correspondence table.

    Reported-by: eil Eilmsteiner Heribert
    Signed-off-by: Jean-Jacques Hiblot
    Reviewed-by: Simon Glass
    Reviewed-by: Sam Protsenko

    Jean-Jacques Hiblot
     

12 Jan, 2018

11 commits