Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3767554imu; Sun, 11 Nov 2018 23:27:53 -0800 (PST) X-Google-Smtp-Source: AJdET5dIgPikF0yZS4YyTeOFRYKTkKdOOuFPijZp4iLJiQ2KhTbkGixvpmQHzczOksRg1hKIRrtH X-Received: by 2002:a63:d40a:: with SMTP id a10mr16169796pgh.394.1542007673846; Sun, 11 Nov 2018 23:27:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542007673; cv=none; d=google.com; s=arc-20160816; b=NXf57eLaW+2nbCkZEi01BNan4VO07IUnbh+UiwhYpdhKVJwNXPmaTIo62HFbPCb845 rcYJFbbWl5oN9ti+2x5twJmZaD4HsRFCOSwThXMS1daP02NuXHQ9rinm8kTkK4s4+YE5 a2k5Xp1I2bXou8zG63XZs64JHe7LlRRWe6SX/YC6+nlODs3iJWTgDhzIQWkKnFyhkJxv nQ9FFn9/nE/JTnVS8CcBkknJKRVj8RFB7G1sVaCndAzM1hCsH6SgitCQo7g/m/IdfNuf lpwXXHdc+SlzpbiYEChWHup9Qo8+QJE+t3Ex95yq+lM2TN/vK35pY5eyY/eZqIESvX5c peDg== 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=n0shTLWVLOWZOTUoAQC89gB739nczZpYRMifTlqhkHs=; b=gRzCFaGJu53DONsAGZWhcMTIIyTGPqMKT/FcKuBWY0aEpdV9J19rduVQaCIvXUFLqd xEdn5L4G8xw531o8FwJ4YOToKVgUy47lzy9TgOM23afOcvyurMQK5O4hZ+SF1C1O+yX5 SwUCXbjV+cIhSqXbsxNJDXsRCX2tWfLJDp9B+AFVC6xBK5gYTbB9vQF38lQWa//vCB1j vNJFe9b00ADhh4Uwf6nnFkA/T2mPboOnhbuNb8zVZXC2URnZJQNlZmSCl5FL9lupu7PR 8jyZgHyEDMjyXt+XKoMHA5MUEHvmInOWr1TCSvYuie55W9MJlDj3ftmUGXcUA3CPgUb/ /UDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IIygXA0t; 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 t6si16794164pgn.258.2018.11.11.23.27.39; Sun, 11 Nov 2018 23:27:53 -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=IIygXA0t; 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 S1727153AbeKLRS4 (ORCPT + 99 others); Mon, 12 Nov 2018 12:18:56 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:40786 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725871AbeKLRS4 (ORCPT ); Mon, 12 Nov 2018 12:18:56 -0500 Received: by mail-pg1-f195.google.com with SMTP id z10so3655717pgp.7 for ; Sun, 11 Nov 2018 23:26:57 -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=n0shTLWVLOWZOTUoAQC89gB739nczZpYRMifTlqhkHs=; b=IIygXA0tF9qJAE2izQ37wk1wcPh87EQXM16RBKrjk9N+p1Mw5MDagA9ZZeN6jARZuj GzQJjqynG15eJ+1gkowjAU9KlzV4lkekuHnfcEnPLhrzxANGyG7+cmpQsGvmCMxFmEEQ fMqE+T6xEHykx96tzZqb5T8FwB6zp2W8KE3k4= 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=n0shTLWVLOWZOTUoAQC89gB739nczZpYRMifTlqhkHs=; b=Ug4b2xBnc7SNo1LXMJMO3aQBp8QE4MK/zoCj28iSnpRDTxinmidA0bNd5cLFGau1FM BZtdsyZtfwgK+or4ifcupzBnrXLwlisWgy8RWwX077U0uxFL6WBskD2GtzwtvuXXHzUq ZrClUkCdZY/Cay1DcixXS2uVW1kcJ2F3XX919rbqFcCXdS0Mw637jSWI1WE3axcFfIj4 H3w6N7H4NjxITZ6qJIdnmRyYMsaQOct5uR6ioLscV5Uslq+mMs6B3+0gH61aXQg90bhn biGuaZeS0bFHMu2Qwg07vwKrLgdRHgPjapydY77Rl9F9+94ASw1dK09LseANvErheCL5 on5Q== X-Gm-Message-State: AGRZ1gLCq2j2Ca1QqI8jpI+DAss1INl0LF0pS8gJb/NTzYK5uG8PWa24 0gpR6lfnfmgjOMga5vk7WXQyoQ== X-Received: by 2002:a62:b802:: with SMTP id p2-v6mr18830394pfe.1.1542007617556; Sun, 11 Nov 2018 23:26:57 -0800 (PST) Received: from ubt.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id w2-v6sm18668331pfn.89.2018.11.11.23.26.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 11 Nov 2018 23:26:56 -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 v2 2/3] mmc: sdhci-omap: Add using external dma Date: Mon, 12 Nov 2018 15:26:05 +0800 Message-Id: <1542007566-9449-3-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542007566-9449-1-git-send-email-zhang.chunyan@linaro.org> References: <1542007566-9449-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 controller via dmaengine framework as well as ADMA which standard SD host controller provides. 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..ccc79f2 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_external_dma(host, true); ret = sdhci_setup_host(host); if (ret) goto err_put_sync; -- 2.7.4