forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/mmc/core/core.h
....@@ -1,12 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * linux/drivers/mmc/core/core.h
34 *
45 * Copyright (C) 2003 Russell King, All Rights Reserved.
56 * Copyright 2007 Pierre Ossman
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118 #ifndef _MMC_CORE_CORE_H
129 #define _MMC_CORE_CORE_H
....@@ -20,7 +17,7 @@
2017
2118 #define MMC_CMD_RETRIES 3
2219
23
-static const unsigned freqs[] = { 400000, 300000, 200000, 100000 };
20
+static const unsigned int freqs[] = { 400000, 300000, 200000, 100000 };
2421
2522 struct mmc_bus_ops {
2623 void (*remove)(struct mmc_host *);
....@@ -35,6 +32,8 @@
3532 int (*hw_reset)(struct mmc_host *);
3633 int (*sw_reset)(struct mmc_host *);
3734 bool (*cache_enabled)(struct mmc_host *);
35
+
36
+ ANDROID_VENDOR_DATA_ARRAY(1, 2);
3837 };
3938
4039 void mmc_attach_bus(struct mmc_host *host, const struct mmc_bus_ops *ops);
....@@ -46,7 +45,7 @@
4645 void mmc_init_erase(struct mmc_card *card);
4746
4847 void mmc_set_chip_select(struct mmc_host *host, int mode);
49
-void mmc_set_clock(struct mmc_host *host, unsigned int hz);
48
+extern void mmc_set_clock(struct mmc_host *host, unsigned int hz);
5049 void mmc_set_bus_mode(struct mmc_host *host, unsigned int mode);
5150 void mmc_set_bus_width(struct mmc_host *host, unsigned int width);
5251 u32 mmc_select_voltage(struct mmc_host *host, u32 ocr);
....@@ -62,6 +61,7 @@
6261 void mmc_power_off(struct mmc_host *host);
6362 void mmc_power_cycle(struct mmc_host *host, u32 ocr);
6463 void mmc_set_initial_state(struct mmc_host *host);
64
+u32 mmc_vddrange_to_ocrmask(int vdd_min, int vdd_max);
6565
6666 static inline void mmc_delay(unsigned int ms)
6767 {
....@@ -73,16 +73,17 @@
7373
7474 void mmc_rescan(struct work_struct *work);
7575 void mmc_start_host(struct mmc_host *host);
76
+void __mmc_stop_host(struct mmc_host *host);
7677 void mmc_stop_host(struct mmc_host *host);
7778
79
+void _mmc_detect_change(struct mmc_host *host, unsigned long delay,
80
+ bool cd_irq);
7881 int _mmc_detect_card_removed(struct mmc_host *host);
7982 int mmc_detect_card_removed(struct mmc_host *host);
8083
8184 int mmc_attach_mmc(struct mmc_host *host);
8285 int mmc_attach_sd(struct mmc_host *host);
8386 int mmc_attach_sdio(struct mmc_host *host);
84
-
85
-int sdio_reset_comm(struct mmc_card *card);
8687
8788 /* Module parameters */
8889 extern bool use_spi_crc;
....@@ -97,14 +98,6 @@
9798 int mmc_execute_tuning(struct mmc_card *card);
9899 int mmc_hs200_to_hs400(struct mmc_card *card);
99100 int mmc_hs400_to_hs200(struct mmc_card *card);
100
-
101
-#ifdef CONFIG_PM_SLEEP
102
-void mmc_register_pm_notifier(struct mmc_host *host);
103
-void mmc_unregister_pm_notifier(struct mmc_host *host);
104
-#else
105
-static inline void mmc_register_pm_notifier(struct mmc_host *host) { }
106
-static inline void mmc_unregister_pm_notifier(struct mmc_host *host) { }
107
-#endif
108101
109102 void mmc_wait_for_req_done(struct mmc_host *host, struct mmc_request *mrq);
110103 bool mmc_is_req_done(struct mmc_host *host, struct mmc_request *mrq);
....@@ -123,8 +116,6 @@
123116 unsigned int mmc_calc_max_discard(struct mmc_card *card);
124117
125118 int mmc_set_blocklen(struct mmc_card *card, unsigned int blocklen);
126
-int mmc_set_blockcount(struct mmc_card *card, unsigned int blockcount,
127
- bool is_rel_write);
128119
129120 int __mmc_claim_host(struct mmc_host *host, struct mmc_ctx *ctx,
130121 atomic_t *abort);