Hi, 2013/4/22 Fredrik Soderstedt <fredrik.soderstedt@xxxxxxxxxxxxxx>: > Use the saved values in card->ext_csd when selecting power class. > By doing this the power class will be selected even if mmc_init_card > is called with oldcard != NULL, which is the case after a suspend/resume. > > Today ext_csd is NULL if mmc_init_card is called with oldcard != NULL > and power class will not be selected. > > According to the eMMC specification the POWER_CLASS value is reset after > power failure, H/W reset assertion and any CMD0 reset. > > CC: Girish K S <girish.shivananjappa@xxxxxxxxxx> > Signed-off-by: Fredrik Soderstedt <fredrik.soderstedt@xxxxxxxxxxxxxx> > --- <snip> > @@ -720,13 +750,13 @@ static int mmc_select_powerclass(struct mmc_card *card, > case MMC_VDD_34_35: > case MMC_VDD_35_36: > if (host->ios.clock <= 26000000) > - index = EXT_CSD_PWR_CL_26_360; > + pwrclass_val = card->ext_csd.raw_pwr_cl_26_360; > else if (host->ios.clock <= 52000000) > - index = (bus_width <= EXT_CSD_BUS_WIDTH_8) ? > - EXT_CSD_PWR_CL_52_360 : > - EXT_CSD_PWR_CL_DDR_52_360; > + pwrclass_val = (bus_width <= EXT_CSD_BUS_WIDTH_8) ? > + card->ext_csd.raw_pwr_cl_52_360 : > + card->ext_csd.raw_pwr_cl_52_360; I believe you should have "_ddr" here, right? Otherwise it looks good. Kind regards, Johan -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html