This source file includes following definitions.
- s3c2416_default_sdhci0
- s3c2416_default_sdhci1
- s3c2416_default_sdhci0
- s3c2416_default_sdhci1
- s3c6400_default_sdhci0
- s3c6400_default_sdhci1
- s3c6400_default_sdhci2
- s3c6410_default_sdhci0
- s3c6410_default_sdhci1
- s3c6410_default_sdhci2
- s3c6410_default_sdhci0
- s3c6410_default_sdhci1
- s3c6410_default_sdhci2
- s3c6400_default_sdhci0
- s3c6400_default_sdhci1
- s3c6400_default_sdhci2
- s3c_sdhci_setname
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef __PLAT_S3C_SDHCI_H
15 #define __PLAT_S3C_SDHCI_H __FILE__
16
17 #include <linux/platform_data/mmc-sdhci-s3c.h>
18 #include <plat/devs.h>
19
20
21
22
23
24 extern void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd,
25 struct s3c_sdhci_platdata *set);
26
27
28
29
30
31
32
33
34
35 extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd);
36 extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd);
37 extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd);
38 extern void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd);
39
40
41
42
43
44 extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata;
45 extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata;
46 extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata;
47 extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata;
48
49
50
51 extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
52 extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
53 extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w);
54 extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
55 extern void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
56
57
58
59 #ifdef CONFIG_S3C2416_SETUP_SDHCI
60 static inline void s3c2416_default_sdhci0(void)
61 {
62 #ifdef CONFIG_S3C_DEV_HSMMC
63 s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio;
64 #endif
65 }
66
67 static inline void s3c2416_default_sdhci1(void)
68 {
69 #ifdef CONFIG_S3C_DEV_HSMMC1
70 s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio;
71 #endif
72 }
73
74 #else
75 static inline void s3c2416_default_sdhci0(void) { }
76 static inline void s3c2416_default_sdhci1(void) { }
77
78 #endif
79
80
81
82 #ifdef CONFIG_S3C64XX_SETUP_SDHCI
83 static inline void s3c6400_default_sdhci0(void)
84 {
85 #ifdef CONFIG_S3C_DEV_HSMMC
86 s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
87 #endif
88 }
89
90 static inline void s3c6400_default_sdhci1(void)
91 {
92 #ifdef CONFIG_S3C_DEV_HSMMC1
93 s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
94 #endif
95 }
96
97 static inline void s3c6400_default_sdhci2(void)
98 {
99 #ifdef CONFIG_S3C_DEV_HSMMC2
100 s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio;
101 #endif
102 }
103
104 static inline void s3c6410_default_sdhci0(void)
105 {
106 #ifdef CONFIG_S3C_DEV_HSMMC
107 s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
108 #endif
109 }
110
111 static inline void s3c6410_default_sdhci1(void)
112 {
113 #ifdef CONFIG_S3C_DEV_HSMMC1
114 s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
115 #endif
116 }
117
118 static inline void s3c6410_default_sdhci2(void)
119 {
120 #ifdef CONFIG_S3C_DEV_HSMMC2
121 s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio;
122 #endif
123 }
124
125 #else
126 static inline void s3c6410_default_sdhci0(void) { }
127 static inline void s3c6410_default_sdhci1(void) { }
128 static inline void s3c6410_default_sdhci2(void) { }
129 static inline void s3c6400_default_sdhci0(void) { }
130 static inline void s3c6400_default_sdhci1(void) { }
131 static inline void s3c6400_default_sdhci2(void) { }
132
133 #endif
134
135 static inline void s3c_sdhci_setname(int id, char *name)
136 {
137 switch (id) {
138 #ifdef CONFIG_S3C_DEV_HSMMC
139 case 0:
140 s3c_device_hsmmc0.name = name;
141 break;
142 #endif
143 #ifdef CONFIG_S3C_DEV_HSMMC1
144 case 1:
145 s3c_device_hsmmc1.name = name;
146 break;
147 #endif
148 #ifdef CONFIG_S3C_DEV_HSMMC2
149 case 2:
150 s3c_device_hsmmc2.name = name;
151 break;
152 #endif
153 #ifdef CONFIG_S3C_DEV_HSMMC3
154 case 3:
155 s3c_device_hsmmc3.name = name;
156 break;
157 #endif
158 default:
159 break;
160 }
161 }
162 #endif