]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mmc/mmc_spi.c
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / drivers / mmc / mmc_spi.c
index dc7574cbe5538c4577ca47670839803e8a92448a..fe6a5a166de8bbebcea7b15e7a9bfe14c3caaa63 100644 (file)
@@ -176,8 +176,8 @@ static int mmc_spi_request(struct mmc *mmc, struct mmc_cmd *cmd,
        u8 r1;
        int i;
        int ret = 0;
-       debug("%s:cmd%d %x %x %x\n", __func__,
-             cmd->cmdidx, cmd->resp_type, cmd->cmdarg, cmd->flags);
+       debug("%s:cmd%d %x %x\n", __func__,
+             cmd->cmdidx, cmd->resp_type, cmd->cmdarg);
        spi_claim_bus(spi);
        spi_cs_activate(spi);
        r1 = mmc_spi_sendcmd(mmc, cmd->cmdidx, cmd->cmdarg);
@@ -208,6 +208,11 @@ static int mmc_spi_request(struct mmc *mmc, struct mmc_cmd *cmd,
                        cmd->response[0] = swab32(cmd->response[0]);
                        debug("r32 %x\n", cmd->response[0]);
                        break;
+               case MMC_CMD_SEND_STATUS:
+                       spi_xfer(spi, 1 * 8, NULL, cmd->response, 0);
+                       cmd->response[0] = (cmd->response[0] & 0xff) ?
+                               MMC_STATUS_ERROR : MMC_STATUS_RDY_FOR_DATA;
+                       break;
                }
        } else {
                debug("%s:data %x %x %x\n", __func__,
@@ -267,6 +272,8 @@ struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode)
        mmc->send_cmd = mmc_spi_request;
        mmc->set_ios = mmc_spi_set_ios;
        mmc->init = mmc_spi_init_p;
+       mmc->getcd = NULL;
+       mmc->getwp = NULL;
        mmc->host_caps = MMC_MODE_SPI;
 
        mmc->voltages = MMC_SPI_VOLTAGE;