arm: mvebu: Espressobin: Use function mmc_get_op_cond() for detecting eMMC
authorPali Rohár <pali@kernel.org>
Wed, 14 Jul 2021 14:37:28 +0000 (16:37 +0200)
committerStefan Roese <sr@denx.de>
Thu, 15 Jul 2021 08:53:05 +0000 (10:53 +0200)
Use function mmc_get_op_cond() instead of mmc_init() for detecting presence
of eMMC. Documentation for this function says that it could be used to
detect the presence of SD/eMMC when no card detect logic is available.

This function is also used by mx6cuboxi board for detecting presence of eMMC.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
board/Marvell/mvebu_armada-37xx/board.c

index 5ff940c..5af3f2f 100644 (file)
@@ -124,7 +124,7 @@ int board_late_init(void)
 
        /* eMMC is mmc dev num 1 */
        mmc_dev = find_mmc_device(1);
-       emmc = (mmc_dev && mmc_init(mmc_dev) == 0);
+       emmc = (mmc_dev && mmc_get_op_cond(mmc_dev) == 0);
 
        /* if eMMC is not present then remove it from DM */
        if (!emmc && mmc_dev) {