|
@@ -1286,6 +1286,23 @@ out_err:
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void mmc_select_driver_type(struct mmc_card *card)
|
|
|
|
+{
|
|
|
|
+ int card_drv_type, drive_strength, drv_type;
|
|
|
|
+
|
|
|
|
+ card_drv_type = card->ext_csd.raw_driver_strength |
|
|
|
|
+ mmc_driver_type_mask(0);
|
|
|
|
+
|
|
|
|
+ drive_strength = mmc_select_drive_strength(card,
|
|
|
|
+ card->ext_csd.hs200_max_dtr,
|
|
|
|
+ card_drv_type, &drv_type);
|
|
|
|
+
|
|
|
|
+ card->drive_strength = drive_strength;
|
|
|
|
+
|
|
|
|
+ if (drv_type)
|
|
|
|
+ mmc_set_driver_type(card->host, drv_type);
|
|
|
|
+}
|
|
|
|
+
|
|
static int mmc_select_hs400es(struct mmc_card *card)
|
|
static int mmc_select_hs400es(struct mmc_card *card)
|
|
{
|
|
{
|
|
struct mmc_host *host = card->host;
|
|
struct mmc_host *host = card->host;
|
|
@@ -1341,6 +1358,8 @@ static int mmc_select_hs400es(struct mmc_card *card)
|
|
goto out_err;
|
|
goto out_err;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ mmc_select_driver_type(card);
|
|
|
|
+
|
|
/* Switch card to HS400 */
|
|
/* Switch card to HS400 */
|
|
val = EXT_CSD_TIMING_HS400 |
|
|
val = EXT_CSD_TIMING_HS400 |
|
|
card->drive_strength << EXT_CSD_DRV_STR_SHIFT;
|
|
card->drive_strength << EXT_CSD_DRV_STR_SHIFT;
|
|
@@ -1374,23 +1393,6 @@ out_err:
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
-static void mmc_select_driver_type(struct mmc_card *card)
|
|
|
|
-{
|
|
|
|
- int card_drv_type, drive_strength, drv_type;
|
|
|
|
-
|
|
|
|
- card_drv_type = card->ext_csd.raw_driver_strength |
|
|
|
|
- mmc_driver_type_mask(0);
|
|
|
|
-
|
|
|
|
- drive_strength = mmc_select_drive_strength(card,
|
|
|
|
- card->ext_csd.hs200_max_dtr,
|
|
|
|
- card_drv_type, &drv_type);
|
|
|
|
-
|
|
|
|
- card->drive_strength = drive_strength;
|
|
|
|
-
|
|
|
|
- if (drv_type)
|
|
|
|
- mmc_set_driver_type(card->host, drv_type);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* For device supporting HS200 mode, the following sequence
|
|
* For device supporting HS200 mode, the following sequence
|
|
* should be done before executing the tuning process.
|
|
* should be done before executing the tuning process.
|