mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
mmc: remove hc_wp_grp_size from struct mmc if not needed
hc_wp_grp_size is needed only if hardware partitionning is used. On ARM removing it saves about 30 bytes of code space. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
This commit is contained in:

committed by
Jaehoon Chung

parent
173c06dfcc
commit
b7a6e2c9c3
@ -54,8 +54,10 @@ static void print_mmcinfo(struct mmc *mmc)
|
|||||||
bool has_enh = (mmc->part_support & ENHNCD_SUPPORT) != 0;
|
bool has_enh = (mmc->part_support & ENHNCD_SUPPORT) != 0;
|
||||||
bool usr_enh = has_enh && (mmc->part_attr & EXT_CSD_ENH_USR);
|
bool usr_enh = has_enh && (mmc->part_attr & EXT_CSD_ENH_USR);
|
||||||
|
|
||||||
|
#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
|
||||||
puts("HC WP Group Size: ");
|
puts("HC WP Group Size: ");
|
||||||
print_size(((u64)mmc->hc_wp_grp_size) << 9, "\n");
|
print_size(((u64)mmc->hc_wp_grp_size) << 9, "\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
puts("User Capacity: ");
|
puts("User Capacity: ");
|
||||||
print_size(mmc->capacity_user, usr_enh ? " ENH" : "");
|
print_size(mmc->capacity_user, usr_enh ? " ENH" : "");
|
||||||
|
@ -2098,9 +2098,11 @@ static int mmc_startup_v4(struct mmc *mmc)
|
|||||||
* (erase_gmul + 1);
|
* (erase_gmul + 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
|
||||||
mmc->hc_wp_grp_size = 1024
|
mmc->hc_wp_grp_size = 1024
|
||||||
* ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE]
|
* ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE]
|
||||||
* ext_csd[EXT_CSD_HC_WP_GRP_SIZE];
|
* ext_csd[EXT_CSD_HC_WP_GRP_SIZE];
|
||||||
|
#endif
|
||||||
|
|
||||||
mmc->wr_rel_set = ext_csd[EXT_CSD_WR_REL_SET];
|
mmc->wr_rel_set = ext_csd[EXT_CSD_WR_REL_SET];
|
||||||
|
|
||||||
|
@ -589,7 +589,9 @@ struct mmc {
|
|||||||
uint write_bl_len;
|
uint write_bl_len;
|
||||||
uint erase_grp_size; /* in 512-byte sectors */
|
uint erase_grp_size; /* in 512-byte sectors */
|
||||||
#endif
|
#endif
|
||||||
|
#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
|
||||||
uint hc_wp_grp_size; /* in 512-byte sectors */
|
uint hc_wp_grp_size; /* in 512-byte sectors */
|
||||||
|
#endif
|
||||||
#if CONFIG_IS_ENABLED(MMC_WRITE)
|
#if CONFIG_IS_ENABLED(MMC_WRITE)
|
||||||
struct sd_ssr ssr; /* SD status register */
|
struct sd_ssr ssr; /* SD status register */
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user