Skip to content

Commit 237ecf1

Browse files
committed
Merge branch 'fixes' into next
2 parents a83849a + e8a1ff6 commit 237ecf1

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

drivers/mmc/host/mtk-sd.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2656,6 +2656,25 @@ static int msdc_drv_probe(struct platform_device *pdev)
26562656
host->dma_mask = DMA_BIT_MASK(32);
26572657
mmc_dev(mmc)->dma_mask = &host->dma_mask;
26582658

2659+
host->timeout_clks = 3 * 1048576;
2660+
host->dma.gpd = dma_alloc_coherent(&pdev->dev,
2661+
2 * sizeof(struct mt_gpdma_desc),
2662+
&host->dma.gpd_addr, GFP_KERNEL);
2663+
host->dma.bd = dma_alloc_coherent(&pdev->dev,
2664+
MAX_BD_NUM * sizeof(struct mt_bdma_desc),
2665+
&host->dma.bd_addr, GFP_KERNEL);
2666+
if (!host->dma.gpd || !host->dma.bd) {
2667+
ret = -ENOMEM;
2668+
goto release_mem;
2669+
}
2670+
msdc_init_gpd_bd(host, &host->dma);
2671+
INIT_DELAYED_WORK(&host->req_timeout, msdc_request_timeout);
2672+
spin_lock_init(&host->lock);
2673+
2674+
platform_set_drvdata(pdev, mmc);
2675+
msdc_ungate_clock(host);
2676+
msdc_init_hw(host);
2677+
26592678
if (mmc->caps2 & MMC_CAP2_CQE) {
26602679
host->cq_host = devm_kzalloc(mmc->parent,
26612680
sizeof(*host->cq_host),
@@ -2676,25 +2695,6 @@ static int msdc_drv_probe(struct platform_device *pdev)
26762695
mmc->max_seg_size = 64 * 1024;
26772696
}
26782697

2679-
host->timeout_clks = 3 * 1048576;
2680-
host->dma.gpd = dma_alloc_coherent(&pdev->dev,
2681-
2 * sizeof(struct mt_gpdma_desc),
2682-
&host->dma.gpd_addr, GFP_KERNEL);
2683-
host->dma.bd = dma_alloc_coherent(&pdev->dev,
2684-
MAX_BD_NUM * sizeof(struct mt_bdma_desc),
2685-
&host->dma.bd_addr, GFP_KERNEL);
2686-
if (!host->dma.gpd || !host->dma.bd) {
2687-
ret = -ENOMEM;
2688-
goto release_mem;
2689-
}
2690-
msdc_init_gpd_bd(host, &host->dma);
2691-
INIT_DELAYED_WORK(&host->req_timeout, msdc_request_timeout);
2692-
spin_lock_init(&host->lock);
2693-
2694-
platform_set_drvdata(pdev, mmc);
2695-
msdc_ungate_clock(host);
2696-
msdc_init_hw(host);
2697-
26982698
ret = devm_request_irq(&pdev->dev, host->irq, msdc_irq,
26992699
IRQF_TRIGGER_NONE, pdev->name, host);
27002700
if (ret)

0 commit comments

Comments
 (0)