From patchwork Mon Nov 5 03:16:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 150134 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2113891ljp; Sun, 4 Nov 2018 19:17:12 -0800 (PST) X-Google-Smtp-Source: AJdET5fl7h2PbsZNeINTbDdutKwciMP3rr/YG+uDb+lrQs3gl5vHkpNcCk6SH/WSPGhMVf2uz23a X-Received: by 2002:a63:9845:: with SMTP id l5mr18690576pgo.142.1541387832127; Sun, 04 Nov 2018 19:17:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541387832; cv=none; d=google.com; s=arc-20160816; b=oSfYK+qZ7R3E9sjJY+/wBAhnWFLDeDFPHskYhcmwNjCtC5cpMPoZvoYtYpS01kVrGZ IaJzp3Ry1sV7QqPhpE8d8VLGuCNPhJU3tg7cueRV3lqHhnttEqFHSMs4QqNxqIAtJQn5 UGfARxGfIZfIstjkkLMUWfyObkFghP8cHMaFPoGTbEwg+EdVKEFJT1SknNUOR1CQGTEl wgGJQk1w0nTYzYekFB6oZ30m17ZSk38Ln8nvLxHJVv6dQrwV5zuw7jIRBOa0j30QMR8q WtIN5apcN/keOWZ7gaqemJwxtRuzD5rYIpfjs9z9mx831+X663atDhLiIjGa08jhZioB 9w5Q== 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=Vrxkhow8bUI+vbTQ4JAH1prQW0BP6GPOfQhxYs4N7UDy5xX0nsW3C/UfZXqzd/BBm2 UZRlNcl/osooG+pO9LU95vOzHv6hEOi0XNCdLvVZ5st8vw+s/9E57pCRwRNx0T3Dmkkd mb/HkJt05F8aQa6Yedpg/Yi5SnIbM5ZD+pKPuY/R981x1Oc8Z6A0up6dTRt7v21tkjC0 cfJpQySe73ENE12k47WIpe7Y2CqLT1HL0fMVgZtj+8YOB3A8vpPpAANsQirkAEk0ENlJ NJDGeUbWRCZpySxvv4R2i8R6ysatLKDARHd3B2Qbx2aT0B2hER92r5lTtppCt2JRf2g5 ERsQ== 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-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-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 g8-v6si41835842plt.434.2018.11.04.19.17.11; Sun, 04 Nov 2018 19:17:12 -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=@linaro.org header.s=google header.b=B3ljs4mc; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728718AbeKEMeg (ORCPT + 5 others); Mon, 5 Nov 2018 07:34:36 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:37758 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728003AbeKEMef (ORCPT ); Mon, 5 Nov 2018 07:34:35 -0500 Received: by mail-pl1-f196.google.com with SMTP id p6-v6so3707164pll.4 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=KcYnsZHHTEif+ouQn9C5Im84vwrbHJ1SqfsFnZobLfUD6QPhqHHfqg8Tnr2DOXL0rW +r8pZoAyCArJpC3Nq/urAzzu0GYWSTI0+MUqOt8BLePEBEZ7Me4V3DapwG5dlBApPeqx 8vqrcevB6oAIv81A9XLFmCj5KOHXd9y6iTuZ0/RG4ZaiMOrd8yXuSRsX/+wf15IBVDzZ eZZo3FVWpcSr5FeBmySkCPuTNUK30YBKM0+hWrxXwrRF3Uf0RfhhSm3iXk4GEqMawscf nOqhvTsAA2BwdL888xa5y+8cOu9K9cw3oupskKYqyhObDv+0CRozRGUA6jVbVErQA+cl 7r+Q== X-Gm-Message-State: AGRZ1gKRaIhqs8+9Hej2q0LFIYvsxk5fCqYRG4lI8pLlcCHVFMrKySCa nWYm+cwPK1zG8BDE5sc2jBL5eQ== 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-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@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(+) -- 2.7.4 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;