summaryrefslogtreecommitdiff
authorfahui.feng <fahui.feng@amlogic.com>2018-11-23 10:52:04 (GMT)
committer Xiaoliang Wang <xiaoliang.wang@amlogic.com>2019-01-03 04:35:09 (GMT)
commit54d2061b0599eca961eaec6cb0bd43a67d460cf4 (patch)
treeb5225e75d7f12b4fc88fbe12aa629613bbc5d51e
parent3bb69fe59927faf4a79f452fb08965244513892a (diff)
downloadcommon-54d2061b0599eca961eaec6cb0bd43a67d460cf4.zip
common-54d2061b0599eca961eaec6cb0bd43a67d460cf4.tar.gz
common-54d2061b0599eca961eaec6cb0bd43a67d460cf4.tar.bz2
sdio: optimize rtl 8822bs tx data crc [1/1]
PD#OTT-876 Problem: rtl 8822bs sdio wifi tx data crc when online on demand. Solution: remove cfg reg invalid setting in enable_sdio when data1 interrupt breaks. Verify: Beast Change-Id: Ied2bdfaf00306b8325a07f055468a564b1ca943f (cherry picked from commit bc1d9e680740ede3ad37469c59e9e24f3ff12fc6)
Diffstat
-rwxr-xr-x[-rw-r--r--]drivers/amlogic/mmc/aml_sd_emmc.c18
-rw-r--r--include/linux/amlogic/amlsd.h2
2 files changed, 9 insertions, 11 deletions
diff --git a/drivers/amlogic/mmc/aml_sd_emmc.c b/drivers/amlogic/mmc/aml_sd_emmc.c
index 4502cb1..0097cfc 100644..100755
--- a/drivers/amlogic/mmc/aml_sd_emmc.c
+++ b/drivers/amlogic/mmc/aml_sd_emmc.c
@@ -1875,30 +1875,25 @@ static void aml_sd_emmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
u32 vclkc = 0;
struct sd_emmc_clock *pclock = NULL;
struct sd_emmc_clock_v3 *pclock_v3 = NULL;
- u32 vconf = 0;
- struct sd_emmc_config *pconf = (struct sd_emmc_config *)&vconf;
u32 virqc = 0;
struct sd_emmc_irq_en *irqc = (struct sd_emmc_irq_en *)&virqc;
host->sdio_irqen = enable;
+#ifdef AML_MMC_TDMA
if (host->xfer_step == XFER_START)
return;
if (enable)
+#endif
spin_lock_irqsave(&host->mrq_lock, flags);
- vconf = readl(host->base + SD_EMMC_CFG);
- virqc = readl(host->base + SD_EMMC_IRQ_EN);
-
- pconf->irq_ds = 0;
/* vstat = sd_emmc_regs->gstatus&SD_EMMC_IRQ_ALL; */
+ virqc = readl(host->base + SD_EMMC_IRQ_EN);
if (enable)
irqc->irq_sdio = 1;
else
irqc->irq_sdio = 0;
-
writel(virqc, host->base + SD_EMMC_IRQ_EN);
- writel(vconf, host->base + SD_EMMC_CFG);
if (host->ctrl_ver >= 3) {
pclock_v3 = (struct sd_emmc_clock_v3 *)&vclkc;
@@ -1915,7 +1910,9 @@ static void aml_sd_emmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
}
pdata->clkc = vclkc;
+#ifdef AML_MMC_TDMA
if (enable)
+#endif
spin_unlock_irqrestore(&host->mrq_lock, flags);
/* check if irq already occurred */
@@ -2621,8 +2618,9 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
pr_err("%s: warning... data crc, vstat:0x%x, virqc:%x",
mmc_hostname(host->mmc),
vstat, virqc);
- pr_err("@ cmd %d with %p; stop %d, status %d\n",
- mrq->cmd->opcode, mrq->data,
+ pr_err("@ cmd %d arg %x with %p; stop %d, status %d\n",
+ mrq->cmd->opcode, mrq->cmd->arg,
+ mrq->data,
host->cmd_is_stop,
host->status);
}
diff --git a/include/linux/amlogic/amlsd.h b/include/linux/amlogic/amlsd.h
index 0aaee6d..81e5f0d 100644
--- a/include/linux/amlogic/amlsd.h
+++ b/include/linux/amlogic/amlsd.h
@@ -42,7 +42,7 @@ extern const u8 tuning_blk_pattern_8bit[128];
#define DEBUG_SD_OF 0
#define MODULE_NAME "amlsd"
/* #define CARD_DETECT_IRQ 1 */
-#define AML_MMC_TDMA 1
+/* #define AML_MMC_TDMA 1 */
#define SD_EMMC_DEBUG_BOARD 1
#if 0