diff options
Diffstat (limited to 'drivers/mmc/core/debugfs.c')
-rw-r--r-- | drivers/mmc/core/debugfs.c | 52 |
1 files changed, 1 insertions, 51 deletions
diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c index 35c2f85b195..998797ed67a 100644 --- a/drivers/mmc/core/debugfs.c +++ b/drivers/mmc/core/debugfs.c | |||
@@ -7,14 +7,11 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/moduleparam.h> | ||
11 | #include <linux/export.h> | ||
12 | #include <linux/debugfs.h> | 10 | #include <linux/debugfs.h> |
13 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
14 | #include <linux/seq_file.h> | 12 | #include <linux/seq_file.h> |
15 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
16 | #include <linux/stat.h> | 14 | #include <linux/stat.h> |
17 | #include <linux/fault-inject.h> | ||
18 | 15 | ||
19 | #include <linux/mmc/card.h> | 16 | #include <linux/mmc/card.h> |
20 | #include <linux/mmc/host.h> | 17 | #include <linux/mmc/host.h> |
@@ -22,14 +19,6 @@ | |||
22 | #include "core.h" | 19 | #include "core.h" |
23 | #include "mmc_ops.h" | 20 | #include "mmc_ops.h" |
24 | 21 | ||
25 | #ifdef CONFIG_FAIL_MMC_REQUEST | ||
26 | |||
27 | static DECLARE_FAULT_ATTR(fail_default_attr); | ||
28 | static char *fail_request; | ||
29 | module_param(fail_request, charp, 0); | ||
30 | |||
31 | #endif /* CONFIG_FAIL_MMC_REQUEST */ | ||
32 | |||
33 | /* The debugfs functions are optimized away when CONFIG_DEBUG_FS isn't set. */ | 22 | /* The debugfs functions are optimized away when CONFIG_DEBUG_FS isn't set. */ |
34 | static int mmc_ios_show(struct seq_file *s, void *data) | 23 | static int mmc_ios_show(struct seq_file *s, void *data) |
35 | { | 24 | { |
@@ -57,8 +46,6 @@ static int mmc_ios_show(struct seq_file *s, void *data) | |||
57 | const char *str; | 46 | const char *str; |
58 | 47 | ||
59 | seq_printf(s, "clock:\t\t%u Hz\n", ios->clock); | 48 | seq_printf(s, "clock:\t\t%u Hz\n", ios->clock); |
60 | if (host->actual_clock) | ||
61 | seq_printf(s, "actual clock:\t%u Hz\n", host->actual_clock); | ||
62 | seq_printf(s, "vdd:\t\t%u ", ios->vdd); | 49 | seq_printf(s, "vdd:\t\t%u ", ios->vdd); |
63 | if ((1 << ios->vdd) & MMC_VDD_165_195) | 50 | if ((1 << ios->vdd) & MMC_VDD_165_195) |
64 | seq_printf(s, "(1.65 - 1.95 V)\n"); | 51 | seq_printf(s, "(1.65 - 1.95 V)\n"); |
@@ -126,40 +113,12 @@ static int mmc_ios_show(struct seq_file *s, void *data) | |||
126 | case MMC_TIMING_SD_HS: | 113 | case MMC_TIMING_SD_HS: |
127 | str = "sd high-speed"; | 114 | str = "sd high-speed"; |
128 | break; | 115 | break; |
129 | case MMC_TIMING_UHS_SDR50: | ||
130 | str = "sd uhs SDR50"; | ||
131 | break; | ||
132 | case MMC_TIMING_UHS_SDR104: | ||
133 | str = "sd uhs SDR104"; | ||
134 | break; | ||
135 | case MMC_TIMING_UHS_DDR50: | ||
136 | str = "sd uhs DDR50"; | ||
137 | break; | ||
138 | case MMC_TIMING_MMC_HS200: | ||
139 | str = "mmc high-speed SDR200"; | ||
140 | break; | ||
141 | default: | 116 | default: |
142 | str = "invalid"; | 117 | str = "invalid"; |
143 | break; | 118 | break; |
144 | } | 119 | } |
145 | seq_printf(s, "timing spec:\t%u (%s)\n", ios->timing, str); | 120 | seq_printf(s, "timing spec:\t%u (%s)\n", ios->timing, str); |
146 | 121 | ||
147 | switch (ios->signal_voltage) { | ||
148 | case MMC_SIGNAL_VOLTAGE_330: | ||
149 | str = "3.30 V"; | ||
150 | break; | ||
151 | case MMC_SIGNAL_VOLTAGE_180: | ||
152 | str = "1.80 V"; | ||
153 | break; | ||
154 | case MMC_SIGNAL_VOLTAGE_120: | ||
155 | str = "1.20 V"; | ||
156 | break; | ||
157 | default: | ||
158 | str = "invalid"; | ||
159 | break; | ||
160 | } | ||
161 | seq_printf(s, "signal voltage:\t%u (%s)\n", ios->chip_select, str); | ||
162 | |||
163 | return 0; | 122 | return 0; |
164 | } | 123 | } |
165 | 124 | ||
@@ -229,15 +188,6 @@ void mmc_add_host_debugfs(struct mmc_host *host) | |||
229 | root, &host->clk_delay)) | 188 | root, &host->clk_delay)) |
230 | goto err_node; | 189 | goto err_node; |
231 | #endif | 190 | #endif |
232 | #ifdef CONFIG_FAIL_MMC_REQUEST | ||
233 | if (fail_request) | ||
234 | setup_fault_attr(&fail_default_attr, fail_request); | ||
235 | host->fail_mmc_request = fail_default_attr; | ||
236 | if (IS_ERR(fault_create_debugfs_attr("fail_mmc_request", | ||
237 | root, | ||
238 | &host->fail_mmc_request))) | ||
239 | goto err_node; | ||
240 | #endif | ||
241 | return; | 191 | return; |
242 | 192 | ||
243 | err_node: | 193 | err_node: |
@@ -297,7 +247,7 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp) | |||
297 | if (err) | 247 | if (err) |
298 | goto out_free; | 248 | goto out_free; |
299 | 249 | ||
300 | for (i = 0; i < 512; i++) | 250 | for (i = 511; i >= 0; i--) |
301 | n += sprintf(buf + n, "%02x", ext_csd[i]); | 251 | n += sprintf(buf + n, "%02x", ext_csd[i]); |
302 | n += sprintf(buf + n, "\n"); | 252 | n += sprintf(buf + n, "\n"); |
303 | BUG_ON(n != EXT_CSD_STR_LEN); | 253 | BUG_ON(n != EXT_CSD_STR_LEN); |