Skip to content

Commit 27f4e1e

Browse files
Faiz-AbbasUlf Hansson
authored andcommitted
mmc: sdhci_am654: Fix Command Queuing in AM65x
Command Queuing was enabled completely for J721e controllers which lead to partial enablement even for Am65x. Complete CQ implementation for AM65x by adding the irq callback. Fixes: f545702 ("mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E") Cc: stable@vger.kernel.org Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20200108143301.1929-4-faiz_abbas@ti.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent de31f6a commit 27f4e1e

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

drivers/mmc/host/sdhci_am654.c

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,19 @@ static int sdhci_am654_execute_tuning(struct mmc_host *mmc, u32 opcode)
256256
return 0;
257257
}
258258

259+
static u32 sdhci_am654_cqhci_irq(struct sdhci_host *host, u32 intmask)
260+
{
261+
int cmd_error = 0;
262+
int data_error = 0;
263+
264+
if (!sdhci_cqe_irq(host, intmask, &cmd_error, &data_error))
265+
return intmask;
266+
267+
cqhci_irq(host->mmc, intmask, cmd_error, data_error);
268+
269+
return 0;
270+
}
271+
259272
static struct sdhci_ops sdhci_am654_ops = {
260273
.get_max_clock = sdhci_pltfm_clk_get_max_clock,
261274
.get_timeout_clock = sdhci_pltfm_clk_get_max_clock,
@@ -264,6 +277,7 @@ static struct sdhci_ops sdhci_am654_ops = {
264277
.set_power = sdhci_am654_set_power,
265278
.set_clock = sdhci_am654_set_clock,
266279
.write_b = sdhci_am654_write_b,
280+
.irq = sdhci_am654_cqhci_irq,
267281
.reset = sdhci_reset,
268282
};
269283

@@ -278,19 +292,6 @@ static const struct sdhci_am654_driver_data sdhci_am654_drvdata = {
278292
.flags = IOMUX_PRESENT | FREQSEL_2_BIT | STRBSEL_4_BIT | DLL_PRESENT,
279293
};
280294

281-
static u32 sdhci_am654_cqhci_irq(struct sdhci_host *host, u32 intmask)
282-
{
283-
int cmd_error = 0;
284-
int data_error = 0;
285-
286-
if (!sdhci_cqe_irq(host, intmask, &cmd_error, &data_error))
287-
return intmask;
288-
289-
cqhci_irq(host->mmc, intmask, cmd_error, data_error);
290-
291-
return 0;
292-
}
293-
294295
static struct sdhci_ops sdhci_j721e_8bit_ops = {
295296
.get_max_clock = sdhci_pltfm_clk_get_max_clock,
296297
.get_timeout_clock = sdhci_pltfm_clk_get_max_clock,

0 commit comments

Comments
 (0)