]> git.ipfire.org Git - people/ms/u-boot.git/commit - drivers/mmc/mmc.c
mmc: incomplete test to switch to high-capacity group size definitions
authorDiego Santa Cruz <Diego.SantaCruz@spinetix.com>
Tue, 23 Dec 2014 09:50:20 +0000 (10:50 +0100)
committerPantelis Antoniou <pantelis.antoniou@konsulko.com>
Mon, 19 Jan 2015 15:02:29 +0000 (17:02 +0200)
commit0c453bb76c9578139e1c43e4f0d7a5575fafce8e
tree5eb8ff6a9b5ba8b1598a4500cd5c7ffa5827ddd3
parent525ada21719298833088bfc29056c56cb4b29c26
mmc: incomplete test to switch to high-capacity group size definitions

The eMMC spec mandates that the high-capacity group size definitions
should be enabled when the device is partitioned (by setting
ERASE_GROUP_DEF in EXT_CSD). The current test to determine when this is
required misses a few cases. In particular a device may have been
partitioned without setting the enhanced attribute on any partition
or partitioning may be completed without creating any extra partitions.

This change moves the code to set ERASE_GROUP_DEF to after reading
all partition information. It is also enabled when
PARTITIONING_SETTING_COMPLETED is set as it is necessary to enable
ERASE_GROUP_DEF before setting that bit, so it means that the user
previously switched to the high capacity definitions.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
drivers/mmc/mmc.c