From patchwork Tue Dec 17 11:26:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181860 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp5562709och; Tue, 17 Dec 2019 03:26:23 -0800 (PST) X-Google-Smtp-Source: APXvYqz9w35kdzZ4MfiacwqoNnkwehfIqbFdf71ji87LCuKpOxMMI/jLDWmhWeaQTEgF1Ry+rgmc X-Received: by 2002:a9d:6d06:: with SMTP id o6mr38094690otp.239.1576581982946; Tue, 17 Dec 2019 03:26:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576581982; cv=none; d=google.com; s=arc-20160816; b=WbDDs9JwJCUn9qkaH3fydF95/rpqwIoGhqY28D2jRPzIo2gViobnMkpUfWfvXhLeZu ZDvn0lPTEENET2yyBrEpE57J/nFER3Z5jqGbexh1XMmswGbjTNxXtw+AIbx5TLNyVL3S q/fO0e774QWASQiqYYqveVchR5wEY2PeFXaDO/hzM0DssU0uXktAaFEFoR1VfeldQyPi VTf46id+R5EwsmKK5mtTjj0CJW2qNvkbiqsrj0rAZHZ6xtDBO8lUTJes/SGZidXjrHRz nPTJIOMfL7ONG/RSHInR38DUwZfTI6bNqJHoC+PISBomeBaEzOSMgPbHyghxC5PwwhaL eK2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=TV6DPLpiJbdeCxYibVSSrCGCWxCe2/84Mhd8qwzutDw=; b=lUjP+X5ACbRy7CIsqKlIMk6F9Q6UWhioDgt0zf+v4+WK62Ut2DvINvpftaCCUW9Fj9 k9SIFrkp2EB3HpXWi5A8LwxYV7rf2u58A2krxZcxmZD8B/CNJ16oV1GsTtuMguvbFV5d 7ZskHicrn69BR1KnHikfTMRgZoksbNeodxMKFJsKYuKpOh5H7U+4J+aJFTjK5p9VaTI1 MMF710LcDSnO1JoVF+SWA+bp+HNLp8S07dyLRNuU1M/kNJHhDR2PGhmNXlZ+XLStAQWx wzi7WhqrlyAimjFRQSn/M468YSerHhjDuSKvPCTKX74vWx8FrxJ6xpo1o0gr5/zX3TZ9 NOpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=YQBtTtAV; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1si12093170otq.298.2019.12.17.03.26.22; Tue, 17 Dec 2019 03:26:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=YQBtTtAV; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726496AbfLQL0V (ORCPT + 5 others); Tue, 17 Dec 2019 06:26:21 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:53846 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726487AbfLQL0V (ORCPT ); Tue, 17 Dec 2019 06:26:21 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBHBQEun095573; Tue, 17 Dec 2019 05:26:14 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576581974; bh=TV6DPLpiJbdeCxYibVSSrCGCWxCe2/84Mhd8qwzutDw=; h=From:To:CC:Subject:Date; b=YQBtTtAVRR7QsrrvHWEnGNlid+N7hKrIwIlzQ4jtbHJJ9uNkNRAhid95vox+hbJ7q 541itjtDyGJof2KMxfZn+ciYPbyNvYYp/O9TF6kaOBQfScxrTPHyg01YyWI7yx2rBh 463MlG662TkPRIfqWvQWSrUfC+d8e3aZW4EhXwuk= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBHBQEXp115620 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Dec 2019 05:26:14 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 17 Dec 2019 05:26:12 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 17 Dec 2019 05:26:12 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBHBQ9Qm086054; Tue, 17 Dec 2019 05:26:10 -0600 From: Peter Ujfalusi To: , , , , CC: , , , , , Subject: [PATCH] mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel() Date: Tue, 17 Dec 2019 13:26:25 +0200 Message-ID: <20191217112625.30715-1-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi --- drivers/mmc/host/bcm2835.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index 99f61fd2a658..3821f159d36d 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1393,7 +1393,15 @@ static int bcm2835_probe(struct platform_device *pdev) host->dma_chan = NULL; host->dma_desc = NULL; - host->dma_chan_rxtx = dma_request_slave_channel(dev, "rx-tx"); + host->dma_chan_rxtx = dma_request_chan(dev, "rx-tx"); + if (IS_ERR(host->dma_chan_rxtx)) { + if (PTR_ERR(host->dma_chan_rxtx) == -EPROBE_DEFER) + return -EPROBE_DEFER; + + /* Ignore errors to fall back to PIO mode */ + host->dma_chan_rxtx = NULL; + } + clk = devm_clk_get(dev, NULL); if (IS_ERR(clk)) {