Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f0f341d authored by Talel Shenhar's avatar Talel Shenhar Committed by Xiaonian Wang
Browse files

mmc: sdhci-msm: add support for fourth drive strength



This change adds support for new drive strength.
Before this change sdhci-msm supported only 3 types of drive
strength, starting from eMMC version 5.0 there is additional
drive strength.

Change-Id: Ib0bf945560107ec732e7ffeb7653d271d8d91c2f
Signed-off-by: default avatarTalel Shenhar <tatias@codeaurora.org>
[subhashj@codeaurora.org: fixed minor merge conflicts]
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
parent d51865bf
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -194,7 +194,7 @@
#define INVALID_TUNING_PHASE	-1
#define INVALID_TUNING_PHASE	-1


#define NUM_TUNING_PHASES		16
#define NUM_TUNING_PHASES		16
#define MAX_DRV_TYPES_SUPPORTED_HS200	3
#define MAX_DRV_TYPES_SUPPORTED_HS200	4
#define MSM_AUTOSUSPEND_DELAY_MS 100
#define MSM_AUTOSUSPEND_DELAY_MS 100


static const u32 tuning_block_64[] = {
static const u32 tuning_block_64[] = {
@@ -1092,6 +1092,8 @@ int sdhci_msm_execute_tuning(struct sdhci_host *host, u32 opcode)


		/* set drive type to other value . default setting is 0x0 */
		/* set drive type to other value . default setting is 0x0 */
		while (++drv_type <= MAX_DRV_TYPES_SUPPORTED_HS200) {
		while (++drv_type <= MAX_DRV_TYPES_SUPPORTED_HS200) {
			pr_debug("%s: trying different drive strength (%d)\n",
				mmc_hostname(mmc), drv_type);
			if (card->ext_csd.raw_driver_strength &
			if (card->ext_csd.raw_driver_strength &
					(1 << drv_type)) {
					(1 << drv_type)) {
				sdhci_msm_set_mmc_drv_type(host, opcode,
				sdhci_msm_set_mmc_drv_type(host, opcode,