MMC core:

- Fix initialization of block size when ext_csd isn't present
 
 MMC host:
  - sdhci-brcmstb: Fix mmc timeout errors on S5 suspend
  - sdhci-of-dwcmshc: Fix request accessing RPMB
  - sdhci-xenon: Fix 1.8v regulator stabilization
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmAKneMXHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCnqPA/7B/27oZc0zen6v50cPFsopasE
 NwsHMpDALaQDbYFClMUBpc8ydUHwPTQEwoxTZbis9fgsE5e4gcXSiKQa0ZPqylFq
 agMmsy+vndUME0LK0xC6PVZxuLeMYorRdsEs2qsS3h4u15jGRaHeH6513KlCpYIg
 /RIzPoxJuOIskmPbA+4n0H8rD/xs/adJma2Em2eNKzzObOm9h+iEMARjGntYWvKf
 rkl+hFsVmyySjXFN+waLTZ/hbpJ9SpOrrq23g10hx+qAHRaaRSR+9EZ5+wgxW5vl
 7J1kepm3D6Ugc+2poBZhGq8lsD2F1R4juMVzmxe50/RKISIm4XCPArU1/h8tSXLy
 saiNRaMe6wGheZmM83qUJDu0dGJYxrFuc7Fb+Mc1ZSg/OR6/N5/fzDfQxHA8SsLU
 h2tZsWfU3K6ta9Pf/aSbhGw7O7HKOeQJCX0KBulyAW5QHZ8uGMyYoCVOG9EvZNpw
 cH8vB4NSyWP0+JkFQEgjMR3a7FttZhvqXbB6RASfyTp+o7d5EzMMWv5CcBZ9l0+O
 MrT5ZTP24Hmi4U0qtJEeAhyMRNe0aIlwH2zqKo+aFIPQy2j3c0T6NZvbu95r54dm
 PKBAo2NBUFtOSFMm9bHgNEq1/hXqESK9Bda8wJRzTTQAqP6F7d+hp5eb4VgfygyV
 ofnyH3Cm4r2rfaRoOKU=
 =SoNe
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:
 "MMC core:
   - Fix initialization of block size when ext_csd isn't present

  MMC host:
   - sdhci-brcmstb: Fix mmc timeout errors on S5 suspend
   - sdhci-of-dwcmshc: Fix request accessing RPMB
   - sdhci-xenon: Fix 1.8v regulator stabilization"

* tag 'mmc-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: core: don't initialize block size from ext_csd if not present
  mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend
  mmc: sdhci-xenon: fix 1.8v regulator stabilization
  mmc: sdhci-of-dwcmshc: fix rpmb access
This commit is contained in:
Linus Torvalds 2021-01-22 13:43:42 -08:00
commit 59a4560e85
4 changed files with 37 additions and 7 deletions

View File

@ -384,8 +384,10 @@ static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card)
"merging was advertised but not possible");
blk_queue_max_segments(mq->queue, mmc_get_max_segments(host));
if (mmc_card_mmc(card))
if (mmc_card_mmc(card) && card->ext_csd.data_sector_size) {
block_size = card->ext_csd.data_sector_size;
WARN_ON(block_size != 512 && block_size != 4096);
}
blk_queue_logical_block_size(mq->queue, block_size);
/*

View File

@ -314,11 +314,7 @@ err_clk:
static void sdhci_brcmstb_shutdown(struct platform_device *pdev)
{
int ret;
ret = sdhci_pltfm_unregister(pdev);
if (ret)
dev_err(&pdev->dev, "failed to shutdown\n");
sdhci_pltfm_suspend(&pdev->dev);
}
MODULE_DEVICE_TABLE(of, sdhci_brcm_of_match);

View File

@ -16,6 +16,8 @@
#include "sdhci-pltfm.h"
#define SDHCI_DWCMSHC_ARG2_STUFF GENMASK(31, 16)
/* DWCMSHC specific Mode Select value */
#define DWCMSHC_CTRL_HS400 0x7
@ -49,6 +51,29 @@ static void dwcmshc_adma_write_desc(struct sdhci_host *host, void **desc,
sdhci_adma_write_desc(host, desc, addr, len, cmd);
}
static void dwcmshc_check_auto_cmd23(struct mmc_host *mmc,
struct mmc_request *mrq)
{
struct sdhci_host *host = mmc_priv(mmc);
/*
* No matter V4 is enabled or not, ARGUMENT2 register is 32-bit
* block count register which doesn't support stuff bits of
* CMD23 argument on dwcmsch host controller.
*/
if (mrq->sbc && (mrq->sbc->arg & SDHCI_DWCMSHC_ARG2_STUFF))
host->flags &= ~SDHCI_AUTO_CMD23;
else
host->flags |= SDHCI_AUTO_CMD23;
}
static void dwcmshc_request(struct mmc_host *mmc, struct mmc_request *mrq)
{
dwcmshc_check_auto_cmd23(mmc, mrq);
sdhci_request(mmc, mrq);
}
static void dwcmshc_set_uhs_signaling(struct sdhci_host *host,
unsigned int timing)
{
@ -133,6 +158,8 @@ static int dwcmshc_probe(struct platform_device *pdev)
sdhci_get_of_property(pdev);
host->mmc_host_ops.request = dwcmshc_request;
err = sdhci_add_host(host);
if (err)
goto err_clk;

View File

@ -168,7 +168,12 @@ static void xenon_reset_exit(struct sdhci_host *host,
/* Disable tuning request and auto-retuning again */
xenon_retune_setup(host);
xenon_set_acg(host, true);
/*
* The ACG should be turned off at the early init time, in order
* to solve a possible issues with the 1.8V regulator stabilization.
* The feature is enabled in later stage.
*/
xenon_set_acg(host, false);
xenon_set_sdclk_off_idle(host, sdhc_id, false);