Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp76332imu; Sun, 4 Nov 2018 19:19:23 -0800 (PST) X-Google-Smtp-Source: AJdET5dNawdVoS3+80MM0HvnUAvPZsZZ9wD6STln6H5aDnJ4zJCJbhfI8sYSCjpZqAZsXv73Qn6N X-Received: by 2002:a63:6302:: with SMTP id x2mr18658234pgb.183.1541387963865; Sun, 04 Nov 2018 19:19:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541387963; cv=none; d=google.com; s=arc-20160816; b=PStWLZzozd0EpjYlDY2EHaqS66f1SDkbm6zsFDjCPLEV5wLMhxivjOqcycsE/4UlIa ERYBnn6YcdDSRNt0YRGX47k7+4+3/r4cwqBFGWW4A0ktYUmX72P4tkCLSESUNVtVrl42 N3D+kIONjCdRKQ64In0g9+tgPMsJNi7nsnD1IzaRofiFqGng6sSemS2ZPcgirkhAFpBe IdiNPIEAxW943UBjZneFh/O3nPTpQFcwHV+4k3uVRUfKG8z3Q/pJktc9bZKJrK0XDKw7 Gb+Jkf4f2sgsJghByOuDT0GDhnFwrFHEO9497MCIjIQjmuCEu+Nide0ODy0a/rCH8+YO laAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=yzwsoUSsA6n9GhAeRE9xmA2fjMci+vdbes/fUzU0UCs=; b=uqaVs1NKoInGxwfvSCf7DACbg1DwsMX5hOzsTRjuFgzKU5uQCJbut6tDCBKQdc2ZxI i9aaBERIW7JJdvNzy50RKngdd0j3kqMYDpFdG3LC8NwNhVvBu47JpZWYZtHCjEdvoyZz Q6aK/EjwTWzUUT6GXjPkIVEL0SnZHgVXAP5iSrLr7DMlq7aS34XAZv/rk7sNePyB1LzL FI6ssmnXB2yeGbvQJ8Bx4ciOlbMQ4ri9e2JszexR1XzkHpJiJkUHikfNeef0psRI/gKz Ksk4dd5oj0ihPgkBgUGbKswyNvC3CPgZYRyboGnuvcwJMLM6ecuvG4lMo61ZG7i4k+FJ FiJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B3ljs4mc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91-v6si10422322plh.438.2018.11.04.19.19.09; Sun, 04 Nov 2018 19:19:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@linaro.org header.s=google header.b=B3ljs4mc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729156AbeKEMeg (ORCPT + 99 others); Mon, 5 Nov 2018 07:34:36 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:44849 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728283AbeKEMeg (ORCPT ); Mon, 5 Nov 2018 07:34:36 -0500 Received: by mail-pl1-f194.google.com with SMTP id s5-v6so3699933plq.11 for ; Sun, 04 Nov 2018 19:17:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yzwsoUSsA6n9GhAeRE9xmA2fjMci+vdbes/fUzU0UCs=; b=B3ljs4mch/YbPLxq6teeIIcfZpElrfsxLw96UNC8Yrr6yFsKCFzHANFw3fbsTCePIL b+KJCbQP5bUz2g2FCwCZH4NEHBujljf+5K4QpWA2ZHbCkBlm5YOisk/aS18LTOBveBjx f2sKFWhhmk/Xak51D5W4rG43ao222Mi59km9k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yzwsoUSsA6n9GhAeRE9xmA2fjMci+vdbes/fUzU0UCs=; b=fEcPe9CSYw1UC+umrgoTsUweadpBOXnSRpTc6/oyGNAt/9glZBY2/ZSNAx3AvRUETQ e6f63h4z12nW2jXPbnU/yzUxV6ZK3czLKvvJTFsubu1vybXXuzlRzDptBucmsor92YFO N7RdHnfEeLg4YnPkAw//+d0/HNnTc9zjtPpTWYhXjncAu3PLM4QVJ4pZS3fS81+UkaK3 CU7vuX859x6kFfRUfbldVL/FZiVlngw/M6bgYcgXXopVOETqTIWzNQrtxaJr586Dhkyg c+cqED8Cugw3IiXzx+Y6gVWIPigckBq88Bgxx60D2C5IVUXgX2wi4YOG4v+dzCq97qus msiQ== X-Gm-Message-State: AGRZ1gLgqm/nZzIwonbNnFXRBQEko8/P2JNC3LUOuVSKyFvZ6XQIu7Qz X5sXqVkI+dIbMefBILpuRztJEg== X-Received: by 2002:a17:902:8d94:: with SMTP id v20-v6mr20757455plo.109.1541387827813; Sun, 04 Nov 2018 19:17:07 -0800 (PST) Received: from ubt.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id f10-v6sm40182773pgp.72.2018.11.04.19.17.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 04 Nov 2018 19:17:06 -0800 (PST) From: Chunyan Zhang To: Ulf Hansson , Adrian Hunter Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Mark Brown , Kishon Vijay Abraham I , Sekhar Nori , Chunyan Zhang Subject: [PATCH RFC 2/3] mmc: sdhci-omap: Add using external dma Date: Mon, 5 Nov 2018 11:16:49 +0800 Message-Id: <1541387810-24867-3-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1541387810-24867-1-git-send-email-zhang.chunyan@linaro.org> References: <1541387810-24867-1-git-send-email-zhang.chunyan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sdhci-omap can support both external dma controllers via dmaengine framework as well as ADMA in which the controller acts as DMA master. Signed-off-by: Chunyan Zhang --- drivers/mmc/host/sdhci-omap.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index 88347ce..0a8162c 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -896,6 +896,7 @@ static int sdhci_omap_probe(struct platform_device *pdev) const struct of_device_id *match; struct sdhci_omap_data *data; const struct soc_device_attribute *soc; + struct resource *regs; match = of_match_device(omap_sdhci_match, dev); if (!match) @@ -908,6 +909,10 @@ static int sdhci_omap_probe(struct platform_device *pdev) } offset = data->offset; + regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!regs) + return -ENXIO; + host = sdhci_pltfm_init(pdev, &sdhci_omap_pdata, sizeof(*omap_host)); if (IS_ERR(host)) { @@ -924,6 +929,7 @@ static int sdhci_omap_probe(struct platform_device *pdev) omap_host->timing = MMC_TIMING_LEGACY; omap_host->flags = data->flags; host->ioaddr += offset; + host->mapbase = regs->start; mmc = host->mmc; sdhci_get_of_property(pdev); @@ -991,6 +997,7 @@ static int sdhci_omap_probe(struct platform_device *pdev) host->mmc_host_ops.execute_tuning = sdhci_omap_execute_tuning; host->mmc_host_ops.enable_sdio_irq = sdhci_omap_enable_sdio_irq; + sdhci_switch_extdma(host, true); ret = sdhci_setup_host(host); if (ret) goto err_put_sync; -- 2.7.4