MMC host:
- sdhci-acpi: Fixup build dependency for PCI - sdhci-omap: Resolve Kconfig warnings on keystone - sdhci-iproc: Propagate errors from DT parsing - meson-gx: Fixup IRQ handling in release callback - meson-gx: Use signal re-sampling to fixup tuning - dw_mmc-bluefield: Fix the license information -----BEGIN PGP SIGNATURE----- iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAlxLErEXHHVsZi5oYW5z c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjClVKQ//QubCzRscykWiSa0Lhbc/KnBx 6gP5OkWSFEVKK1MwbeWKszebIeZaA1VbBbrWHZy0rW7BiP3xbl5TJXjLwfOqqaSa ogS2bCwIxGbUy2YpvgcY6NzwXutuaXpCaEewlaeBMK8yALY12R9kX+mpV4msOs4Z 20KOfSbAprRAjRjv7zV+BNk7Qm/KY5MG8oRzepGBfUGCcQQglZH35Jfhd4ZYCWKo lPrFmZC+3ETdAaHTIguulO9iM7c3xs/Ggs4S80X59zvMjCCnRNOU6w+1LSKytwcH AV/78BY1M9YPbRkd2pDxkSmT5zZTJYC1L/enuGqZAtJr5oP6uiuyboRpdXoWWCrv ydh2msTLeCv+exYcV8bGqmaVdFdQlVMIY6IzRq/NqtdcMUfpxerk9DFjtcd/tpBk WS1UCEJzkj7UG15QLE9NLFeqUwdX6yphWtuT87b0V+Fj3n2LWbXkp4848+SA4CFl PEbFUl2eTx96hGQdfphQkMdQmv7A5sSazHBCTqsSUCVnXHyCk5P5En/zrRod6FQe qj0T2aCMxBEE6gzsiZZruURsKEJG2LR6JX39ahewvb25XPHC81WVAUD/bEyeMxG+ i213c3BE2OoCNvaewWWbYph7PKEJETu0Vl0dMg50deR1L4abzFW1K8hktpR5Mxek cYLLC16wEJRGlhOZvLQ= =aPVD -----END PGP SIGNATURE----- Merge tag 'mmc-v5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: - sdhci-acpi: Fixup build dependency for PCI - sdhci-omap: Resolve Kconfig warnings on keystone - sdhci-iproc: Propagate errors from DT parsing - meson-gx: Fixup IRQ handling in release callback - meson-gx: Use signal re-sampling to fixup tuning - dw_mmc-bluefield: Fix the license information * tag 'mmc-v5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: dw_mmc-bluefield: : Fix the license information mmc: meson-gx: enable signal re-sampling together with tuning mmc: sdhci-iproc: handle mmc_of_parse() errors during probe mmc: meson-gx: Free irq in release() callback mmc: host: Fix Kconfig warnings on keystone_defconfig mmc: sdhci-acpi: Make PCI dependency explicit
This commit is contained in:
commit
ba60697593
|
@ -116,7 +116,7 @@ config MMC_RICOH_MMC
|
|||
|
||||
config MMC_SDHCI_ACPI
|
||||
tristate "SDHCI support for ACPI enumerated SDHCI controllers"
|
||||
depends on MMC_SDHCI && ACPI
|
||||
depends on MMC_SDHCI && ACPI && PCI
|
||||
select IOSF_MBI if X86
|
||||
help
|
||||
This selects support for ACPI enumerated SDHCI controllers,
|
||||
|
@ -978,7 +978,7 @@ config MMC_SDHCI_OMAP
|
|||
tristate "TI SDHCI Controller Support"
|
||||
depends on MMC_SDHCI_PLTFM && OF
|
||||
select THERMAL
|
||||
select TI_SOC_THERMAL
|
||||
imply TI_SOC_THERMAL
|
||||
help
|
||||
This selects the Secure Digital Host Controller Interface (SDHCI)
|
||||
support present in TI's DRA7 SOCs. The controller supports
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Copyright (C) 2018 Mellanox Technologies.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
|
|
|
@ -179,6 +179,8 @@ struct meson_host {
|
|||
struct sd_emmc_desc *descs;
|
||||
dma_addr_t descs_dma_addr;
|
||||
|
||||
int irq;
|
||||
|
||||
bool vqmmc_enabled;
|
||||
};
|
||||
|
||||
|
@ -738,6 +740,11 @@ static int meson_mmc_clk_phase_tuning(struct mmc_host *mmc, u32 opcode,
|
|||
static int meson_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode)
|
||||
{
|
||||
struct meson_host *host = mmc_priv(mmc);
|
||||
int adj = 0;
|
||||
|
||||
/* enable signal resampling w/o delay */
|
||||
adj = ADJUST_ADJ_EN;
|
||||
writel(adj, host->regs + host->data->adjust);
|
||||
|
||||
return meson_mmc_clk_phase_tuning(mmc, opcode, host->rx_clk);
|
||||
}
|
||||
|
@ -768,6 +775,9 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
|||
if (!IS_ERR(mmc->supply.vmmc))
|
||||
mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd);
|
||||
|
||||
/* disable signal resampling */
|
||||
writel(0, host->regs + host->data->adjust);
|
||||
|
||||
/* Reset rx phase */
|
||||
clk_set_phase(host->rx_clk, 0);
|
||||
|
||||
|
@ -1166,7 +1176,7 @@ static int meson_mmc_get_cd(struct mmc_host *mmc)
|
|||
|
||||
static void meson_mmc_cfg_init(struct meson_host *host)
|
||||
{
|
||||
u32 cfg = 0, adj = 0;
|
||||
u32 cfg = 0;
|
||||
|
||||
cfg |= FIELD_PREP(CFG_RESP_TIMEOUT_MASK,
|
||||
ilog2(SD_EMMC_CFG_RESP_TIMEOUT));
|
||||
|
@ -1177,10 +1187,6 @@ static void meson_mmc_cfg_init(struct meson_host *host)
|
|||
cfg |= CFG_ERR_ABORT;
|
||||
|
||||
writel(cfg, host->regs + SD_EMMC_CFG);
|
||||
|
||||
/* enable signal resampling w/o delay */
|
||||
adj = ADJUST_ADJ_EN;
|
||||
writel(adj, host->regs + host->data->adjust);
|
||||
}
|
||||
|
||||
static int meson_mmc_card_busy(struct mmc_host *mmc)
|
||||
|
@ -1231,7 +1237,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
|
|||
struct resource *res;
|
||||
struct meson_host *host;
|
||||
struct mmc_host *mmc;
|
||||
int ret, irq;
|
||||
int ret;
|
||||
|
||||
mmc = mmc_alloc_host(sizeof(struct meson_host), &pdev->dev);
|
||||
if (!mmc)
|
||||
|
@ -1276,8 +1282,8 @@ static int meson_mmc_probe(struct platform_device *pdev)
|
|||
goto free_host;
|
||||
}
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq <= 0) {
|
||||
host->irq = platform_get_irq(pdev, 0);
|
||||
if (host->irq <= 0) {
|
||||
dev_err(&pdev->dev, "failed to get interrupt resource.\n");
|
||||
ret = -EINVAL;
|
||||
goto free_host;
|
||||
|
@ -1331,9 +1337,8 @@ static int meson_mmc_probe(struct platform_device *pdev)
|
|||
writel(IRQ_CRC_ERR | IRQ_TIMEOUTS | IRQ_END_OF_CHAIN,
|
||||
host->regs + SD_EMMC_IRQ_EN);
|
||||
|
||||
ret = devm_request_threaded_irq(&pdev->dev, irq, meson_mmc_irq,
|
||||
meson_mmc_irq_thread, IRQF_SHARED,
|
||||
NULL, host);
|
||||
ret = request_threaded_irq(host->irq, meson_mmc_irq,
|
||||
meson_mmc_irq_thread, IRQF_SHARED, NULL, host);
|
||||
if (ret)
|
||||
goto err_init_clk;
|
||||
|
||||
|
@ -1351,7 +1356,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
|
|||
if (host->bounce_buf == NULL) {
|
||||
dev_err(host->dev, "Unable to map allocate DMA bounce buffer.\n");
|
||||
ret = -ENOMEM;
|
||||
goto err_init_clk;
|
||||
goto err_free_irq;
|
||||
}
|
||||
|
||||
host->descs = dma_alloc_coherent(host->dev, SD_EMMC_DESC_BUF_LEN,
|
||||
|
@ -1370,6 +1375,8 @@ static int meson_mmc_probe(struct platform_device *pdev)
|
|||
err_bounce_buf:
|
||||
dma_free_coherent(host->dev, host->bounce_buf_size,
|
||||
host->bounce_buf, host->bounce_dma_addr);
|
||||
err_free_irq:
|
||||
free_irq(host->irq, host);
|
||||
err_init_clk:
|
||||
clk_disable_unprepare(host->mmc_clk);
|
||||
err_core_clk:
|
||||
|
@ -1387,6 +1394,7 @@ static int meson_mmc_remove(struct platform_device *pdev)
|
|||
|
||||
/* disable interrupts */
|
||||
writel(0, host->regs + SD_EMMC_IRQ_EN);
|
||||
free_irq(host->irq, host);
|
||||
|
||||
dma_free_coherent(host->dev, SD_EMMC_DESC_BUF_LEN,
|
||||
host->descs, host->descs_dma_addr);
|
||||
|
|
|
@ -296,7 +296,10 @@ static int sdhci_iproc_probe(struct platform_device *pdev)
|
|||
|
||||
iproc_host->data = iproc_data;
|
||||
|
||||
mmc_of_parse(host->mmc);
|
||||
ret = mmc_of_parse(host->mmc);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
sdhci_get_property(pdev);
|
||||
|
||||
host->mmc->caps |= iproc_host->data->mmc_caps;
|
||||
|
|
Loading…
Reference in New Issue