1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef LINUX_MMC_HOST_H
20#define LINUX_MMC_HOST_H
21#include <linux/mmc/mmc.h>
22struct mmc_ios {
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 unsigned int clock;
25 unsigned short vdd;
26#define MMC_VDD_150 0
27#define MMC_VDD_155 1
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define MMC_VDD_160 2
30#define MMC_VDD_165 3
31#define MMC_VDD_170 4
32#define MMC_VDD_180 5
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define MMC_VDD_190 6
35#define MMC_VDD_200 7
36#define MMC_VDD_210 8
37#define MMC_VDD_220 9
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define MMC_VDD_230 10
40#define MMC_VDD_240 11
41#define MMC_VDD_250 12
42#define MMC_VDD_260 13
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define MMC_VDD_270 14
45#define MMC_VDD_280 15
46#define MMC_VDD_290 16
47#define MMC_VDD_300 17
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define MMC_VDD_310 18
50#define MMC_VDD_320 19
51#define MMC_VDD_330 20
52#define MMC_VDD_340 21
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define MMC_VDD_350 22
55#define MMC_VDD_360 23
56 unsigned char bus_mode;
57#define MMC_BUSMODE_OPENDRAIN 1
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define MMC_BUSMODE_PUSHPULL 2
60 unsigned char chip_select;
61#define MMC_CS_DONTCARE 0
62#define MMC_CS_HIGH 1
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define MMC_CS_LOW 2
65 unsigned char power_mode;
66#define MMC_POWER_OFF 0
67#define MMC_POWER_UP 1
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define MMC_POWER_ON 2
70 unsigned char bus_width;
71#define MMC_BUS_WIDTH_1 0
72#define MMC_BUS_WIDTH_4 2
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74};
75struct mmc_host_ops {
76 void (*request)(struct mmc_host *host, struct mmc_request *req);
77 void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios);
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 int (*get_ro)(struct mmc_host *host);
80};
81struct mmc_card;
82struct device;
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84struct mmc_host {
85 struct device *dev;
86 struct class_device class_dev;
87 int index;
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 const struct mmc_host_ops *ops;
90 unsigned int f_min;
91 unsigned int f_max;
92 u32 ocr_avail;
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 unsigned long caps;
95#define MMC_CAP_4_BIT_DATA (1 << 0)
96 unsigned int max_seg_size;
97 unsigned short max_hw_segs;
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 unsigned short max_phys_segs;
100 unsigned short max_sectors;
101 unsigned short unused;
102 struct mmc_ios ios;
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 u32 ocr;
105 unsigned int mode;
106#define MMC_MODE_MMC 0
107#define MMC_MODE_SD 1
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 struct list_head cards;
110 wait_queue_head_t wq;
111 spinlock_t lock;
112 struct mmc_card *card_busy;
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 struct mmc_card *card_selected;
115 struct work_struct detect;
116 unsigned long private[0] ____cacheline_aligned;
117};
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119#define mmc_dev(x) ((x)->dev)
120#define mmc_hostname(x) ((x)->class_dev.class_id)
121#endif
122