mmc: dw_mmc: remove the quirks flags
Remove the quirks flag. (DW_MCI_QUIRK_BROKEN_DTO) For removing this, enabled the dto_timer by defaults. It doesn't see any I/O performance degression. In future, dwmmc controller should not use the quirks flag. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
e5a613537c
commit
16a34574c6
|
@ -285,9 +285,6 @@ static int dw_mci_rockchip_init(struct dw_mci *host)
|
||||||
/* It is slot 8 on Rockchip SoCs */
|
/* It is slot 8 on Rockchip SoCs */
|
||||||
host->sdio_id0 = 8;
|
host->sdio_id0 = 8;
|
||||||
|
|
||||||
/* It needs this quirk on all Rockchip SoCs */
|
|
||||||
host->pdata->quirks |= DW_MCI_QUIRK_BROKEN_DTO;
|
|
||||||
|
|
||||||
if (of_device_is_compatible(host->dev->of_node,
|
if (of_device_is_compatible(host->dev->of_node,
|
||||||
"rockchip,rk3288-dw-mshc"))
|
"rockchip,rk3288-dw-mshc"))
|
||||||
host->bus_hz /= RK3288_CLKGEN_DIV;
|
host->bus_hz /= RK3288_CLKGEN_DIV;
|
||||||
|
|
|
@ -1824,8 +1824,7 @@ static void dw_mci_tasklet_func(unsigned long priv)
|
||||||
* If all data-related interrupts don't come
|
* If all data-related interrupts don't come
|
||||||
* within the given time in reading data state.
|
* within the given time in reading data state.
|
||||||
*/
|
*/
|
||||||
if ((host->quirks & DW_MCI_QUIRK_BROKEN_DTO) &&
|
if (host->dir_status == DW_MCI_RECV_STATUS)
|
||||||
(host->dir_status == DW_MCI_RECV_STATUS))
|
|
||||||
dw_mci_set_drto(host);
|
dw_mci_set_drto(host);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1867,8 +1866,7 @@ static void dw_mci_tasklet_func(unsigned long priv)
|
||||||
* interrupt doesn't come within the given time.
|
* interrupt doesn't come within the given time.
|
||||||
* in reading data state.
|
* in reading data state.
|
||||||
*/
|
*/
|
||||||
if ((host->quirks & DW_MCI_QUIRK_BROKEN_DTO) &&
|
if (host->dir_status == DW_MCI_RECV_STATUS)
|
||||||
(host->dir_status == DW_MCI_RECV_STATUS))
|
|
||||||
dw_mci_set_drto(host);
|
dw_mci_set_drto(host);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2434,8 +2432,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pending & SDMMC_INT_DATA_OVER) {
|
if (pending & SDMMC_INT_DATA_OVER) {
|
||||||
if (host->quirks & DW_MCI_QUIRK_BROKEN_DTO)
|
del_timer(&host->dto_timer);
|
||||||
del_timer(&host->dto_timer);
|
|
||||||
|
|
||||||
mci_writel(host, RINTSTS, SDMMC_INT_DATA_OVER);
|
mci_writel(host, RINTSTS, SDMMC_INT_DATA_OVER);
|
||||||
if (!host->data_status)
|
if (!host->data_status)
|
||||||
|
@ -3026,11 +3023,8 @@ int dw_mci_probe(struct dw_mci *host)
|
||||||
setup_timer(&host->cmd11_timer,
|
setup_timer(&host->cmd11_timer,
|
||||||
dw_mci_cmd11_timer, (unsigned long)host);
|
dw_mci_cmd11_timer, (unsigned long)host);
|
||||||
|
|
||||||
host->quirks = host->pdata->quirks;
|
setup_timer(&host->dto_timer,
|
||||||
|
dw_mci_dto_timer, (unsigned long)host);
|
||||||
if (host->quirks & DW_MCI_QUIRK_BROKEN_DTO)
|
|
||||||
setup_timer(&host->dto_timer,
|
|
||||||
dw_mci_dto_timer, (unsigned long)host);
|
|
||||||
|
|
||||||
spin_lock_init(&host->lock);
|
spin_lock_init(&host->lock);
|
||||||
spin_lock_init(&host->irq_lock);
|
spin_lock_init(&host->irq_lock);
|
||||||
|
|
|
@ -112,7 +112,6 @@ struct dw_mci_dma_slave {
|
||||||
* @part_buf: Simple buffer for partial fifo reads/writes.
|
* @part_buf: Simple buffer for partial fifo reads/writes.
|
||||||
* @push_data: Pointer to FIFO push function.
|
* @push_data: Pointer to FIFO push function.
|
||||||
* @pull_data: Pointer to FIFO pull function.
|
* @pull_data: Pointer to FIFO pull function.
|
||||||
* @quirks: Set of quirks that apply to specific versions of the IP.
|
|
||||||
* @vqmmc_enabled: Status of vqmmc, should be true or false.
|
* @vqmmc_enabled: Status of vqmmc, should be true or false.
|
||||||
* @irq_flags: The flags to be passed to request_irq.
|
* @irq_flags: The flags to be passed to request_irq.
|
||||||
* @irq: The irq value to be passed to request_irq.
|
* @irq: The irq value to be passed to request_irq.
|
||||||
|
@ -218,9 +217,6 @@ struct dw_mci {
|
||||||
void (*push_data)(struct dw_mci *host, void *buf, int cnt);
|
void (*push_data)(struct dw_mci *host, void *buf, int cnt);
|
||||||
void (*pull_data)(struct dw_mci *host, void *buf, int cnt);
|
void (*pull_data)(struct dw_mci *host, void *buf, int cnt);
|
||||||
|
|
||||||
/* Workaround flags */
|
|
||||||
u32 quirks;
|
|
||||||
|
|
||||||
bool vqmmc_enabled;
|
bool vqmmc_enabled;
|
||||||
unsigned long irq_flags; /* IRQ flags */
|
unsigned long irq_flags; /* IRQ flags */
|
||||||
int irq;
|
int irq;
|
||||||
|
@ -242,17 +238,12 @@ struct dw_mci_dma_ops {
|
||||||
void (*exit)(struct dw_mci *host);
|
void (*exit)(struct dw_mci *host);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* IP Quirks/flags. */
|
|
||||||
/* Timer for broken data transfer over scheme */
|
|
||||||
#define DW_MCI_QUIRK_BROKEN_DTO BIT(0)
|
|
||||||
|
|
||||||
struct dma_pdata;
|
struct dma_pdata;
|
||||||
|
|
||||||
/* Board platform data */
|
/* Board platform data */
|
||||||
struct dw_mci_board {
|
struct dw_mci_board {
|
||||||
u32 num_slots;
|
u32 num_slots;
|
||||||
|
|
||||||
u32 quirks; /* Workaround / Quirk flags */
|
|
||||||
unsigned int bus_hz; /* Clock speed at the cclk_in pad */
|
unsigned int bus_hz; /* Clock speed at the cclk_in pad */
|
||||||
|
|
||||||
u32 caps; /* Capabilities */
|
u32 caps; /* Capabilities */
|
||||||
|
|
Loading…
Reference in New Issue