aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-12-01 10:53:34 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2015-01-19 03:56:24 -0500
commit04cdbbfa73ebac57a30ec2ebebfd7e9342bbdc44 (patch)
tree0387b6c78d85edc310bd3614b0b61d97431d4f42
parent6c2c6506101f030808c0f2d429399dc1ee7a1a06 (diff)
mmc: core: Make tuning block patterns static
Since previous patches removed the need for the tuning block patterns to be exported, let's move them close to the mmc_send_tuning() API. Those are now intended to be used only by the mmc core. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r--drivers/mmc/core/mmc.c32
-rw-r--r--drivers/mmc/core/mmc_ops.c30
-rw-r--r--include/linux/mmc/mmc.h5
3 files changed, 30 insertions, 37 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index d854bff037a2..0b8ec87fc517 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1155,38 +1155,6 @@ bus_speed:
1155 return err; 1155 return err;
1156} 1156}
1157 1157
1158const u8 tuning_blk_pattern_4bit[MMC_TUNING_BLK_PATTERN_4BIT_SIZE] = {
1159 0xff, 0x0f, 0xff, 0x00, 0xff, 0xcc, 0xc3, 0xcc,
1160 0xc3, 0x3c, 0xcc, 0xff, 0xfe, 0xff, 0xfe, 0xef,
1161 0xff, 0xdf, 0xff, 0xdd, 0xff, 0xfb, 0xff, 0xfb,
1162 0xbf, 0xff, 0x7f, 0xff, 0x77, 0xf7, 0xbd, 0xef,
1163 0xff, 0xf0, 0xff, 0xf0, 0x0f, 0xfc, 0xcc, 0x3c,
1164 0xcc, 0x33, 0xcc, 0xcf, 0xff, 0xef, 0xff, 0xee,
1165 0xff, 0xfd, 0xff, 0xfd, 0xdf, 0xff, 0xbf, 0xff,
1166 0xbb, 0xff, 0xf7, 0xff, 0xf7, 0x7f, 0x7b, 0xde,
1167};
1168EXPORT_SYMBOL(tuning_blk_pattern_4bit);
1169
1170const u8 tuning_blk_pattern_8bit[MMC_TUNING_BLK_PATTERN_8BIT_SIZE] = {
1171 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00,
1172 0xff, 0xff, 0xcc, 0xcc, 0xcc, 0x33, 0xcc, 0xcc,
1173 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0xcc, 0xff, 0xff,
1174 0xff, 0xee, 0xff, 0xff, 0xff, 0xee, 0xee, 0xff,
1175 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xdd, 0xdd,
1176 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, 0xff, 0xbb,
1177 0xbb, 0xff, 0xff, 0xff, 0x77, 0xff, 0xff, 0xff,
1178 0x77, 0x77, 0xff, 0x77, 0xbb, 0xdd, 0xee, 0xff,
1179 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00,
1180 0x00, 0xff, 0xff, 0xcc, 0xcc, 0xcc, 0x33, 0xcc,
1181 0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0xcc, 0xff,
1182 0xff, 0xff, 0xee, 0xff, 0xff, 0xff, 0xee, 0xee,
1183 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xdd,
1184 0xdd, 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, 0xff,
1185 0xbb, 0xbb, 0xff, 0xff, 0xff, 0x77, 0xff, 0xff,
1186 0xff, 0x77, 0x77, 0xff, 0x77, 0xbb, 0xdd, 0xee,
1187};
1188EXPORT_SYMBOL(tuning_blk_pattern_8bit);
1189
1190/* 1158/*
1191 * Execute tuning sequence to seek the proper bus operating 1159 * Execute tuning sequence to seek the proper bus operating
1192 * conditions for HS200 and HS400, which sends CMD21 to the device. 1160 * conditions for HS200 and HS400, which sends CMD21 to the device.
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 3b044c5b029c..0ea042dc7443 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -23,6 +23,36 @@
23 23
24#define MMC_OPS_TIMEOUT_MS (10 * 60 * 1000) /* 10 minute timeout */ 24#define MMC_OPS_TIMEOUT_MS (10 * 60 * 1000) /* 10 minute timeout */
25 25
26static const u8 tuning_blk_pattern_4bit[] = {
27 0xff, 0x0f, 0xff, 0x00, 0xff, 0xcc, 0xc3, 0xcc,
28 0xc3, 0x3c, 0xcc, 0xff, 0xfe, 0xff, 0xfe, 0xef,
29 0xff, 0xdf, 0xff, 0xdd, 0xff, 0xfb, 0xff, 0xfb,
30 0xbf, 0xff, 0x7f, 0xff, 0x77, 0xf7, 0xbd, 0xef,
31 0xff, 0xf0, 0xff, 0xf0, 0x0f, 0xfc, 0xcc, 0x3c,
32 0xcc, 0x33, 0xcc, 0xcf, 0xff, 0xef, 0xff, 0xee,
33 0xff, 0xfd, 0xff, 0xfd, 0xdf, 0xff, 0xbf, 0xff,
34 0xbb, 0xff, 0xf7, 0xff, 0xf7, 0x7f, 0x7b, 0xde,
35};
36
37static const u8 tuning_blk_pattern_8bit[] = {
38 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00,
39 0xff, 0xff, 0xcc, 0xcc, 0xcc, 0x33, 0xcc, 0xcc,
40 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0xcc, 0xff, 0xff,
41 0xff, 0xee, 0xff, 0xff, 0xff, 0xee, 0xee, 0xff,
42 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xdd, 0xdd,
43 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, 0xff, 0xbb,
44 0xbb, 0xff, 0xff, 0xff, 0x77, 0xff, 0xff, 0xff,
45 0x77, 0x77, 0xff, 0x77, 0xbb, 0xdd, 0xee, 0xff,
46 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00,
47 0x00, 0xff, 0xff, 0xcc, 0xcc, 0xcc, 0x33, 0xcc,
48 0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0xcc, 0xff,
49 0xff, 0xff, 0xee, 0xff, 0xff, 0xff, 0xee, 0xee,
50 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xdd,
51 0xdd, 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, 0xff,
52 0xbb, 0xbb, 0xff, 0xff, 0xff, 0x77, 0xff, 0xff,
53 0xff, 0x77, 0x77, 0xff, 0x77, 0xbb, 0xdd, 0xee,
54};
55
26static inline int __mmc_send_status(struct mmc_card *card, u32 *status, 56static inline int __mmc_send_status(struct mmc_card *card, u32 *status,
27 bool ignore_crc) 57 bool ignore_crc)
28{ 58{
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index 49ad7a943638..fb97b5cc91cd 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -53,11 +53,6 @@
53#define MMC_SEND_TUNING_BLOCK 19 /* adtc R1 */ 53#define MMC_SEND_TUNING_BLOCK 19 /* adtc R1 */
54#define MMC_SEND_TUNING_BLOCK_HS200 21 /* adtc R1 */ 54#define MMC_SEND_TUNING_BLOCK_HS200 21 /* adtc R1 */
55 55
56#define MMC_TUNING_BLK_PATTERN_4BIT_SIZE 64
57#define MMC_TUNING_BLK_PATTERN_8BIT_SIZE 128
58extern const u8 tuning_blk_pattern_4bit[MMC_TUNING_BLK_PATTERN_4BIT_SIZE];
59extern const u8 tuning_blk_pattern_8bit[MMC_TUNING_BLK_PATTERN_8BIT_SIZE];
60
61 /* class 3 */ 56 /* class 3 */
62#define MMC_WRITE_DAT_UNTIL_STOP 20 /* adtc [31:0] data addr R1 */ 57#define MMC_WRITE_DAT_UNTIL_STOP 20 /* adtc [31:0] data addr R1 */
63 58