Merge branch 'for-next/mmc'
This commit is contained in:
commit
e5c12670d3
|
@ -181,7 +181,7 @@ static uint mmc_spi_readdata(struct mmc_spi_host *host, void *xbuf,
|
|||
mmc_spi_readbytes(host, bsize, buf);
|
||||
mmc_spi_readbytes(host, 2, &crc);
|
||||
#ifdef CONFIG_MMC_SPI_CRC_ON
|
||||
if (swab16(cyg_crc16(buf, bsize)) != crc) {
|
||||
if (be16_to_cpu(cyg_crc16(buf, bsize)) != crc) {
|
||||
dev_dbg(host->dev, "%s: CRC error\n", __func__);
|
||||
r1 = R1_SPI_COM_CRC;
|
||||
break;
|
||||
|
@ -212,7 +212,7 @@ static uint mmc_spi_writedata(struct mmc_spi_host *host, const void *xbuf,
|
|||
|
||||
while (bcnt--) {
|
||||
#ifdef CONFIG_MMC_SPI_CRC_ON
|
||||
crc = swab16(cyg_crc16((u8 *)buf, bsize));
|
||||
crc = be16_to_cpu(cyg_crc16((u8 *)buf, bsize));
|
||||
#endif
|
||||
mmc_spi_writebytes(host, 2, tok);
|
||||
mmc_spi_writebytes(host, bsize, (void *)buf);
|
||||
|
@ -291,7 +291,7 @@ static int mmc_spi_request(struct mci_host *mci, struct mci_cmd *cmd, struct mci
|
|||
} else if (cmd->resp_type == MMC_RSP_R2) {
|
||||
r1 = mmc_spi_readdata(host, cmd->response, 1, 16);
|
||||
for (i = 0; i < 4; i++)
|
||||
cmd->response[i] = swab32(cmd->response[i]);
|
||||
cmd->response[i] = be32_to_cpu(cmd->response[i]);
|
||||
dev_dbg(host->dev, "MMC_RSP_R2 -> %x %x %x %x\n", cmd->response[0], cmd->response[1],
|
||||
cmd->response[2], cmd->response[3]);
|
||||
} else if (!data) {
|
||||
|
@ -299,7 +299,7 @@ static int mmc_spi_request(struct mci_host *mci, struct mci_cmd *cmd, struct mci
|
|||
case SD_CMD_SEND_IF_COND:
|
||||
case MMC_CMD_SPI_READ_OCR:
|
||||
mmc_spi_readbytes(host, 4, cmd->response);
|
||||
cmd->response[0] = swab32(cmd->response[0]);
|
||||
cmd->response[0] = be32_to_cpu(cmd->response[0]);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue