--- zzzz-none-000/linux-4.9.279/drivers/mmc/core/mmc.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-arm-6591-750/linux-4.9.279/drivers/mmc/core/mmc.c 2023-02-08 10:58:13.000000000 +0000 @@ -10,6 +10,13 @@ * published by the Free Software Foundation. */ +/****************************************************************** + + Includes Intel Corporation's changes/modifications dated: 07/2011. + Changed/modified portions - Copyright(c) 2011-2017, Intel Corporation. + +******************************************************************/ + #include #include #include @@ -336,12 +343,27 @@ mmc_hostname(card->host)); break; } +#ifdef CONFIG_ARCH_GEN3 + if (card->ext_csd.rev == 4) { + /* obsoleted standard JESD84-A44 */ + part_size = + (ext_csd[EXT_CSD_GP_SIZE_MULT + idx * 3 + 2] + * 64) + + (ext_csd[EXT_CSD_GP_SIZE_MULT + idx * 3 + 1] + * 8) + + ext_csd[EXT_CSD_GP_SIZE_MULT + idx * 3]; + } else { + /* standard JESD84-A441 */ +#endif part_size = (ext_csd[EXT_CSD_GP_SIZE_MULT + idx * 3 + 2] << 16) + (ext_csd[EXT_CSD_GP_SIZE_MULT + idx * 3 + 1] << 8) + ext_csd[EXT_CSD_GP_SIZE_MULT + idx * 3]; +#ifdef CONFIG_ARCH_GEN3 + } +#endif part_size *= (size_t)(hc_erase_grp_sz * hc_wp_grp_sz); mmc_part_add(card, part_size << 19,