]> granicus.if.org Git - esp-idf/commitdiff
sdmmc: don't set data_expected on SET_BUS_WIDTH command
authorIvan Grokhotkov <ivan@espressif.com>
Thu, 17 Aug 2017 16:12:05 +0000 (00:12 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Wed, 11 Apr 2018 03:06:50 +0000 (11:06 +0800)
SET_BUS_WIDTH is not a data transfer command. Extensive search in the
host datasheet and SD card spec did not reveal the origin of this hack
or 'feature'. Further testing showed that removing this does not lead to
regressions.

components/driver/sdmmc_transaction.c
components/sdmmc/sdmmc_cmd.c

index 31e76ac6d9f4bbcf780e4815ed169a6b2f932fce..78e3e287230483d066f400fcb748be42a3c66d94 100644 (file)
@@ -246,10 +246,6 @@ static sdmmc_hw_cmd_t make_hw_cmd(sdmmc_command_t* cmd)
     } else {
         res.wait_complete = 1;
     }
-    if (s_is_app_cmd && cmd->opcode == SD_APP_SET_BUS_WIDTH) {
-        res.send_auto_stop = 1;
-        res.data_expected = 1;
-    }
     if (cmd->opcode == MMC_GO_IDLE_STATE) {
         res.send_init = 1;
     }
index 2c58843c2d8b4ed91dca60e4f68cff2c3c2fcb6f..6123990833af366102890fd857be4b919eca6027 100644 (file)
@@ -244,12 +244,6 @@ esp_err_t sdmmc_card_init(const sdmmc_host_t* config, sdmmc_card_t* card)
             ESP_LOGE(TAG, "slot->set_bus_width failed");
             return err;
         }
-        uint32_t status;
-        err = sdmmc_send_cmd_stop_transmission(card, &status);
-        if (err != ESP_OK) {
-            ESP_LOGE(TAG, "stop_transmission failed (0x%x)", err);
-            return err;
-        }
     }
 
     /* Wait for the card to be ready for data transfers */