mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
rk_sdmmc: recalculate audib rx_wmark
AudiB contain a less limitation in rx_wmark. Signed-off-by: xiaoyao <xiaoyao@rock-chips.com> Signed-off-by: lintao <lintao@rock-chips.com>
This commit is contained in:
@@ -620,6 +620,7 @@ static void dw_mci_edmac_start_dma(struct dw_mci *host, unsigned int sg_len)
|
||||
u32 sg_elems = host->data->sg_len;
|
||||
u32 fifoth_val, mburst;
|
||||
u32 burst_limit = 0;
|
||||
u32 idx, rx_wmark, tx_wmark;
|
||||
int ret = 0;
|
||||
|
||||
/* Set external dma config: burst size, burst width*/
|
||||
@@ -640,9 +641,18 @@ static void dw_mci_edmac_start_dma(struct dw_mci *host, unsigned int sg_len)
|
||||
|
||||
if (mburst > burst_limit) {
|
||||
mburst = burst_limit;
|
||||
fifoth_val = SDMMC_SET_FIFOTH(ilog2(mburst) - 1,
|
||||
(host->fifo_depth) / 2 - 1,
|
||||
(host->fifo_depth) / 2);
|
||||
idx = (ilog2(mburst) > 0) ? (ilog2(mburst) - 1) : 0;
|
||||
|
||||
if (soc_is_rk3126b()) {
|
||||
idx = 0;
|
||||
rx_wmark = (host->fifo_depth) / 2 - 1;
|
||||
} else {
|
||||
rx_wmark = mszs[idx] - 1;
|
||||
}
|
||||
|
||||
tx_wmark = (host->fifo_depth) / 2;
|
||||
fifoth_val = SDMMC_SET_FIFOTH(idx, rx_wmark, tx_wmark);
|
||||
|
||||
mci_writel(host, FIFOTH, fifoth_val);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user