spi: sprd: adi: Remove redundant address bits setting
[linux/fpc-iii.git] / drivers / mmc / core / host.h
blob5e3b9534ffb23c75c6d4282032f43e7413e703c0
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * linux/drivers/mmc/core/host.h
5 * Copyright (C) 2003 Russell King, All Rights Reserved.
6 * Copyright 2007 Pierre Ossman
7 */
8 #ifndef _MMC_CORE_HOST_H
9 #define _MMC_CORE_HOST_H
11 #include <linux/mmc/host.h>
13 int mmc_register_host_class(void);
14 void mmc_unregister_host_class(void);
16 void mmc_retune_enable(struct mmc_host *host);
17 void mmc_retune_disable(struct mmc_host *host);
18 void mmc_retune_hold(struct mmc_host *host);
19 void mmc_retune_release(struct mmc_host *host);
20 int mmc_retune(struct mmc_host *host);
21 void mmc_retune_pause(struct mmc_host *host);
22 void mmc_retune_unpause(struct mmc_host *host);
24 static inline void mmc_retune_hold_now(struct mmc_host *host)
26 host->retune_now = 0;
27 host->hold_retune += 1;
30 static inline void mmc_retune_recheck(struct mmc_host *host)
32 if (host->hold_retune <= 1)
33 host->retune_now = 1;
36 static inline int mmc_host_cmd23(struct mmc_host *host)
38 return host->caps & MMC_CAP_CMD23;
41 static inline bool mmc_host_done_complete(struct mmc_host *host)
43 return host->caps & MMC_CAP_DONE_COMPLETE;
46 static inline int mmc_boot_partition_access(struct mmc_host *host)
48 return !(host->caps2 & MMC_CAP2_BOOTPART_NOACC);
51 static inline int mmc_host_uhs(struct mmc_host *host)
53 return host->caps &
54 (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 |
55 MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR104 |
56 MMC_CAP_UHS_DDR50) &&
57 host->caps & MMC_CAP_4_BIT_DATA;
60 static inline bool mmc_card_hs200(struct mmc_card *card)
62 return card->host->ios.timing == MMC_TIMING_MMC_HS200;
65 static inline bool mmc_card_ddr52(struct mmc_card *card)
67 return card->host->ios.timing == MMC_TIMING_MMC_DDR52;
70 static inline bool mmc_card_hs400(struct mmc_card *card)
72 return card->host->ios.timing == MMC_TIMING_MMC_HS400;
75 static inline bool mmc_card_hs400es(struct mmc_card *card)
77 return card->host->ios.enhanced_strobe;
80 #endif