summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-03-07 14:23:38 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-03-07 14:23:38 +0100
commit369d39adfe79334db5ed04d6f2acaf096c68b8a2 (patch)
tree9478a42e66c46e2f2b70ede9cd0b07dfc4f29298 /drivers
parent8f397a4b163f6ee149837f0ab0dfd4081a720010 (diff)
parentc57b0f9130fc759b9d1c354cea9f740eeb39615e (diff)
downloadbarebox-369d39adfe79334db5ed04d6f2acaf096c68b8a2.tar.gz
Merge branch 'for-next/spd'
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mci/Kconfig2
-rw-r--r--drivers/mci/mci_spi.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mci/Kconfig b/drivers/mci/Kconfig
index cd28fef..911cc0c 100644
--- a/drivers/mci/Kconfig
+++ b/drivers/mci/Kconfig
@@ -144,7 +144,7 @@ config MCI_SPI
config MMC_SPI_CRC_ON
bool "Enable CRC protection for transfers"
- select CRC16
+ select CRC_ITU_T
depends on MCI_SPI
help
Enable CRC protection for transfers
diff --git a/drivers/mci/mci_spi.c b/drivers/mci/mci_spi.c
index 011947c..42072da 100644
--- a/drivers/mci/mci_spi.c
+++ b/drivers/mci/mci_spi.c
@@ -166,7 +166,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 (be16_to_cpu(cyg_crc16(buf, bsize)) != crc) {
+ if (be16_to_cpu(crc_itu_t(0, buf, bsize)) != crc) {
dev_dbg(host->dev, "%s: CRC error\n", __func__);
r1 = R1_SPI_COM_CRC;
break;
@@ -197,7 +197,7 @@ static uint mmc_spi_writedata(struct mmc_spi_host *host, const void *xbuf,
while (bcnt--) {
#ifdef CONFIG_MMC_SPI_CRC_ON
- crc = be16_to_cpu(cyg_crc16((u8 *)buf, bsize));
+ crc = be16_to_cpu(crc_itu_t(0, (u8 *)buf, bsize));
#endif
mmc_spi_writebytes(host, 2, tok);
mmc_spi_writebytes(host, bsize, (void *)buf);