Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mmc: dw_mmc: Remove DW_MCI_SEND_STATUS and DW_MCI_RECV_STATUS macros

Use MMC_DATA_READ and MMC_DATA_WRITE defined by MMC core instead.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Shawn Lin and committed by
Ulf Hansson
29d3f6a6 e453a08b

+10 -12
+10 -12
drivers/mmc/host/dw_mmc.c
··· 40 40 SDMMC_INT_RESP_ERR | SDMMC_INT_HLE) 41 41 #define DW_MCI_ERROR_FLAGS (DW_MCI_DATA_ERROR_FLAGS | \ 42 42 DW_MCI_CMD_ERROR_FLAGS) 43 - #define DW_MCI_SEND_STATUS 1 44 - #define DW_MCI_RECV_STATUS 2 45 43 #define DW_MCI_DMA_THRESHOLD 16 46 44 47 45 #define DW_MCI_FREQ_MAX 200000000 /* unit: HZ */ ··· 1083 1085 host->data = data; 1084 1086 1085 1087 if (data->flags & MMC_DATA_READ) 1086 - host->dir_status = DW_MCI_RECV_STATUS; 1088 + host->dir_status = MMC_DATA_READ; 1087 1089 else 1088 - host->dir_status = DW_MCI_SEND_STATUS; 1090 + host->dir_status = MMC_DATA_WRITE; 1089 1091 1090 1092 dw_mci_ctrl_thld(host, data); 1091 1093 ··· 1851 1853 data->error = -EILSEQ; 1852 1854 } else if (status & SDMMC_INT_EBE) { 1853 1855 if (host->dir_status == 1854 - DW_MCI_SEND_STATUS) { 1856 + MMC_DATA_WRITE) { 1855 1857 /* 1856 1858 * No data CRC status was returned. 1857 1859 * The number of bytes transferred ··· 1860 1862 data->bytes_xfered = 0; 1861 1863 data->error = -ETIMEDOUT; 1862 1864 } else if (host->dir_status == 1863 - DW_MCI_RECV_STATUS) { 1865 + MMC_DATA_READ) { 1864 1866 data->error = -EILSEQ; 1865 1867 } 1866 1868 } else { ··· 2005 2007 * avoids races and keeps things simple. 2006 2008 */ 2007 2009 if (err != -ETIMEDOUT && 2008 - host->dir_status == DW_MCI_RECV_STATUS) { 2010 + host->dir_status == MMC_DATA_READ) { 2009 2011 state = STATE_SENDING_DATA; 2010 2012 continue; 2011 2013 } ··· 2049 2051 * If all data-related interrupts don't come 2050 2052 * within the given time in reading data state. 2051 2053 */ 2052 - if (host->dir_status == DW_MCI_RECV_STATUS) 2054 + if (host->dir_status == MMC_DATA_READ) 2053 2055 dw_mci_set_drto(host); 2054 2056 break; 2055 2057 } ··· 2089 2091 * interrupt doesn't come within the given time. 2090 2092 * in reading data state. 2091 2093 */ 2092 - if (host->dir_status == DW_MCI_RECV_STATUS) 2094 + if (host->dir_status == MMC_DATA_READ) 2093 2095 dw_mci_set_drto(host); 2094 2096 break; 2095 2097 } ··· 2757 2759 if (!host->data_status) 2758 2760 host->data_status = pending; 2759 2761 smp_wmb(); /* drain writebuffer */ 2760 - if (host->dir_status == DW_MCI_RECV_STATUS) { 2762 + if (host->dir_status == MMC_DATA_READ) { 2761 2763 if (host->sg != NULL) 2762 2764 dw_mci_read_data_pio(host, true); 2763 2765 } ··· 2769 2771 2770 2772 if (pending & SDMMC_INT_RXDR) { 2771 2773 mci_writel(host, RINTSTS, SDMMC_INT_RXDR); 2772 - if (host->dir_status == DW_MCI_RECV_STATUS && host->sg) 2774 + if (host->dir_status == MMC_DATA_READ && host->sg) 2773 2775 dw_mci_read_data_pio(host, false); 2774 2776 } 2775 2777 2776 2778 if (pending & SDMMC_INT_TXDR) { 2777 2779 mci_writel(host, RINTSTS, SDMMC_INT_TXDR); 2778 - if (host->dir_status == DW_MCI_SEND_STATUS && host->sg) 2780 + if (host->dir_status == MMC_DATA_WRITE && host->sg) 2779 2781 dw_mci_write_data_pio(host); 2780 2782 } 2781 2783