aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2017-01-13 08:14:09 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2017-02-13 07:20:21 -0500
commit9e1bbc72727506c173cc6ed1d704cb2d7911d9d5 (patch)
tree83ca1d888259d4f1d089aeba0d4c0aea4d2106bb /include/linux/mmc
parent55244c5659b5e73a969b285a2e763223d8aab979 (diff)
mmc: core: Move some host specific public functions to host.h
Ideally the public mmc header file, core.h, shouldn't contain interfaces particularly intended to be used by host drivers. Instead those should remain in the host.h header file. Therefore, let's move a couple functions from core.h to host.h. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/core.h6
-rw-r--r--include/linux/mmc/host.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index e679a8678594..faacc90f8711 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -163,8 +163,6 @@ extern struct mmc_async_req *mmc_start_req(struct mmc_host *,
163 enum mmc_blk_status *); 163 enum mmc_blk_status *);
164extern void mmc_wait_for_req(struct mmc_host *, struct mmc_request *); 164extern void mmc_wait_for_req(struct mmc_host *, struct mmc_request *);
165extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); 165extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int);
166extern int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error);
167extern int mmc_abort_tuning(struct mmc_host *host, u32 opcode);
168 166
169#define MMC_ERASE_ARG 0x00000000 167#define MMC_ERASE_ARG 0x00000000
170#define MMC_SECURE_ERASE_ARG 0x80000000 168#define MMC_SECURE_ERASE_ARG 0x80000000
@@ -179,8 +177,4 @@ extern int mmc_abort_tuning(struct mmc_host *host, u32 opcode);
179extern int mmc_hw_reset(struct mmc_host *host); 177extern int mmc_hw_reset(struct mmc_host *host);
180extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *); 178extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *);
181 179
182struct device_node;
183extern u32 mmc_vddrange_to_ocrmask(int vdd_min, int vdd_max);
184extern int mmc_of_parse_voltage(struct device_node *np, u32 *mask);
185
186#endif /* LINUX_MMC_CORE_H */ 180#endif /* LINUX_MMC_CORE_H */
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 8d38c76b06d6..7de05195bff6 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -392,11 +392,14 @@ struct mmc_host {
392 unsigned long private[0] ____cacheline_aligned; 392 unsigned long private[0] ____cacheline_aligned;
393}; 393};
394 394
395struct device_node;
396
395struct mmc_host *mmc_alloc_host(int extra, struct device *); 397struct mmc_host *mmc_alloc_host(int extra, struct device *);
396int mmc_add_host(struct mmc_host *); 398int mmc_add_host(struct mmc_host *);
397void mmc_remove_host(struct mmc_host *); 399void mmc_remove_host(struct mmc_host *);
398void mmc_free_host(struct mmc_host *); 400void mmc_free_host(struct mmc_host *);
399int mmc_of_parse(struct mmc_host *host); 401int mmc_of_parse(struct mmc_host *host);
402int mmc_of_parse_voltage(struct device_node *np, u32 *mask);
400 403
401static inline void *mmc_priv(struct mmc_host *host) 404static inline void *mmc_priv(struct mmc_host *host)
402{ 405{
@@ -452,6 +455,7 @@ static inline int mmc_regulator_set_vqmmc(struct mmc_host *mmc,
452} 455}
453#endif 456#endif
454 457
458u32 mmc_vddrange_to_ocrmask(int vdd_min, int vdd_max);
455int mmc_regulator_get_supply(struct mmc_host *mmc); 459int mmc_regulator_get_supply(struct mmc_host *mmc);
456 460
457static inline int mmc_card_is_removable(struct mmc_host *host) 461static inline int mmc_card_is_removable(struct mmc_host *host)
@@ -538,6 +542,8 @@ static inline bool mmc_can_retune(struct mmc_host *host)
538 return host->can_retune == 1; 542 return host->can_retune == 1;
539} 543}
540 544
545int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error);
546int mmc_abort_tuning(struct mmc_host *host, u32 opcode);
541void mmc_retune_pause(struct mmc_host *host); 547void mmc_retune_pause(struct mmc_host *host);
542void mmc_retune_unpause(struct mmc_host *host); 548void mmc_retune_unpause(struct mmc_host *host);
543 549