Skip to content

Commit

Permalink
HACK: mmc: meson-gx: force max_segs/max_blk_count values in dram acce…
Browse files Browse the repository at this point in the history
…ss quirk

Temporary workaround for the G12A and G12B SDIO chip bug that causes sdio
issues with brcmfmac. Patch is based on [1] by @hyphop (Khadas) and hints
from @superna9999.

[1] https://github.com/hyphop/khadas-linux-kernel/blob/master/patches/linux-5.4.5/0005-VIM3_wifi_hack.patch

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
  • Loading branch information
chewitt committed Dec 24, 2019
1 parent 653630b commit 1875277
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/mmc/host/meson-gx-mmc.c
Expand Up @@ -1152,8 +1152,10 @@ static int meson_mmc_probe(struct platform_device *pdev)
mmc->caps |= MMC_CAP_CMD23;
if (host->dram_access_quirk) {
/* Limit to the available sram memory */
mmc->max_segs = SD_EMMC_SRAM_DATA_BUF_LEN / mmc->max_blk_size;
mmc->max_blk_count = mmc->max_segs;
//mmc->max_segs = SD_EMMC_SRAM_DATA_BUF_LEN / mmc->max_blk_size;
//mmc->max_blk_count = mmc->max_segs;
mmc->max_segs = 1;
mmc->max_blk_count = 2;
} else {
mmc->max_blk_count = CMD_CFG_LENGTH_MASK;
mmc->max_segs = SD_EMMC_DESC_BUF_LEN /
Expand Down

0 comments on commit 1875277

Please sign in to comment.