diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mmc/host.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index b5bedaec6223..f471193ef6d6 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #include <linux/leds.h> | 13 | #include <linux/leds.h> |
| 14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
| 15 | #include <linux/timer.h> | ||
| 15 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
| 16 | #include <linux/device.h> | 17 | #include <linux/device.h> |
| 17 | #include <linux/fault-inject.h> | 18 | #include <linux/fault-inject.h> |
| @@ -321,10 +322,18 @@ struct mmc_host { | |||
| 321 | #ifdef CONFIG_MMC_DEBUG | 322 | #ifdef CONFIG_MMC_DEBUG |
| 322 | unsigned int removed:1; /* host is being removed */ | 323 | unsigned int removed:1; /* host is being removed */ |
| 323 | #endif | 324 | #endif |
| 325 | unsigned int can_retune:1; /* re-tuning can be used */ | ||
| 326 | unsigned int doing_retune:1; /* re-tuning in progress */ | ||
| 327 | unsigned int retune_now:1; /* do re-tuning at next req */ | ||
| 324 | 328 | ||
| 325 | int rescan_disable; /* disable card detection */ | 329 | int rescan_disable; /* disable card detection */ |
| 326 | int rescan_entered; /* used with nonremovable devices */ | 330 | int rescan_entered; /* used with nonremovable devices */ |
| 327 | 331 | ||
| 332 | int need_retune; /* re-tuning is needed */ | ||
| 333 | int hold_retune; /* hold off re-tuning */ | ||
| 334 | unsigned int retune_period; /* re-tuning period in secs */ | ||
| 335 | struct timer_list retune_timer; /* for periodic re-tuning */ | ||
| 336 | |||
| 328 | bool trigger_card_event; /* card_event necessary */ | 337 | bool trigger_card_event; /* card_event necessary */ |
| 329 | 338 | ||
| 330 | struct mmc_card *card; /* device attached to this host */ | 339 | struct mmc_card *card; /* device attached to this host */ |
| @@ -513,4 +522,18 @@ static inline bool mmc_card_hs400(struct mmc_card *card) | |||
| 513 | return card->host->ios.timing == MMC_TIMING_MMC_HS400; | 522 | return card->host->ios.timing == MMC_TIMING_MMC_HS400; |
| 514 | } | 523 | } |
| 515 | 524 | ||
| 525 | void mmc_retune_timer_stop(struct mmc_host *host); | ||
| 526 | |||
| 527 | static inline void mmc_retune_needed(struct mmc_host *host) | ||
| 528 | { | ||
| 529 | if (host->can_retune) | ||
| 530 | host->need_retune = 1; | ||
| 531 | } | ||
| 532 | |||
| 533 | static inline void mmc_retune_recheck(struct mmc_host *host) | ||
| 534 | { | ||
| 535 | if (host->hold_retune <= 1) | ||
| 536 | host->retune_now = 1; | ||
| 537 | } | ||
| 538 | |||
| 516 | #endif /* LINUX_MMC_HOST_H */ | 539 | #endif /* LINUX_MMC_HOST_H */ |
