mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 09:41:54 +09:00
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:
@@ -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);
|
||||
/*
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user