xref: /openbmc/linux/drivers/mmc/host/mmc_hsq.h (revision 15e3ae36)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef LINUX_MMC_HSQ_H
3 #define LINUX_MMC_HSQ_H
4 
5 struct hsq_slot {
6 	struct mmc_request *mrq;
7 };
8 
9 struct mmc_hsq {
10 	struct mmc_host *mmc;
11 	struct mmc_request *mrq;
12 	wait_queue_head_t wait_queue;
13 	struct hsq_slot *slot;
14 	spinlock_t lock;
15 
16 	int next_tag;
17 	int num_slots;
18 	int qcnt;
19 
20 	bool enabled;
21 	bool waiting_for_idle;
22 	bool recovery_halt;
23 };
24 
25 int mmc_hsq_init(struct mmc_hsq *hsq, struct mmc_host *mmc);
26 void mmc_hsq_suspend(struct mmc_host *mmc);
27 int mmc_hsq_resume(struct mmc_host *mmc);
28 bool mmc_hsq_finalize_request(struct mmc_host *mmc, struct mmc_request *mrq);
29 
30 #endif
31