diff options
Diffstat (limited to 'drivers/mmc/mmc.c')
-rw-r--r-- | drivers/mmc/mmc.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index bfca5c176e88..1888060c5e0c 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
@@ -211,7 +211,7 @@ int mmc_wait_for_app_cmd(struct mmc_host *host, unsigned int rca, | |||
211 | 211 | ||
212 | appcmd.opcode = MMC_APP_CMD; | 212 | appcmd.opcode = MMC_APP_CMD; |
213 | appcmd.arg = rca << 16; | 213 | appcmd.arg = rca << 16; |
214 | appcmd.flags = MMC_RSP_R1; | 214 | appcmd.flags = MMC_RSP_R1 | MMC_CMD_AC; |
215 | appcmd.retries = 0; | 215 | appcmd.retries = 0; |
216 | memset(appcmd.resp, 0, sizeof(appcmd.resp)); | 216 | memset(appcmd.resp, 0, sizeof(appcmd.resp)); |
217 | appcmd.data = NULL; | 217 | appcmd.data = NULL; |
@@ -331,7 +331,7 @@ static int mmc_select_card(struct mmc_host *host, struct mmc_card *card) | |||
331 | 331 | ||
332 | cmd.opcode = MMC_SELECT_CARD; | 332 | cmd.opcode = MMC_SELECT_CARD; |
333 | cmd.arg = card->rca << 16; | 333 | cmd.arg = card->rca << 16; |
334 | cmd.flags = MMC_RSP_R1; | 334 | cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; |
335 | 335 | ||
336 | err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); | 336 | err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); |
337 | if (err != MMC_ERR_NONE) | 337 | if (err != MMC_ERR_NONE) |
@@ -358,7 +358,7 @@ static int mmc_select_card(struct mmc_host *host, struct mmc_card *card) | |||
358 | struct mmc_command cmd; | 358 | struct mmc_command cmd; |
359 | cmd.opcode = SD_APP_SET_BUS_WIDTH; | 359 | cmd.opcode = SD_APP_SET_BUS_WIDTH; |
360 | cmd.arg = SD_BUS_WIDTH_4; | 360 | cmd.arg = SD_BUS_WIDTH_4; |
361 | cmd.flags = MMC_RSP_R1; | 361 | cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; |
362 | 362 | ||
363 | err = mmc_wait_for_app_cmd(host, card->rca, &cmd, | 363 | err = mmc_wait_for_app_cmd(host, card->rca, &cmd, |
364 | CMD_RETRIES); | 364 | CMD_RETRIES); |
@@ -386,7 +386,7 @@ static void mmc_deselect_cards(struct mmc_host *host) | |||
386 | 386 | ||
387 | cmd.opcode = MMC_SELECT_CARD; | 387 | cmd.opcode = MMC_SELECT_CARD; |
388 | cmd.arg = 0; | 388 | cmd.arg = 0; |
389 | cmd.flags = MMC_RSP_NONE; | 389 | cmd.flags = MMC_RSP_NONE | MMC_CMD_AC; |
390 | 390 | ||
391 | mmc_wait_for_cmd(host, &cmd, 0); | 391 | mmc_wait_for_cmd(host, &cmd, 0); |
392 | } | 392 | } |
@@ -677,7 +677,7 @@ static void mmc_idle_cards(struct mmc_host *host) | |||
677 | 677 | ||
678 | cmd.opcode = MMC_GO_IDLE_STATE; | 678 | cmd.opcode = MMC_GO_IDLE_STATE; |
679 | cmd.arg = 0; | 679 | cmd.arg = 0; |
680 | cmd.flags = MMC_RSP_NONE; | 680 | cmd.flags = MMC_RSP_NONE | MMC_CMD_BC; |
681 | 681 | ||
682 | mmc_wait_for_cmd(host, &cmd, 0); | 682 | mmc_wait_for_cmd(host, &cmd, 0); |
683 | 683 | ||
@@ -738,7 +738,7 @@ static int mmc_send_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr) | |||
738 | 738 | ||
739 | cmd.opcode = MMC_SEND_OP_COND; | 739 | cmd.opcode = MMC_SEND_OP_COND; |
740 | cmd.arg = ocr; | 740 | cmd.arg = ocr; |
741 | cmd.flags = MMC_RSP_R3; | 741 | cmd.flags = MMC_RSP_R3 | MMC_CMD_BCR; |
742 | 742 | ||
743 | for (i = 100; i; i--) { | 743 | for (i = 100; i; i--) { |
744 | err = mmc_wait_for_cmd(host, &cmd, 0); | 744 | err = mmc_wait_for_cmd(host, &cmd, 0); |
@@ -766,7 +766,7 @@ static int mmc_send_app_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr) | |||
766 | 766 | ||
767 | cmd.opcode = SD_APP_OP_COND; | 767 | cmd.opcode = SD_APP_OP_COND; |
768 | cmd.arg = ocr; | 768 | cmd.arg = ocr; |
769 | cmd.flags = MMC_RSP_R3; | 769 | cmd.flags = MMC_RSP_R3 | MMC_CMD_BCR; |
770 | 770 | ||
771 | for (i = 100; i; i--) { | 771 | for (i = 100; i; i--) { |
772 | err = mmc_wait_for_app_cmd(host, 0, &cmd, CMD_RETRIES); | 772 | err = mmc_wait_for_app_cmd(host, 0, &cmd, CMD_RETRIES); |
@@ -805,7 +805,7 @@ static void mmc_discover_cards(struct mmc_host *host) | |||
805 | 805 | ||
806 | cmd.opcode = MMC_ALL_SEND_CID; | 806 | cmd.opcode = MMC_ALL_SEND_CID; |
807 | cmd.arg = 0; | 807 | cmd.arg = 0; |
808 | cmd.flags = MMC_RSP_R2; | 808 | cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR; |
809 | 809 | ||
810 | err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); | 810 | err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); |
811 | if (err == MMC_ERR_TIMEOUT) { | 811 | if (err == MMC_ERR_TIMEOUT) { |
@@ -835,7 +835,7 @@ static void mmc_discover_cards(struct mmc_host *host) | |||
835 | 835 | ||
836 | cmd.opcode = SD_SEND_RELATIVE_ADDR; | 836 | cmd.opcode = SD_SEND_RELATIVE_ADDR; |
837 | cmd.arg = 0; | 837 | cmd.arg = 0; |
838 | cmd.flags = MMC_RSP_R6; | 838 | cmd.flags = MMC_RSP_R6 | MMC_CMD_BCR; |
839 | 839 | ||
840 | err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); | 840 | err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); |
841 | if (err != MMC_ERR_NONE) | 841 | if (err != MMC_ERR_NONE) |
@@ -856,7 +856,7 @@ static void mmc_discover_cards(struct mmc_host *host) | |||
856 | } else { | 856 | } else { |
857 | cmd.opcode = MMC_SET_RELATIVE_ADDR; | 857 | cmd.opcode = MMC_SET_RELATIVE_ADDR; |
858 | cmd.arg = card->rca << 16; | 858 | cmd.arg = card->rca << 16; |
859 | cmd.flags = MMC_RSP_R1; | 859 | cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; |
860 | 860 | ||
861 | err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); | 861 | err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); |
862 | if (err != MMC_ERR_NONE) | 862 | if (err != MMC_ERR_NONE) |
@@ -878,7 +878,7 @@ static void mmc_read_csds(struct mmc_host *host) | |||
878 | 878 | ||
879 | cmd.opcode = MMC_SEND_CSD; | 879 | cmd.opcode = MMC_SEND_CSD; |
880 | cmd.arg = card->rca << 16; | 880 | cmd.arg = card->rca << 16; |
881 | cmd.flags = MMC_RSP_R2; | 881 | cmd.flags = MMC_RSP_R2 | MMC_CMD_AC; |
882 | 882 | ||
883 | err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); | 883 | err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); |
884 | if (err != MMC_ERR_NONE) { | 884 | if (err != MMC_ERR_NONE) { |
@@ -920,7 +920,7 @@ static void mmc_read_scrs(struct mmc_host *host) | |||
920 | 920 | ||
921 | cmd.opcode = MMC_APP_CMD; | 921 | cmd.opcode = MMC_APP_CMD; |
922 | cmd.arg = card->rca << 16; | 922 | cmd.arg = card->rca << 16; |
923 | cmd.flags = MMC_RSP_R1; | 923 | cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; |
924 | 924 | ||
925 | err = mmc_wait_for_cmd(host, &cmd, 0); | 925 | err = mmc_wait_for_cmd(host, &cmd, 0); |
926 | if ((err != MMC_ERR_NONE) || !(cmd.resp[0] & R1_APP_CMD)) { | 926 | if ((err != MMC_ERR_NONE) || !(cmd.resp[0] & R1_APP_CMD)) { |
@@ -932,7 +932,7 @@ static void mmc_read_scrs(struct mmc_host *host) | |||
932 | 932 | ||
933 | cmd.opcode = SD_APP_SEND_SCR; | 933 | cmd.opcode = SD_APP_SEND_SCR; |
934 | cmd.arg = 0; | 934 | cmd.arg = 0; |
935 | cmd.flags = MMC_RSP_R1; | 935 | cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; |
936 | 936 | ||
937 | memset(&data, 0, sizeof(struct mmc_data)); | 937 | memset(&data, 0, sizeof(struct mmc_data)); |
938 | 938 | ||
@@ -1003,7 +1003,7 @@ static void mmc_check_cards(struct mmc_host *host) | |||
1003 | 1003 | ||
1004 | cmd.opcode = MMC_SEND_STATUS; | 1004 | cmd.opcode = MMC_SEND_STATUS; |
1005 | cmd.arg = card->rca << 16; | 1005 | cmd.arg = card->rca << 16; |
1006 | cmd.flags = MMC_RSP_R1; | 1006 | cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; |
1007 | 1007 | ||
1008 | err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); | 1008 | err = mmc_wait_for_cmd(host, &cmd, CMD_RETRIES); |
1009 | if (err == MMC_ERR_NONE) | 1009 | if (err == MMC_ERR_NONE) |