mmc: don't read the size of eMMC enhanced user data area in SPL
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Thu, 4 Jan 2018 14:23:35 +0000 (15:23 +0100)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 12 Jan 2018 09:11:24 +0000 (18:11 +0900)
This information is only used by the "mmc info" command.
On ARM removing this information from SPL saves about 140 of code space.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
drivers/mmc/mmc.c
include/mmc.h

index 3930aad13ba90912e65f7f0498f616a59d579c2b..c1ba57f86dd4a8b8be87f7a374c6579581ee69be 100644 (file)
@@ -2028,6 +2028,7 @@ static int mmc_startup_v4(struct mmc *mmc)
                mmc->capacity_gp[i] <<= 19;
        }
 
+#ifndef CONFIG_SPL_BUILD
        if (part_completed) {
                mmc->enh_user_size =
                        (ext_csd[EXT_CSD_ENH_SIZE_MULT + 2] << 16) +
@@ -2044,6 +2045,7 @@ static int mmc_startup_v4(struct mmc *mmc)
                if (mmc->high_capacity)
                        mmc->enh_user_start <<= 9;
        }
+#endif
 
        /*
         * Host needs to enable ERASE_GRP_DEF bit if device is
index 3abeb581aef220c0b7600b9e7a8b1d8b0a019ea2..cd068b9429bf419d67ffa99e0f846899f5b36d89 100644 (file)
@@ -598,8 +598,10 @@ struct mmc {
        u64 capacity_boot;
        u64 capacity_rpmb;
        u64 capacity_gp[4];
+#ifndef CONFIG_SPL_BUILD
        u64 enh_user_start;
        u64 enh_user_size;
+#endif
 #if !CONFIG_IS_ENABLED(BLK)
        struct blk_desc block_dev;
 #endif