Skip to content

Commit f168359

Browse files
ahunter6storulf
authored andcommitted
mmc: core: Add 'card' to drive strength selection callback
In preparation for supporting also eMMC drive strength, add the 'card' as a parameter so that the callback can distinguish different types of cards if necessary. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent fa021ce commit f168359

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

drivers/mmc/core/sd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ static int sd_select_driver_type(struct mmc_card *card, u8 *status)
411411
* return what is possible given the options
412412
*/
413413
mmc_host_clk_hold(card->host);
414-
drive_strength = card->host->ops->select_drive_strength(
414+
drive_strength = card->host->ops->select_drive_strength(card,
415415
card->sw_caps.uhs_max_dtr,
416416
host_drv_type, card_drv_type, &drv_type);
417417
mmc_host_clk_release(card->host);

drivers/mmc/core/sdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ static void sdio_select_driver_type(struct mmc_card *card)
427427
* information and let the hardware specific code
428428
* return what is possible given the options
429429
*/
430-
drive_strength = card->host->ops->select_drive_strength(
430+
drive_strength = card->host->ops->select_drive_strength(card,
431431
card->sw_caps.uhs_max_dtr,
432432
host_drv_type, card_drv_type, &drv_type);
433433

include/linux/mmc/host.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ struct mmc_host_ops {
132132

133133
/* Prepare HS400 target operating frequency depending host driver */
134134
int (*prepare_hs400_tuning)(struct mmc_host *host, struct mmc_ios *ios);
135-
int (*select_drive_strength)(unsigned int max_dtr, int host_drv,
135+
int (*select_drive_strength)(struct mmc_card *card,
136+
unsigned int max_dtr, int host_drv,
136137
int card_drv, int *drv_type);
137138
void (*hw_reset)(struct mmc_host *host);
138139
void (*card_event)(struct mmc_host *host);

0 commit comments

Comments
 (0)